]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/blob
16b316e9cc275fcb10c0b2f169c90d188533cf67
[thirdparty/openembedded/openembedded-core-contrib.git] /
1 From 80fe63816eb3bfd1f5b6d354e1f2442805cff4e0 Mon Sep 17 00:00:00 2001
2 From: Hongxu Jia <hongxu.jia@windriver.com>
3 Date: Tue, 17 Jul 2018 10:13:38 +0800
4 Subject: [PATCH] conditionally do not fetch code by easy_install
5
6 If NO_FETCH_BUILD is set, do not fetch code in easy_install. This avoids setup.py
7 trying to fetch missing dependencies at build time.
8
9 This is only used by the deprecated codepath as implemented by setuptools3.bbclass, so
10 when that ever gets removed this patch can also be deleted.
11
12 Upstream-Status: Denied [https://github.com/pypa/setuptools/issues/4735]
13 Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
14 ---
15 setuptools/command/easy_install.py | 5 +++++
16 1 file changed, 5 insertions(+)
17
18 diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py
19 index 858fb20..62bd853 100644
20 --- a/setuptools/command/easy_install.py
21 +++ b/setuptools/command/easy_install.py
22 @@ -672,6 +672,11 @@ class easy_install(Command):
23 os.path.exists(tmpdir) and _rmtree(tmpdir)
24
25 def easy_install(self, spec, deps=False):
26 + if os.environ.get('NO_FETCH_BUILD', None):
27 + log.error("ERROR: Do not try to fetch `%s' for building. "
28 + "Please add its native recipe to DEPENDS." % spec)
29 + return None
30 +
31 with self._tmpdir() as tmpdir:
32 if not isinstance(spec, Requirement):
33 if URL_SCHEME(spec):