diff --git a/meta-python/conf/include/ptest-packagelists-meta-python.inc b/meta-python/conf/include/ptest-packagelists-meta-python.inc index e4eae4ef43..3605026ff3 100644 --- a/meta-python/conf/include/ptest-packagelists-meta-python.inc +++ b/meta-python/conf/include/ptest-packagelists-meta-python.inc @@ -102,6 +102,7 @@ PTESTS_FAST_META_PYTHON = "\ python3-service-identity \ python3-setproctitle \ python3-simpleeval \ + python3-six \ python3-smpplib \ python3-soupsieve \ python3-sqlparse \ diff --git a/meta-python/recipes-devtools/python/python-six.inc b/meta-python/recipes-devtools/python/python-six.inc new file mode 100644 index 0000000000..f7a62b6068 --- /dev/null +++ b/meta-python/recipes-devtools/python/python-six.inc @@ -0,0 +1,11 @@ +SUMMARY = "Python 2 and 3 compatibility library" +HOMEPAGE = "https://pypi.org/project/six/" +SECTION = "devel/python" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=e50fab7e9501f3dfc920eafeb24b46ea" + +inherit pypi + +RDEPENDS:${PN} = "python3-io" + +BBCLASSEXTEND = "native nativesdk" diff --git a/meta-python/recipes-devtools/python/python3-six_1.17.0.bb b/meta-python/recipes-devtools/python/python3-six_1.17.0.bb new file mode 100644 index 0000000000..ca120e0308 --- /dev/null +++ b/meta-python/recipes-devtools/python/python3-six_1.17.0.bb @@ -0,0 +1,23 @@ +inherit setuptools3 ptest-python-pytest +require python-six.inc + +SRC_URI[sha256sum] = "ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81" + +PTEST_PYTEST_DIR = "." + +# test_six.py exercises the six.moves mappings, which import these stdlib +# modules that are packaged separately in oe-core. +RDEPENDS:${PN}-ptest += " \ + python3-html \ + python3-netclient \ + python3-xmlrpc \ +" + +do_install_ptest:append() { + # six ships its test at the sdist root; keep only test_six.py plus the + # generated run-ptest, and drop the packaged library sources / bytecode. + rm -f ${D}${PTEST_PATH}/six.py + rm -f ${D}${PTEST_PATH}/setup.py ${D}${PTEST_PATH}/setup.cfg ${D}${PTEST_PATH}/MANIFEST.in + rm -f ${D}${PTEST_PATH}/CHANGES ${D}${PTEST_PATH}/README.rst ${D}${PTEST_PATH}/PKG-INFO ${D}${PTEST_PATH}/LICENSE + rm -rf ${D}${PTEST_PATH}/build ${D}${PTEST_PATH}/documentation ${D}${PTEST_PATH}/six.egg-info ${D}${PTEST_PATH}/__pycache__ +}