[oe] [meta-python][jethro][PATCH 4/4] python-cryptography: Error fix

Li Xin lixin.fnst at cn.fujitsu.com
Mon Jan 4 10:12:38 UTC 2016


python-cryptography depends on python-enum34 python-six python-pyasn1,
And will download modules enum34 six pyasn1 in the step of do_compile.
If your network is not very well,errors will occur as following:
  Download error on https://pypi.python.org/simple/enum34/:
  [Errno -5] No address associated with hostname -- Some packages may not be found!
  Couldn't find index page for 'enum34' (maybe misspelled?)

Signed-off-by: Li Xin <lixin.fnst at cn.fujitsu.com>
---
 .../recipes-devtools/python/python-cryptography_0.8.1.bb   | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/meta-python/recipes-devtools/python/python-cryptography_0.8.1.bb b/meta-python/recipes-devtools/python/python-cryptography_0.8.1.bb
index 41e4acd..d6ebbb7 100644
--- a/meta-python/recipes-devtools/python/python-cryptography_0.8.1.bb
+++ b/meta-python/recipes-devtools/python/python-cryptography_0.8.1.bb
@@ -38,6 +38,20 @@ RDEPENDS_${PN}-ptest = "\
 
 inherit ptest
 
+do_compile_prepend() {
+    install -d ${S}/.eggs
+    if [ -f ${STAGING_DIR_HOST}/${PYTHON_SITEPACKAGES_DIR}/enum34*.egg ]; then
+        cp ${STAGING_DIR_HOST}/${PYTHON_SITEPACKAGES_DIR}/enum34*.egg ${S}/.eggs/
+    fi
+
+    if [ -f ${STAGING_DIR_HOST}/${PYTHON_SITEPACKAGES_DIR}/pyasn1*.egg ]; then
+        cp ${STAGING_DIR_HOST}/${PYTHON_SITEPACKAGES_DIR}/pyasn1*.egg ${S}/.eggs/
+    fi
+
+    if [ -f ${STAGING_DIR_HOST}/${PYTHON_SITEPACKAGES_DIR}/six*.egg ]; then
+        cp ${STAGING_DIR_HOST}/${PYTHON_SITEPACKAGES_DIR}/six*.egg ${S}/.eggs/
+    fi
+}
 do_install_ptest() {
     install -d ${D}${PTEST_PATH}/tests
     cp -rf ${S}/tests/* ${D}${PTEST_PATH}/tests/
-- 
1.8.4.2






More information about the Openembedded-devel mailing list