<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 &lt;<a href="mailto:derek@asterius.io">derek@asterius.io</a>&gt; 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&#39;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&#39;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">&lt;<a href="mailto:derek@asterius.io" target="_blank">derek@asterius.io</a>&gt;</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 &lt;<a href="mailto:martin.jansa@gmail.com" target="_blank">martin.jansa@gmail.com</a>&gt; 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&#39;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 &#39;pbr&gt;=2.0.0&#39; 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 &#39;setuptools_scm&#39; 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 &#39;docutils&#39; distribution was not found and is required by the application<br></div><div><br></div><div>I&#39;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 &lt;<a href="mailto:hongxu.jia@windriver.com" rel="noreferrer" target="_blank">hongxu.jia@windriver.com</a>&gt; 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&#39;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&#39; for building. Please add its native recipe to DEPENDS.<br>
Traceback (most recent call last):<br>
  File &quot;setup.py&quot;, line 56, in &lt;module&gt;<br>
...<br>
<br>
The improvement is flexible for test_requirements argument (used at<br>
`setup.py test&#39;), where use easy_install also.<br>
<br>
[YOCTO #12084]<br>
Signed-off-by: Hongxu Jia &lt;<a href="mailto:hongxu.jia@windriver.com" rel="noreferrer" target="_blank">hongxu.jia@windriver.com</a>&gt;<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 ?= &quot;--prefix=${D}/${prefix} \<br>
  Â  Â --install-data=${D}/${datadir}&quot;<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 &lt;<a href="mailto:hongxu.jia@windriver.com" rel="noreferrer" target="_blank">hongxu.jia@windriver.com</a>&gt;<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 &lt;<a href="mailto:hongxu.jia@windriver.com" rel="noreferrer" target="_blank">hongxu.jia@windriver.com</a>&gt;<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(&#39;NO_FETCH_BUILD&#39;, None):<br>
++  Â  Â  Â  Â  Â  log.error(&quot;ERROR: Do not try to fetch `%s&#39; for building. &quot;<br>
++  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  &quot;Please add its native recipe to DEPENDS.&quot; % 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 = &quot;zip&quot;<br>
<br>
 inherit pypi<br>
<br>
+SRC_URI_append_class-native = &quot; file://0001-conditionally-do-not-fetch-code-by-easy_install.patch&quot;<br>
+<br>
 SRC_URI[md5sum] = &quot;260630ae1a64bafa39dcc53404d63829&quot;<br>
 SRC_URI[sha256sum] = &quot;012adb8e25fbfd64c652e99e7bab58799a3aaf05d39ab38561f69190a909015f&quot;<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>