<div dir="auto">Yes. I was just waiting for my master build to wrap up. </div><br><div class="gmail_quote"><div dir="ltr">On Fri, Jul 27, 2018, 7:39 AM Martin Jansa <<a href="mailto:martin.jansa@gmail.com">martin.jansa@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">I like this change, some recipes in meta-oe seems to be broken now, is someone already working on a fix?<div><br></div><div>I'm seeing following 5 failures in my world builds:</div><div><br></div><div>python-stevedore-1.28.0-r0 do_compile and python3-stevedore-1.28.0-r0 do_compile<br></div><div>pkg_resources.DistributionNotFound: The 'pbr>=2.0.0' distribution was not found and is required by the application<br></div><div><br></div><div>python-dateutil-2.7.3-r0 do_compile and python3-dateutil-2.7.3-r0 do_compile<br></div><div>pkg_resources.DistributionNotFound: The 'setuptools_scm' distribution was not found and is required by the application<br></div><div><br></div><div>python-daemon-2.1.2-r0 do_compile<br></div><div>pkg_resources.DistributionNotFound: The 'docutils' distribution was not found and is required by the application<br></div><div><br></div><div>I've found a fix for python-dateutils from Derek:</div><div><a href="https://patchwork.openembedded.org/patch/153002/" target="_blank" rel="noreferrer">https://patchwork.openembedded.org/patch/153002/</a><br></div></div><br><div class="gmail_quote"><div dir="ltr">On Tue, Jul 17, 2018 at 3:27 PM Hongxu Jia <<a href="mailto:hongxu.jia@windriver.com" target="_blank" rel="noreferrer">hongxu.jia@windriver.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">If a python recipe is using setuptools and the setup_requires argument, where<br>
setuptools will use easy_install to fetch the module if it isn't<br>
present.<br>
<br>
The build failed on a machine where a proxy was required, but succeeded on a<br>
machine which had direct access to the internet<br>
<br>
Add var-NO_FETCH_BUILD, and set it in distutils_do_compile which does not<br>
allow to fetch code from internet during do_compile.<br>
<br>
Example result:<br>
...<br>
ERROR: Do not try to fetch `pytest-runner1' for building. Please add its native recipe to DEPENDS.<br>
Traceback (most recent call last):<br>
File "setup.py", line 56, in <module><br>
...<br>
<br>
The improvement is flexible for test_requirements argument (used at<br>
`setup.py test'), where use easy_install also.<br>
<br>
[YOCTO #12084]<br>
Signed-off-by: Hongxu Jia <<a href="mailto:hongxu.jia@windriver.com" target="_blank" rel="noreferrer">hongxu.jia@windriver.com</a>><br>
---<br>
meta/classes/distutils.bbclass | 1 +<br>
meta/classes/distutils3.bbclass | 1 +<br>
...ionally-do-not-fetch-code-by-easy_install.patch | 34 ++++++++++++++++++++++<br>
meta/recipes-devtools/python/python-setuptools.inc | 2 ++<br>
4 files changed, 38 insertions(+)<br>
create mode 100644 meta/recipes-devtools/python/files/0001-conditionally-do-not-fetch-code-by-easy_install.patch<br>
<br>
diff --git a/meta/classes/distutils.bbclass b/meta/classes/distutils.bbclass<br>
index 1930c35..c2f7403 100644<br>
--- a/meta/classes/distutils.bbclass<br>
+++ b/meta/classes/distutils.bbclass<br>
@@ -8,6 +8,7 @@ DISTUTILS_INSTALL_ARGS ?= "--prefix=${D}/${prefix} \<br>
--install-data=${D}/${datadir}"<br>
<br>
distutils_do_compile() {<br>
+ NO_FETCH_BUILD=1 \<br>
STAGING_INCDIR=${STAGING_INCDIR} \<br>
STAGING_LIBDIR=${STAGING_LIBDIR} \<br>
${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} setup.py build ${DISTUTILS_BUILD_ARGS} || \<br>
diff --git a/meta/classes/distutils3.bbclass b/meta/classes/distutils3.bbclass<br>
index d4b92a3..f8aca5e 100644<br>
--- a/meta/classes/distutils3.bbclass<br>
+++ b/meta/classes/distutils3.bbclass<br>
@@ -15,6 +15,7 @@ distutils3_do_configure() {<br>
}<br>
<br>
distutils3_do_compile() {<br>
+ NO_FETCH_BUILD=1 \<br>
STAGING_INCDIR=${STAGING_INCDIR} \<br>
STAGING_LIBDIR=${STAGING_LIBDIR} \<br>
${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} setup.py \<br>
diff --git a/meta/recipes-devtools/python/files/0001-conditionally-do-not-fetch-code-by-easy_install.patch b/meta/recipes-devtools/python/files/0001-conditionally-do-not-fetch-code-by-easy_install.patch<br>
new file mode 100644<br>
index 0000000..4b17921<br>
--- /dev/null<br>
+++ b/meta/recipes-devtools/python/files/0001-conditionally-do-not-fetch-code-by-easy_install.patch<br>
@@ -0,0 +1,34 @@<br>
+From 019422d19c6401fa8f45b1311ecd31bb087c809d Mon Sep 17 00:00:00 2001<br>
+From: Hongxu Jia <<a href="mailto:hongxu.jia@windriver.com" target="_blank" rel="noreferrer">hongxu.jia@windriver.com</a>><br>
+Date: Tue, 17 Jul 2018 10:13:38 +0800<br>
+Subject: [PATCH] conditionally do not fetch code by easy_install<br>
+<br>
+If var-NO_FETCH_BUILD is set, do not allow to fetch code from<br>
+internet by easy_install.<br>
+<br>
+Upstream-Status: Inappropriate [oe specific]<br>
+<br>
+Signed-off-by: Hongxu Jia <<a href="mailto:hongxu.jia@windriver.com" target="_blank" rel="noreferrer">hongxu.jia@windriver.com</a>><br>
+---<br>
+ setuptools/command/easy_install.py | 5 +++++<br>
+ 1 file changed, 5 insertions(+)<br>
+<br>
+diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py<br>
+index 85ee40f..7eb9d2a 100755<br>
+--- a/setuptools/command/easy_install.py<br>
++++ b/setuptools/command/easy_install.py<br>
+@@ -637,6 +637,11 @@ class easy_install(Command):<br>
+ os.path.exists(tmpdir) and rmtree(rmtree_safe(tmpdir))<br>
+ <br>
+ def easy_install(self, spec, deps=False):<br>
++ if os.environ.get('NO_FETCH_BUILD', None):<br>
++ log.error("ERROR: Do not try to fetch `%s' for building. "<br>
++ "Please add its native recipe to DEPENDS." % spec)<br>
++ return None<br>
++<br>
+ if not self.editable:<br>
+ self.install_site_py()<br>
+ <br>
+-- <br>
+2.7.4<br>
+<br>
diff --git a/meta/recipes-devtools/python/python-setuptools.inc b/meta/recipes-devtools/python/python-setuptools.inc<br>
index 25be446..24b3ac4 100644<br>
--- a/meta/recipes-devtools/python/python-setuptools.inc<br>
+++ b/meta/recipes-devtools/python/python-setuptools.inc<br>
@@ -9,6 +9,8 @@ PYPI_PACKAGE_EXT = "zip"<br>
<br>
inherit pypi<br>
<br>
+SRC_URI_append_class-native = " file://0001-conditionally-do-not-fetch-code-by-easy_install.patch"<br>
+<br>
SRC_URI[md5sum] = "260630ae1a64bafa39dcc53404d63829"<br>
SRC_URI[sha256sum] = "012adb8e25fbfd64c652e99e7bab58799a3aaf05d39ab38561f69190a909015f"<br>
<br>
-- <br>
2.7.4<br>
<br>
-- <br>
_______________________________________________<br>
Openembedded-core mailing list<br>
<a href="mailto:Openembedded-core@lists.openembedded.org" target="_blank" rel="noreferrer">Openembedded-core@lists.openembedded.org</a><br>
<a href="http://lists.openembedded.org/mailman/listinfo/openembedded-core" rel="noreferrer noreferrer" target="_blank">http://lists.openembedded.org/mailman/listinfo/openembedded-core</a><br>
</blockquote></div>
</blockquote></div>