poky/meta/recipes-devtools/python/python3-setuptools/0001-conditionally-do-not-fetch-code-by-easy_install.patch
Wang Mingyu 1bd8ab8ac0 python3-setuptools: upgrade 68.1.2 -> 68.2.1
Changelog:
===========
Features
----------
-Rework how setuptools internally handles dependencies/install_requires and
 optional-dependencies/extras_require. (#3903)
-Improve the generated PKG-INFO files, by adding Requires-Dist fields.
-Improve atomicity when writing PKG-INFO files to avoid race conditions with
 importlib.metadata. (#3904)

Bugfixes
----------
-Fix the name given to the *-nspkg.pth files in editable installs, ensuring
 they are unique per distribution. (#4041)
-Workaround some limitations on pkg_resources-style legacy namespaces in the
 meta path finder for editable installations. (#4041)
-Avoid using caching attributes in Distribution.metadata for requirements.

(From OE-Core rev: 214dcfd3bf088b6b166835ab2727c1d0e0edfc03)

Signed-off-by: Wang Mingyu <wangmy@fujitsu.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-09-14 09:19:38 +01:00

33 lines
1.2 KiB
Diff

From c4a48e6a75a5865a7c8d61a0f060aca9ba92477b Mon Sep 17 00:00:00 2001
From: Hongxu Jia <hongxu.jia@windriver.com>
Date: Tue, 17 Jul 2018 10:13:38 +0800
Subject: [PATCH] conditionally do not fetch code by easy_install
If var-NO_FETCH_BUILD is set, do not allow to fetch code from
internet by easy_install.
Upstream-Status: Inappropriate [oe specific]
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
---
setuptools/command/easy_install.py | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py
index 8ba4f09..8ea40c5 100644
--- a/setuptools/command/easy_install.py
+++ b/setuptools/command/easy_install.py
@@ -676,6 +676,11 @@ class easy_install(Command):
os.path.exists(tmpdir) and _rmtree(tmpdir)
def easy_install(self, spec, deps=False):
+ if os.environ.get('NO_FETCH_BUILD', None):
+ log.error("ERROR: Do not try to fetch `%s' for building. "
+ "Please add its native recipe to DEPENDS." % spec)
+ return None
+
with self._tmpdir() as tmpdir:
if not isinstance(spec, Requirement):
if URL_SCHEME(spec):