<div dir="ltr">Thanks a lot.</div><br><div class="gmail_quote"><div dir="ltr">On Fri, Jul 27, 2018 at 2:43 PM Derek Straka <<a href="mailto:derek@asterius.io">derek@asterius.io</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">python-daemon - <a href="https://patchwork.openembedded.org/patch/153034/" target="_blank">https://patchwork.openembedded.org/patch/153034/</a><br><div><br></div><div>python-stevedore - <a href="https://patchwork.openembedded.org/patch/153032/" target="_blank">https://patchwork.openembedded.org/patch/153032/</a><br></div><div><br></div><div>I think that's everything though my world python build is still going. Thanks for pointing the failures out and let me know if there are others. I'm guessing this will ripple through the python heavy layers; I found a couple yesterday in meta-iot-cloud.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jul 27, 2018 at 7:41 AM, Derek Straka <span dir="ltr"><<a href="mailto:derek@asterius.io" target="_blank">derek@asterius.io</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="auto">Yes. I was just waiting for my master build to wrap up.  </div><div class="m_-5987692737745477599HOEnZb"><div class="m_-5987692737745477599h5"><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" target="_blank">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/" rel="noreferrer" target="_blank">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" rel="noreferrer" target="_blank">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" rel="noreferrer" target="_blank">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" rel="noreferrer" target="_blank">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" rel="noreferrer" target="_blank">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" rel="noreferrer" target="_blank">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>
</div></div></blockquote></div><br></div>
</blockquote></div>