diff options
Diffstat (limited to 'poky/meta/recipes-devtools/python')
45 files changed, 539 insertions, 407 deletions
diff --git a/poky/meta/recipes-devtools/python/files/0001-conditionally-do-not-fetch-code-by-easy_install.patch b/poky/meta/recipes-devtools/python/files/0001-conditionally-do-not-fetch-code-by-easy_install.patch index ee0a9dbb13..99c50e94cb 100644 --- a/poky/meta/recipes-devtools/python/files/0001-conditionally-do-not-fetch-code-by-easy_install.patch +++ b/poky/meta/recipes-devtools/python/files/0001-conditionally-do-not-fetch-code-by-easy_install.patch @@ -1,4 +1,4 @@ -From 6a5086619ee1c4bcebc7df622face11de6679255 Mon Sep 17 00:00:00 2001 +From d2633b49275b20e7acf724567fe0189aab25771e Mon Sep 17 00:00:00 2001 From: Hongxu Jia <hongxu.jia@windriver.com> Date: Tue, 17 Jul 2018 10:13:38 +0800 Subject: [PATCH] conditionally do not fetch code by easy_install @@ -15,11 +15,11 @@ Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> 1 file changed, 5 insertions(+) diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py -index bcbd4f5..6455afd 100644 +index 9ec83b7..7e97a07 100644 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py -@@ -653,6 +653,11 @@ class easy_install(Command): - os.path.exists(tmpdir) and rmtree(rmtree_safe(tmpdir)) +@@ -636,6 +636,11 @@ class easy_install(Command): + os.path.exists(tmpdir) and rmtree(tmpdir) def easy_install(self, spec, deps=False): + if os.environ.get('NO_FETCH_BUILD', None): diff --git a/poky/meta/recipes-devtools/python/python3-atomicwrites/run-ptest b/poky/meta/recipes-devtools/python/python3-atomicwrites/run-ptest new file mode 100644 index 0000000000..b63c4de0d9 --- /dev/null +++ b/poky/meta/recipes-devtools/python/python3-atomicwrites/run-ptest @@ -0,0 +1,3 @@ +#!/bin/sh + +pytest -o log_cli=true -o log_cli_level=INFO | sed -e 's/\[...%\]//g'| sed -e 's/PASSED/PASS/g'| sed -e 's/FAILED/FAIL/g'|sed -e 's/SKIPPED/SKIP/g'| awk '{if ($NF=="PASS" || $NF=="FAIL" || $NF=="SKIP" || $NF=="XFAIL" || $NF=="XPASS"){printf "%s: %s\n", $NF, $0}else{print}}'| awk '{if ($NF=="PASS" || $NF=="FAIL" || $NF=="SKIP" || $NF=="XFAIL" || $NF=="XPASS") {$NF="";print $0}else{print}}' diff --git a/poky/meta/recipes-devtools/python/python3-atomicwrites_1.4.0.bb b/poky/meta/recipes-devtools/python/python3-atomicwrites_1.4.0.bb new file mode 100644 index 0000000000..7edd41030f --- /dev/null +++ b/poky/meta/recipes-devtools/python/python3-atomicwrites_1.4.0.bb @@ -0,0 +1,25 @@ +DESCRIPTION = "Powerful Python library for atomic file writes" +HOMEPAGE = "https://github.com/untitaker/python-atomicwrites" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=91cc36cfafeefb7863673bcfcb1d4da4" + +SRC_URI[md5sum] = "b5cc15c8f9f180a48665f9aacf91d817" +SRC_URI[sha256sum] = "ae70396ad1a434f9c7046fd2dd196fc04b12f9e91ffb859164193be8b6168a7a" + +inherit pypi setuptools3 ptest + +SRC_URI += " \ + file://run-ptest \ +" + +RDEPENDS_${PN}-ptest += " \ + ${PYTHON_PN}-pytest \ + ${PYTHON_PN}-unixadmin \ +" + +do_install_ptest() { + install -d ${D}${PTEST_PATH}/tests + cp -rf ${S}/tests/* ${D}${PTEST_PATH}/tests/ +} + +RDEPENDS_${PN} = "${PYTHON_PN}-misc" diff --git a/poky/meta/recipes-devtools/python/python3-attrs_20.3.0.bb b/poky/meta/recipes-devtools/python/python3-attrs_20.3.0.bb new file mode 100644 index 0000000000..55cfda7180 --- /dev/null +++ b/poky/meta/recipes-devtools/python/python3-attrs_20.3.0.bb @@ -0,0 +1,20 @@ +DESCRIPTION = "Classes Without Boilerplate" +HOMEPAGE = "http://www.attrs.org/" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=d4ab25949a73fe7d4fdee93bcbdbf8ff" + +SRC_URI[sha256sum] = "832aa3cde19744e49938b91fea06d69ecb9e649c93ba974535d08ad92164f700" +SRC_URI[md5sum] = "4fe38f89297b2b446d83190fce189f29" + +inherit pypi setuptools3 + +RDEPENDS_${PN}_class-target += " \ + ${PYTHON_PN}-crypt \ + ${PYTHON_PN}-ctypes \ +" +RDEPENDS_${PN}_class-nativesdk += " \ + ${PYTHON_PN}-crypt \ + ${PYTHON_PN}-ctypes \ +" + +BBCLASSEXTEND = "native nativesdk" diff --git a/poky/meta/recipes-devtools/python/python3-git_3.1.7.bb b/poky/meta/recipes-devtools/python/python3-git_3.1.11.bb index 6d1fc4b653..7c636572f3 100644 --- a/poky/meta/recipes-devtools/python/python3-git_3.1.7.bb +++ b/poky/meta/recipes-devtools/python/python3-git_3.1.11.bb @@ -12,7 +12,7 @@ PYPI_PACKAGE = "GitPython" inherit pypi setuptools3 -SRC_URI[sha256sum] = "2db287d71a284e22e5c2846042d0602465c7434d910406990d5b74df4afb0858" +SRC_URI[sha256sum] = "befa4d101f91bad1b632df4308ec64555db684c360bd7d2130b4807d49ce86b8" DEPENDS += " ${PYTHON_PN}-gitdb" diff --git a/poky/meta/recipes-devtools/python/python3-hypothesis_5.41.4.bb b/poky/meta/recipes-devtools/python/python3-hypothesis_5.41.4.bb new file mode 100644 index 0000000000..416acc8d72 --- /dev/null +++ b/poky/meta/recipes-devtools/python/python3-hypothesis_5.41.4.bb @@ -0,0 +1,14 @@ +SUMMARY = "A library for property-based testing" +HOMEPAGE = "https://github.com/HypothesisWorks/hypothesis/tree/master/hypothesis-python" +LICENSE = "MPL-2.0" +LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=4ee62c16ebd0f4f99d906f36b7de8c3c" + +PYPI_PACKAGE = "hypothesis" + +inherit pypi setuptools3 + +SRC_URI[sha256sum] = "7ef22dd2ae4a906ef1e237dcd6806aa7f97e30c37f924a0e6d595f4639350b53" + +RDEPENDS_${PN} += "python3-core" + +BBCLASSEXTEND = "native nativesdk" diff --git a/poky/meta/recipes-devtools/python/python3-importlib-metadata_3.1.0.bb b/poky/meta/recipes-devtools/python/python3-importlib-metadata_3.1.0.bb new file mode 100644 index 0000000000..d89621bedd --- /dev/null +++ b/poky/meta/recipes-devtools/python/python3-importlib-metadata_3.1.0.bb @@ -0,0 +1,18 @@ +DESCRIPTION = "Read metadata from Python packages" +HOMEPAGE = "https://pypi.org/project/importlib-metadata/" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=e88ae122f3925d8bde8319060f2ddb8e" + +inherit pypi setuptools3 + +SRC_URI = "https://files.pythonhosted.org/packages/7d/d4/dbc58eed92be61bae65a7d80a7604d35bf6ded3e3c53c14f2d45b4a28831/importlib_metadata-3.1.0.tar.gz" +SRC_URI[sha256sum] = "d9b8a46a0885337627a6430db287176970fff18ad421becec1d64cfc763c2099" + +S = "${WORKDIR}/importlib_metadata-${PV}" + +DEPENDS += "${PYTHON_PN}-setuptools-scm-native" +RDEPENDS_${PN} += "${PYTHON_PN}-zipp ${PYTHON_PN}-pathlib2" +RDEPENDS_${PN}_append_class-target = " python3-misc" +RDEPENDS_${PN}_append_class-nativesdk = " python3-misc" + +BBCLASSEXTEND = "native nativesdk" diff --git a/poky/meta/recipes-devtools/python/python3-iniconfig_1.1.1.bb b/poky/meta/recipes-devtools/python/python3-iniconfig_1.1.1.bb new file mode 100644 index 0000000000..af4291bbf4 --- /dev/null +++ b/poky/meta/recipes-devtools/python/python3-iniconfig_1.1.1.bb @@ -0,0 +1,9 @@ +SUMMARY = "A small and simple INI-file parser module" + +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=a6bb0320b04a0a503f12f69fea479de9" + +SRC_URI[md5sum] = "0b7f3be87481211c183eae095bcea6f1" +SRC_URI[sha256sum] = "bc3af051d7d14b2ee5ef9969666def0cd1a000e121eaea580d4a313df4b37f32" + +inherit pypi setuptools3 diff --git a/poky/meta/recipes-devtools/python/python3-more-itertools/run-ptest b/poky/meta/recipes-devtools/python/python3-more-itertools/run-ptest new file mode 100644 index 0000000000..3385d68939 --- /dev/null +++ b/poky/meta/recipes-devtools/python/python3-more-itertools/run-ptest @@ -0,0 +1,3 @@ +#!/bin/sh + +pytest -o log_cli=true -o log_cli_level=INFO | sed -e 's/\[...%\]//g'| sed -e 's/PASSED/PASS/g'| sed -e 's/FAILED/FAIL/g'|sed -e 's/SKIPED/SKIP/g'| awk '{if ($NF=="PASS" || $NF=="FAIL" || $NF=="SKIP" || $NF=="XFAIL" || $NF=="XPASS"){printf "%s: %s\n", $NF, $0}else{print}}'| awk '{if ($NF=="PASS" || $NF=="FAIL" || $NF=="SKIP" || $NF=="XFAIL" || $NF=="XPASS") {$NF="";print $0}else{print}}' diff --git a/poky/meta/recipes-devtools/python/python3-more-itertools_8.6.0.bb b/poky/meta/recipes-devtools/python/python3-more-itertools_8.6.0.bb new file mode 100644 index 0000000000..ee5ce7ba9c --- /dev/null +++ b/poky/meta/recipes-devtools/python/python3-more-itertools_8.6.0.bb @@ -0,0 +1,23 @@ +DESCRIPTION = "More routines for operating on iterables, beyond itertools" +HOMEPAGE = "https://github.com/erikrose/more-itertools" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=3396ea30f9d21389d7857719816f83b5" + +SRC_URI[sha256sum] = "b3a9005928e5bed54076e6e549c792b306fddfe72b2d1d22dd63d42d5d3899cf" + +inherit pypi setuptools3 ptest + +SRC_URI += " \ + file://run-ptest \ +" + +RDEPENDS_${PN}-ptest += " \ + ${PYTHON_PN}-pytest \ +" + +do_install_ptest() { + install -d ${D}${PTEST_PATH}/tests + cp -rf ${S}/tests/* ${D}${PTEST_PATH}/tests/ +} + +BBCLASSEXTEND = "native nativesdk" diff --git a/poky/meta/recipes-devtools/python/python3-packaging_20.4.bb b/poky/meta/recipes-devtools/python/python3-packaging_20.4.bb new file mode 100644 index 0000000000..c75707e69c --- /dev/null +++ b/poky/meta/recipes-devtools/python/python3-packaging_20.4.bb @@ -0,0 +1,14 @@ +DESCRIPTION = "Core utilities for Python packages" +HOMEPAGE = "https://github.com/pypa/packaging" +LICENSE = "Apache-2.0 & BSD" +LIC_FILES_CHKSUM = "file://LICENSE;md5=faadaedca9251a90b205c9167578ce91" + +SRC_URI[md5sum] = "3208229da731c5d8e29d4d8941e75005" +SRC_URI[sha256sum] = "4357f74f47b9c12db93624a82154e9b120fa8293699949152b22065d556079f8" + +inherit pypi setuptools3 + +BBCLASSEXTEND = "native" + +DEPENDS += "${PYTHON_PN}-setuptools-scm-native" +RDEPENDS_${PN} += "${PYTHON_PN}-six ${PYTHON_PN}-pyparsing" diff --git a/poky/meta/recipes-devtools/python/python3-pathlib2_2.3.5.bb b/poky/meta/recipes-devtools/python/python3-pathlib2_2.3.5.bb new file mode 100644 index 0000000000..a022701ad0 --- /dev/null +++ b/poky/meta/recipes-devtools/python/python3-pathlib2_2.3.5.bb @@ -0,0 +1,13 @@ +DESCRIPTION = "Object-oriented filesystem paths" +HOMEPAGE = "https://github.com/mcmtroffaes/pathlib2" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE.rst;md5=042856c23a3e903b33bf361ea1cbe29a" + +SRC_URI[md5sum] = "f2bd0a363eb0f8fa0556f35c1d9e66fb" +SRC_URI[sha256sum] = "6cd9a47b597b37cc57de1c05e56fb1a1c9cc9fab04fe78c29acd090418529868" + +inherit pypi setuptools3 + +RDEPENDS_${PN} += "${PYTHON_PN}-six ${PYTHON_PN}-ctypes" + +BBCLASSEXTEND = "native nativesdk" diff --git a/poky/meta/recipes-devtools/python/python3-pluggy/run-ptest b/poky/meta/recipes-devtools/python/python3-pluggy/run-ptest new file mode 100644 index 0000000000..b63c4de0d9 --- /dev/null +++ b/poky/meta/recipes-devtools/python/python3-pluggy/run-ptest @@ -0,0 +1,3 @@ +#!/bin/sh + +pytest -o log_cli=true -o log_cli_level=INFO | sed -e 's/\[...%\]//g'| sed -e 's/PASSED/PASS/g'| sed -e 's/FAILED/FAIL/g'|sed -e 's/SKIPPED/SKIP/g'| awk '{if ($NF=="PASS" || $NF=="FAIL" || $NF=="SKIP" || $NF=="XFAIL" || $NF=="XPASS"){printf "%s: %s\n", $NF, $0}else{print}}'| awk '{if ($NF=="PASS" || $NF=="FAIL" || $NF=="SKIP" || $NF=="XFAIL" || $NF=="XPASS") {$NF="";print $0}else{print}}' diff --git a/poky/meta/recipes-devtools/python/python3-pluggy_0.13.1.bb b/poky/meta/recipes-devtools/python/python3-pluggy_0.13.1.bb new file mode 100644 index 0000000000..d3e0365ca1 --- /dev/null +++ b/poky/meta/recipes-devtools/python/python3-pluggy_0.13.1.bb @@ -0,0 +1,27 @@ +SUMMARY = "Plugin and hook calling mechanisms for python" +HOMEPAGE = "https://github.com/pytest-dev/pluggy" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=1c8206d16fd5cc02fa9b0bb98955e5c2" + +SRC_URI[md5sum] = "7f610e28b8b34487336b585a3dfb803d" +SRC_URI[sha256sum] = "15b2acde666561e1298d71b523007ed7364de07029219b604cf808bfa1c765b0" + +DEPENDS += "${PYTHON_PN}-setuptools-scm-native" +RDEPENDS_${PN} += "${PYTHON_PN}-importlib-metadata \ + ${PYTHON_PN}-more-itertools \ +" + +inherit pypi ptest setuptools3 + +SRC_URI += " \ + file://run-ptest \ +" + +RDEPENDS_${PN}-ptest += " \ + ${PYTHON_PN}-pytest \ +" + +do_install_ptest() { + install -d ${D}${PTEST_PATH}/testing + cp -rf ${S}/testing/* ${D}${PTEST_PATH}/testing/ +} diff --git a/poky/meta/recipes-devtools/python/python3-py_1.9.0.bb b/poky/meta/recipes-devtools/python/python3-py_1.9.0.bb new file mode 100644 index 0000000000..794ec2a87e --- /dev/null +++ b/poky/meta/recipes-devtools/python/python3-py_1.9.0.bb @@ -0,0 +1,15 @@ +SUMMARY = "Library with cross-python path, ini-parsing, io, code, log facilities" +HOMEPAGE = "http://py.readthedocs.io/" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=a6bb0320b04a0a503f12f69fea479de9" + +SRC_URI[md5sum] = "b80db4e61eef724f49feb4d20b649e62" +SRC_URI[sha256sum] = "9ca6883ce56b4e8da7e79ac18787889fa5206c79dcc67fb065376cd2fe03f342" + +DEPENDS += "${PYTHON_PN}-setuptools-scm-native" + +inherit pypi setuptools3 + +BBCLASSEXTEND = "native nativesdk" + +RDEPENDS_${PN} += "${PYTHON_PN}-netclient" diff --git a/poky/meta/recipes-devtools/python/python3-pycairo_1.19.1.bb b/poky/meta/recipes-devtools/python/python3-pycairo_1.20.0.bb index 34c8543bce..8987b7a428 100644 --- a/poky/meta/recipes-devtools/python/python3-pycairo_1.19.1.bb +++ b/poky/meta/recipes-devtools/python/python3-pycairo_1.20.0.bb @@ -13,12 +13,12 @@ DEPENDS = "cairo python3" SRC_URI = "https://github.com/pygobject/pycairo/releases/download/v${PV}/pycairo-${PV}.tar.gz" UPSTREAM_CHECK_URI = "https://github.com/pygobject/pycairo/releases/" -SRC_URI[md5sum] = "59bc5c5d1debc3af0f6791af9d612551" -SRC_URI[sha256sum] = "2c143183280feb67f5beb4e543fd49990c28e7df427301ede04fc550d3562e84" +SRC_URI[md5sum] = "a1f9b661a0000c2f42281db933284451" +SRC_URI[sha256sum] = "5695a10cb7f9ae0d01f665b56602a845b0a8cb17e2123bfece10c2e58552468c" S = "${WORKDIR}/pycairo-${PV}" -inherit meson pkgconfig +inherit meson pkgconfig python3targetconfig CFLAGS += "-fPIC" diff --git a/poky/meta/recipes-devtools/python/python3-pycryptodome_3.9.8.bb b/poky/meta/recipes-devtools/python/python3-pycryptodome_3.9.8.bb deleted file mode 100644 index 46e122072e..0000000000 --- a/poky/meta/recipes-devtools/python/python3-pycryptodome_3.9.8.bb +++ /dev/null @@ -1,5 +0,0 @@ -require python-pycryptodome.inc -inherit setuptools3 - -SRC_URI[sha256sum] = "0e24171cf01021bc5dc17d6a9d4f33a048f09d62cc3f62541e95ef104588bda4" - diff --git a/poky/meta/recipes-devtools/python/python3-pycryptodome_3.9.9.bb b/poky/meta/recipes-devtools/python/python3-pycryptodome_3.9.9.bb new file mode 100644 index 0000000000..1e84ce4df7 --- /dev/null +++ b/poky/meta/recipes-devtools/python/python3-pycryptodome_3.9.9.bb @@ -0,0 +1,5 @@ +require python-pycryptodome.inc +inherit setuptools3 + +SRC_URI[sha256sum] = "910e202a557e1131b1c1b3f17a63914d57aac55cf9fb9b51644962841c3995c4" + diff --git a/poky/meta/recipes-devtools/python/python3-pycryptodomex_3.9.8.bb b/poky/meta/recipes-devtools/python/python3-pycryptodomex_3.9.9.bb index 035c7fa636..abff71efdd 100644 --- a/poky/meta/recipes-devtools/python/python3-pycryptodomex_3.9.8.bb +++ b/poky/meta/recipes-devtools/python/python3-pycryptodomex_3.9.9.bb @@ -1,7 +1,7 @@ require python-pycryptodome.inc inherit setuptools3 -SRC_URI[sha256sum] = "48cc2cfc251f04a6142badeb666d1ff49ca6fdfc303fd72579f62b768aaa52b9" +SRC_URI[sha256sum] = "7b5b7c5896f8172ea0beb283f7f9428e0ab88ec248ce0a5b8c98d73e26267d51" FILES_${PN}-tests = " \ ${PYTHON_SITEPACKAGES_DIR}/Cryptodome/SelfTest/ \ diff --git a/poky/meta/recipes-devtools/python/python3-pyelftools_0.26.bb b/poky/meta/recipes-devtools/python/python3-pyelftools_0.27.bb index 575dfc4dc9..0cfd99504b 100644 --- a/poky/meta/recipes-devtools/python/python3-pyelftools_0.26.bb +++ b/poky/meta/recipes-devtools/python/python3-pyelftools_0.27.bb @@ -4,8 +4,7 @@ SECTION = "devel/python" LICENSE = "PD" LIC_FILES_CHKSUM = "file://LICENSE;md5=5ce2a2b07fca326bc7c146d10105ccfc" -SRC_URI[md5sum] = "0ba0de4b47127249c4d632ae299cb0e8" -SRC_URI[sha256sum] = "86ac6cee19f6c945e8dedf78c6ee74f1112bd14da5a658d8c9d4103aed5756a2" +SRC_URI[sha256sum] = "cde854e662774c5457d688ca41615f6594187ba7067af101232df889a6b7a66b" PYPI_PACKAGE = "pyelftools" diff --git a/poky/meta/recipes-devtools/python/python3-pygments_2.6.1.bb b/poky/meta/recipes-devtools/python/python3-pygments_2.7.2.bb index bffef59e69..00e5dc6e30 100644 --- a/poky/meta/recipes-devtools/python/python3-pygments_2.6.1.bb +++ b/poky/meta/recipes-devtools/python/python3-pygments_2.7.2.bb @@ -2,11 +2,10 @@ SUMMARY = "Pygments is a syntax highlighting package written in Python." DESCRIPTION = "Pygments is a syntax highlighting package written in Python." HOMEPAGE = "http://pygments.org/" LICENSE = "BSD-2-Clause" -LIC_FILES_CHKSUM = "file://LICENSE;md5=e1d7b7bffbfeaa14083fd2bd3236aea8" +LIC_FILES_CHKSUM = "file://LICENSE;md5=1f5d0c4cf38dfc8122c00d6f1a97a0cc" inherit setuptools3 -SRC_URI[md5sum] = "a48c5219de92f12c41acba814730b31a" -SRC_URI[sha256sum] = "647344a061c249a3b74e230c739f434d7ea4d8b1d5f3721bc0f3558049b38f44" +SRC_URI[sha256sum] = "381985fcc551eb9d37c52088a32914e00517e57f4a21609f48141ba08e193fa0" DEPENDS += "\ ${PYTHON_PN} \ diff --git a/poky/meta/recipes-devtools/python/python3-pygobject_3.36.1.bb b/poky/meta/recipes-devtools/python/python3-pygobject_3.38.0.bb index 0a34d4373f..b4427050f5 100644 --- a/poky/meta/recipes-devtools/python/python3-pygobject_3.36.1.bb +++ b/poky/meta/recipes-devtools/python/python3-pygobject_3.38.0.bb @@ -14,8 +14,7 @@ SRC_URI = " \ http://ftp.gnome.org/pub/GNOME/sources/${SRCNAME}/${@gnome_verdir("${PV}")}/${SRCNAME}-${PV}.tar.xz \ file://0001-Do-not-build-tests.patch \ " -SRC_URI[md5sum] = "ebfebc4533856572281add29f08412bf" -SRC_URI[sha256sum] = "d1bf42802d1cec113b5adaa0e7bf7f3745b44521dc2163588d276d5cd61d718f" +SRC_URI[sha256sum] = "0372d1bb9122fc19f500a249b1f38c2bb67485000f5887497b4b205b3e7084d5" UNKNOWN_CONFIGURE_WHITELIST = "introspection" @@ -27,7 +26,7 @@ RDEPENDS_${PN} += "python3-pkgutil" # python3-pycairo is checked on configuration -> DEPENDS # we don't link against python3-pycairo -> RDEPENDS -PACKAGECONFIG[cairo] = "-Dpycairo=true,-Dpycairo=false, cairo python3-pycairo, python3-pycairo" +PACKAGECONFIG[cairo] = "-Dpycairo=enabled,-Dpycairo=disabled, cairo python3-pycairo, python3-pycairo" BBCLASSEXTEND = "native" PACKAGECONFIG_class-native = "" diff --git a/poky/meta/recipes-devtools/python/python3-pytest/0001-setup.py-remove-the-setup_requires-for-setuptools-scm.patch b/poky/meta/recipes-devtools/python/python3-pytest/0001-setup.py-remove-the-setup_requires-for-setuptools-scm.patch new file mode 100644 index 0000000000..8c5c17247e --- /dev/null +++ b/poky/meta/recipes-devtools/python/python3-pytest/0001-setup.py-remove-the-setup_requires-for-setuptools-scm.patch @@ -0,0 +1,39 @@ +From ff784f4803ab33f5e3389e40d038d52d1e211843 Mon Sep 17 00:00:00 2001 +From: Yuan Chao <yuanc.fnst@cn.fujitsu.com> +Date: Wed, 28 Aug 2019 16:12:27 +0900 +Subject: [PATCH] [PATCH] setup.py: remove the setup_requires for + setuptools-scm + +The setup_requires argument forces the download of the egg file for setuptools-scm +during the do_compile phase. This download is incompatible with the typical fetch +and mirror structure. The only usage of scm is the generation of the _version.py +file and in the release tarball it is already correctly created + +Upstream-Status: Inappropriate [oe specific] + +Signed-off-by: Derek Straka <derek@asterius.io> + +Signed-off-by: Yuan Chao <yuanc.fnst@cn.fujitsu.com> + +Rebase for pytest 6.1.0. + +Signed-off-by: Kai Kang <kai.kang@windriver.com> +--- + setup.cfg | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/setup.cfg b/setup.cfg +index 60f6564..c4d1471 100644 +--- a/setup.cfg ++++ b/setup.cfg +@@ -55,7 +55,6 @@ package_dir = + =src + setup_requires = + setuptools>=40.0 +- setuptools-scm + zip_safe = no + + [options.entry_points] +-- +2.17.1 + diff --git a/poky/meta/recipes-devtools/python/python3-pytest_6.1.2.bb b/poky/meta/recipes-devtools/python/python3-pytest_6.1.2.bb new file mode 100644 index 0000000000..6fc3b6f328 --- /dev/null +++ b/poky/meta/recipes-devtools/python/python3-pytest_6.1.2.bb @@ -0,0 +1,39 @@ +SUMMARY = "Simple powerful testing with python" + +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=81eb9f71d006c6b268cf4388e3c98f7b" + +SRC_URI_append = " file://0001-setup.py-remove-the-setup_requires-for-setuptools-scm.patch " + +SRC_URI[sha256sum] = "c0a7e94a8cdbc5422a51ccdad8e6f1024795939cc89159a0ae7f0b316ad3823e" + +inherit update-alternatives pypi setuptools3 + +RDEPENDS_${PN}_class-target += " \ + ${PYTHON_PN}-atomicwrites \ + ${PYTHON_PN}-attrs \ + ${PYTHON_PN}-debugger \ + ${PYTHON_PN}-doctest \ + ${PYTHON_PN}-importlib-metadata \ + ${PYTHON_PN}-iniconfig \ + ${PYTHON_PN}-json \ + ${PYTHON_PN}-more-itertools \ + ${PYTHON_PN}-packaging \ + ${PYTHON_PN}-pathlib2 \ + ${PYTHON_PN}-pluggy \ + ${PYTHON_PN}-py \ + ${PYTHON_PN}-setuptools \ + ${PYTHON_PN}-six \ + ${PYTHON_PN}-toml \ + ${PYTHON_PN}-wcwidth \ +" + +ALTERNATIVE_${PN} += "py.test pytest" + +NATIVE_LINK_NAME[pytest] = "${bindir}/pytest" +ALTERNATIVE_TARGET[pytest] = "${bindir}/pytest" + +ALTERNATIVE_LINK_NAME[py.test] = "${bindir}/py.test" +ALTERNATIVE_TARGET[py.test] = "${bindir}/py.test" + +BBCLASSEXTEND = "native nativesdk" diff --git a/poky/meta/recipes-devtools/python/python3-setuptools-scm_4.1.2.bb b/poky/meta/recipes-devtools/python/python3-setuptools-scm_4.1.2.bb new file mode 100644 index 0000000000..4ebbac6b65 --- /dev/null +++ b/poky/meta/recipes-devtools/python/python3-setuptools-scm_4.1.2.bb @@ -0,0 +1,21 @@ +SUMMARY = "the blessed package to manage your versions by scm tags" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://PKG-INFO;beginline=8;endline=8;md5=8227180126797a0148f94f483f3e1489" + +SRC_URI[md5sum] = "e6c9fad17c90516d640868eb833d5150" +SRC_URI[sha256sum] = "a8994582e716ec690f33fec70cca0f85bd23ec974e3f783233e4879090a7faa8" + +PYPI_PACKAGE = "setuptools_scm" +inherit pypi setuptools3 + +RDEPENDS_${PN} = "\ + ${PYTHON_PN}-debugger \ + ${PYTHON_PN}-json \ + ${PYTHON_PN}-py \ + ${PYTHON_PN}-setuptools \ +" +RDEPENDS_${PN}_class-native = "\ + ${PYTHON_PN}-setuptools-native \ +" + +BBCLASSEXTEND = "native nativesdk" diff --git a/poky/meta/recipes-devtools/python/python3-setuptools_49.6.0.bb b/poky/meta/recipes-devtools/python/python3-setuptools_50.3.2.bb index 360128b116..4480d56775 100644 --- a/poky/meta/recipes-devtools/python/python3-setuptools_49.6.0.bb +++ b/poky/meta/recipes-devtools/python/python3-setuptools_50.3.2.bb @@ -12,7 +12,7 @@ SRC_URI_append_class-native = " file://0001-conditionally-do-not-fetch-code-by-e SRC_URI += "file://0001-change-shebang-to-python3.patch" -SRC_URI[sha256sum] = "46bd862894ed22c2edff033c758c2dc026324788d758e96788e8f7c11f4e9707" +SRC_URI[sha256sum] = "ed0519d27a243843b05d82a5e9d01b0b083d9934eaa3d02779a23da18077bd3c" DEPENDS += "${PYTHON_PN}" diff --git a/poky/meta/recipes-devtools/python/python3-sortedcontainers_2.3.0.bb b/poky/meta/recipes-devtools/python/python3-sortedcontainers_2.3.0.bb new file mode 100644 index 0000000000..6060c03723 --- /dev/null +++ b/poky/meta/recipes-devtools/python/python3-sortedcontainers_2.3.0.bb @@ -0,0 +1,9 @@ +SUMMARY = "Sorted Containers is an Apache2 licensed sorted collections library, written in pure-Python, and fast as C-extensions." +HOMEPAGE = "http://www.grantjenks.com/docs/sortedcontainers/" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=7c7c6a1a12ec816da16c1839137d53ae" + +inherit pypi setuptools3 +SRC_URI[sha256sum] = "59cc937650cf60d677c16775597c89a960658a09cf7c1a668f86e1e4464b10a1" + +BBCLASSEXTEND = "native nativesdk" diff --git a/poky/meta/recipes-devtools/python/python3-toml_0.10.2.bb b/poky/meta/recipes-devtools/python/python3-toml_0.10.2.bb new file mode 100644 index 0000000000..b46eba6fd1 --- /dev/null +++ b/poky/meta/recipes-devtools/python/python3-toml_0.10.2.bb @@ -0,0 +1,15 @@ +SUMMARY = "Python Library for Tom's Obvious, Minimal Language" +HOMEPAGE = "https://github.com/uiri/toml" +LICENSE = "MIT" +SECTION = "devel/python" +LIC_FILES_CHKSUM = "file://LICENSE;md5=16c77b2b1050d2f03cb9c2ed0edaf4f0" + +SRC_URI[sha256sum] = "b3bda1d108d5dd99f4a20d24d9c348e91c4db7ab1b749200bded2f839ccbe68f" + +inherit pypi setuptools3 + +BBCLASSEXTEND = "native nativesdk" + +RDEPENDS_${PN} += " \ + ${PYTHON_PN}-misc \ +" diff --git a/poky/meta/recipes-devtools/python/python3-wcwidth/run-ptest b/poky/meta/recipes-devtools/python/python3-wcwidth/run-ptest new file mode 100644 index 0000000000..b63c4de0d9 --- /dev/null +++ b/poky/meta/recipes-devtools/python/python3-wcwidth/run-ptest @@ -0,0 +1,3 @@ +#!/bin/sh + +pytest -o log_cli=true -o log_cli_level=INFO | sed -e 's/\[...%\]//g'| sed -e 's/PASSED/PASS/g'| sed -e 's/FAILED/FAIL/g'|sed -e 's/SKIPPED/SKIP/g'| awk '{if ($NF=="PASS" || $NF=="FAIL" || $NF=="SKIP" || $NF=="XFAIL" || $NF=="XPASS"){printf "%s: %s\n", $NF, $0}else{print}}'| awk '{if ($NF=="PASS" || $NF=="FAIL" || $NF=="SKIP" || $NF=="XFAIL" || $NF=="XPASS") {$NF="";print $0}else{print}}' diff --git a/poky/meta/recipes-devtools/python/python3-wcwidth_0.2.5.bb b/poky/meta/recipes-devtools/python/python3-wcwidth_0.2.5.bb new file mode 100644 index 0000000000..bb4aae2e86 --- /dev/null +++ b/poky/meta/recipes-devtools/python/python3-wcwidth_0.2.5.bb @@ -0,0 +1,25 @@ +SUMMARY = "Library for building powerful interactive command lines in Python" +DESCRIPTION = "Measures the displayed width of unicode strings in a terminal" +HOMEPAGE = "https://github.com/jquast/wcwidth" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=b15979c39a2543892fca8cd86b4b52cb" + +SRC_URI[md5sum] = "a07a75f99d316e14838ac760c831ea37" +SRC_URI[sha256sum] = "c4d647b99872929fdb7bdcaa4fbe7f01413ed3d98077df798530e5b04f116c83" + +inherit pypi setuptools3 ptest + +SRC_URI += " \ + file://run-ptest \ +" + +RDEPENDS_${PN}-ptest += " \ + ${PYTHON_PN}-pytest \ +" + +do_install_ptest() { + install -d ${D}${PTEST_PATH}/tests + cp -rf ${S}/tests/* ${D}${PTEST_PATH}/tests/ +} + +BBCLASSEXTEND = "native nativesdk" diff --git a/poky/meta/recipes-devtools/python/python3-zipp_3.4.0.bb b/poky/meta/recipes-devtools/python/python3-zipp_3.4.0.bb new file mode 100644 index 0000000000..97523e8e7c --- /dev/null +++ b/poky/meta/recipes-devtools/python/python3-zipp_3.4.0.bb @@ -0,0 +1,19 @@ +DESCRIPTION = "Backport of pathlib-compatible object wrapper for zip files" +HOMEPAGE = "https://github.com/jaraco/zipp" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=7a7126e068206290f3fe9f8d6c713ea6" + +SRC_URI[md5sum] = "ae81f228995578b840d76d1b7d87fede" +SRC_URI[sha256sum] = "ed5eee1974372595f9e416cc7bbeeb12335201d8081ca8a0743c954d4446e5cb" + +DEPENDS += "${PYTHON_PN}-setuptools-scm-native" + +inherit pypi setuptools3 + +DEPENDS += "${PYTHON_PN}-toml-native" + +RDEPENDS_${PN} += "${PYTHON_PN}-compression \ + ${PYTHON_PN}-math \ + ${PYTHON_PN}-more-itertools" + +BBCLASSEXTEND = "native nativesdk" diff --git a/poky/meta/recipes-devtools/python/python3/0001-Do-not-hardcode-lib-as-location-for-site-packages-an.patch b/poky/meta/recipes-devtools/python/python3/0001-Do-not-hardcode-lib-as-location-for-site-packages-an.patch deleted file mode 100644 index 112c979441..0000000000 --- a/poky/meta/recipes-devtools/python/python3/0001-Do-not-hardcode-lib-as-location-for-site-packages-an.patch +++ /dev/null @@ -1,214 +0,0 @@ -From a078b6ff1492e848ad1055764fb9a414abaf3e12 Mon Sep 17 00:00:00 2001 -From: Alexander Kanavin <alex.kanavin@gmail.com> -Date: Tue, 5 Feb 2019 15:52:02 +0100 -Subject: [PATCH] Do not hardcode "lib" as location for modules, site-packages - and lib-dynload - -Upstream-Status: Inappropriate [oe-core specific] -Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> - ---- - Include/pythonrun.h | 2 ++ - Lib/site.py | 4 ++-- - Makefile.pre.in | 5 +++-- - Modules/getpath.c | 22 ++++++++++++++-------- - Python/getplatform.c | 10 ++++++++++ - Python/sysmodule.c | 2 ++ - 6 files changed, 33 insertions(+), 12 deletions(-) - -diff --git a/Include/pythonrun.h b/Include/pythonrun.h -index 46091e0..61b2e15 100644 ---- a/Include/pythonrun.h -+++ b/Include/pythonrun.h -@@ -7,6 +7,8 @@ - extern "C" { - #endif - -+PyAPI_FUNC(const char *) Py_GetLib(void); -+ - #ifndef Py_LIMITED_API - PyAPI_FUNC(int) PyRun_SimpleStringFlags(const char *, PyCompilerFlags *); - PyAPI_FUNC(int) PyRun_AnyFileExFlags( -diff --git a/Lib/site.py b/Lib/site.py -index a065ab0..1d720ef 100644 ---- a/Lib/site.py -+++ b/Lib/site.py -@@ -335,12 +335,12 @@ def getsitepackages(prefixes=None): - seen.add(prefix) - - if os.sep == '/': -- sitepackages.append(os.path.join(prefix, "lib", -+ sitepackages.append(os.path.join(prefix, sys.lib, - "python%d.%d" % sys.version_info[:2], - "site-packages")) - else: - sitepackages.append(prefix) -- sitepackages.append(os.path.join(prefix, "lib", "site-packages")) -+ sitepackages.append(os.path.join(prefix, sys.lib, "site-packages")) - return sitepackages - - def addsitepackages(known_paths, prefixes=None): -diff --git a/Makefile.pre.in b/Makefile.pre.in -index 65665df..be49140 100644 ---- a/Makefile.pre.in -+++ b/Makefile.pre.in -@@ -143,7 +143,7 @@ LIBDIR= @libdir@ - MANDIR= @mandir@ - INCLUDEDIR= @includedir@ - CONFINCLUDEDIR= $(exec_prefix)/include --SCRIPTDIR= $(prefix)/lib -+SCRIPTDIR= @libdir@ - ABIFLAGS= @ABIFLAGS@ - - # Detailed destination directories -@@ -753,6 +753,7 @@ Modules/getpath.o: $(srcdir)/Modules/getpath.c Makefile - -DEXEC_PREFIX='"$(exec_prefix)"' \ - -DVERSION='"$(VERSION)"' \ - -DVPATH='"$(VPATH)"' \ -+ -DLIB='"$(LIB)"' \ - -o $@ $(srcdir)/Modules/getpath.c - - Programs/python.o: $(srcdir)/Programs/python.c -@@ -868,7 +869,7 @@ regen-symbol: $(srcdir)/Include/graminit.h - Python/compile.o Python/symtable.o Python/ast_unparse.o Python/ast.o Python/future.o Parser/parsetok.o: $(srcdir)/Include/graminit.h $(srcdir)/Include/Python-ast.h - - Python/getplatform.o: $(srcdir)/Python/getplatform.c -- $(CC) -c $(PY_CORE_CFLAGS) -DPLATFORM='"$(MACHDEP)"' -o $@ $(srcdir)/Python/getplatform.c -+ $(CC) -c $(PY_CORE_CFLAGS) -DPLATFORM='"$(MACHDEP)"' -DLIB='"$(LIB)"' -o $@ $(srcdir)/Python/getplatform.c - - Python/importdl.o: $(srcdir)/Python/importdl.c - $(CC) -c $(PY_CORE_CFLAGS) -I$(DLINCLDIR) -o $@ $(srcdir)/Python/importdl.c -diff --git a/Modules/getpath.c b/Modules/getpath.c -index b727f66..c003e46 100644 ---- a/Modules/getpath.c -+++ b/Modules/getpath.c -@@ -128,6 +128,7 @@ typedef struct { - wchar_t *exec_prefix; /* EXEC_PREFIX macro */ - - wchar_t *lib_python; /* "lib/pythonX.Y" */ -+ wchar_t *multilib_python; /* "lib[suffix]/pythonX.Y" */ - - int prefix_found; /* found platform independent libraries? */ - int exec_prefix_found; /* found the platform dependent libraries? */ -@@ -386,7 +387,7 @@ search_for_prefix(PyCalculatePath *calculate, _PyPathConfig *pathconfig, - if (delim) { - *delim = L'\0'; - } -- status = joinpath(prefix, calculate->lib_python, prefix_len); -+ status = joinpath(prefix, calculate->multilib_python, prefix_len); - if (_PyStatus_EXCEPTION(status)) { - return status; - } -@@ -444,7 +445,7 @@ search_for_prefix(PyCalculatePath *calculate, _PyPathConfig *pathconfig, - do { - /* Path: <argv0_path or substring> / <lib_python> / LANDMARK */ - size_t n = wcslen(prefix); -- status = joinpath(prefix, calculate->lib_python, prefix_len); -+ status = joinpath(prefix, calculate->multilib_python, prefix_len); - if (_PyStatus_EXCEPTION(status)) { - return status; - } -@@ -467,7 +468,7 @@ search_for_prefix(PyCalculatePath *calculate, _PyPathConfig *pathconfig, - if (safe_wcscpy(prefix, calculate->prefix, prefix_len) < 0) { - return PATHLEN_ERR(); - } -- status = joinpath(prefix, calculate->lib_python, prefix_len); -+ status = joinpath(prefix, calculate->multilib_python, prefix_len); - if (_PyStatus_EXCEPTION(status)) { - return status; - } -@@ -510,7 +511,7 @@ calculate_prefix(PyCalculatePath *calculate, _PyPathConfig *pathconfig, - if (safe_wcscpy(prefix, calculate->prefix, prefix_len) < 0) { - return PATHLEN_ERR(); - } -- status = joinpath(prefix, calculate->lib_python, prefix_len); -+ status = joinpath(prefix, calculate->multilib_python, prefix_len); - if (_PyStatus_EXCEPTION(status)) { - return status; - } -@@ -635,7 +636,7 @@ search_for_exec_prefix(PyCalculatePath *calculate, _PyPathConfig *pathconfig, - return PATHLEN_ERR(); - } - } -- status = joinpath(exec_prefix, calculate->lib_python, exec_prefix_len); -+ status = joinpath(exec_prefix, calculate->multilib_python, exec_prefix_len); - if (_PyStatus_EXCEPTION(status)) { - return status; - } -@@ -667,7 +668,7 @@ search_for_exec_prefix(PyCalculatePath *calculate, _PyPathConfig *pathconfig, - do { - /* Path: <argv0_path or substring> / <lib_python> / "lib-dynload" */ - size_t n = wcslen(exec_prefix); -- status = joinpath(exec_prefix, calculate->lib_python, exec_prefix_len); -+ status = joinpath(exec_prefix, calculate->multilib_python, exec_prefix_len); - if (_PyStatus_EXCEPTION(status)) { - return status; - } -@@ -689,7 +690,7 @@ search_for_exec_prefix(PyCalculatePath *calculate, _PyPathConfig *pathconfig, - if (safe_wcscpy(exec_prefix, calculate->exec_prefix, exec_prefix_len) < 0) { - return PATHLEN_ERR(); - } -- status = joinpath(exec_prefix, calculate->lib_python, exec_prefix_len); -+ status = joinpath(exec_prefix, calculate->multilib_python, exec_prefix_len); - if (_PyStatus_EXCEPTION(status)) { - return status; - } -@@ -928,7 +929,7 @@ calculate_argv0_path(PyCalculatePath *calculate, const wchar_t *program_full_pat - return PATHLEN_ERR(); - } - reduce(argv0_path); -- status = joinpath(argv0_path, calculate->lib_python, argv0_path_len); -+ status = joinpath(argv0_path, calculate->multilib_python, argv0_path_len); - if (_PyStatus_EXCEPTION(status)) { - PyMem_RawFree(wbuf); - return status; -@@ -1201,6 +1202,10 @@ calculate_init(PyCalculatePath *calculate, const PyConfig *config) - if (!calculate->lib_python) { - return DECODE_LOCALE_ERR("EXEC_PREFIX define", len); - } -+ calculate->multilib_python = Py_DecodeLocale(LIB "/python" VERSION, &len); -+ if (!calculate->multilib_python) { -+ return DECODE_LOCALE_ERR("EXEC_PREFIX define", len); -+ } - - calculate->warnings = config->pathconfig_warnings; - calculate->pythonpath_env = config->pythonpath_env; -@@ -1216,6 +1221,7 @@ calculate_free(PyCalculatePath *calculate) - PyMem_RawFree(calculate->prefix); - PyMem_RawFree(calculate->exec_prefix); - PyMem_RawFree(calculate->lib_python); -+ PyMem_RawFree(calculate->multilib_python); - PyMem_RawFree(calculate->path_env); - } - -diff --git a/Python/getplatform.c b/Python/getplatform.c -index 81a0f7a..d55396b 100644 ---- a/Python/getplatform.c -+++ b/Python/getplatform.c -@@ -10,3 +10,13 @@ Py_GetPlatform(void) - { - return PLATFORM; - } -+ -+#ifndef LIB -+#define LIB "lib" -+#endif -+ -+const char * -+Py_GetLib(void) -+{ -+ return LIB; -+} -diff --git a/Python/sysmodule.c b/Python/sysmodule.c -index 5b0fb81..0dce754 100644 ---- a/Python/sysmodule.c -+++ b/Python/sysmodule.c -@@ -2668,6 +2668,8 @@ _PySys_InitCore(_PyRuntimeState *runtime, PyInterpreterState *interp, - PyUnicode_FromString(Py_GetCopyright())); - SET_SYS_FROM_STRING("platform", - PyUnicode_FromString(Py_GetPlatform())); -+ SET_SYS_FROM_STRING("lib", -+ PyUnicode_FromString(Py_GetLib())); - SET_SYS_FROM_STRING("maxsize", - PyLong_FromSsize_t(PY_SSIZE_T_MAX)); - SET_SYS_FROM_STRING("float_info", diff --git a/poky/meta/recipes-devtools/python/python3/0001-Don-t-search-system-for-headers-libraries.patch b/poky/meta/recipes-devtools/python/python3/0001-Don-t-search-system-for-headers-libraries.patch index 3e471b9a49..a94fa0a5a9 100644 --- a/poky/meta/recipes-devtools/python/python3/0001-Don-t-search-system-for-headers-libraries.patch +++ b/poky/meta/recipes-devtools/python/python3/0001-Don-t-search-system-for-headers-libraries.patch @@ -1,4 +1,4 @@ -From b880e78bf4a1852e260188e6df3ec6034403d2fc Mon Sep 17 00:00:00 2001 +From 9da913bf5f39c6fe737219af7419170574d6fbfb Mon Sep 17 00:00:00 2001 From: Jeremy Puhlman <jpuhlman@mvista.com> Date: Wed, 4 Mar 2020 00:06:42 +0000 Subject: [PATCH] Don't search system for headers/libraries @@ -11,7 +11,7 @@ Signed-off-by: Jeremy Puhlman <jpuhlman@mvista.com> 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py -index 7208cd0..c0bd0ad 100644 +index a0bf9ea..da099bf 100644 --- a/setup.py +++ b/setup.py @@ -674,8 +674,8 @@ class PyBuildExt(build_ext): diff --git a/poky/meta/recipes-devtools/python/python3/0001-Lib-sysconfig.py-fix-another-place-where-lib-is-hard.patch b/poky/meta/recipes-devtools/python/python3/0001-Lib-sysconfig.py-use-libdir-values-from-configuratio.patch index b97583682a..1490cdbb18 100644 --- a/poky/meta/recipes-devtools/python/python3/0001-Lib-sysconfig.py-fix-another-place-where-lib-is-hard.patch +++ b/poky/meta/recipes-devtools/python/python3/0001-Lib-sysconfig.py-use-libdir-values-from-configuratio.patch @@ -1,27 +1,28 @@ -From a21f4f8fa5e5c0601898740b4ac08ec84f41e190 Mon Sep 17 00:00:00 2001 +From deeedd1b8799294ab276ab7dbbfdb59c1dacc9a2 Mon Sep 17 00:00:00 2001 From: Alexander Kanavin <alex.kanavin@gmail.com> -Date: Thu, 18 Apr 2019 17:11:06 +0200 -Subject: [PATCH] Lib/sysconfig.py: fix another place where 'lib' is hardcoded - as the library path +Date: Thu, 22 Oct 2020 13:10:34 +0200 +Subject: [PATCH] Lib/sysconfig.py: use libdir values from configuration file + +This allows correctly substituting them for target installs using +native python. -Upstream-Status: Inappropriate [oe-core specific] Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> --- Lib/sysconfig.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Lib/sysconfig.py b/Lib/sysconfig.py -index d15cec8..87fa5e6 100644 +index bf04ac5..ed0462b 100644 --- a/Lib/sysconfig.py +++ b/Lib/sysconfig.py @@ -20,10 +20,10 @@ __all__ = [ _INSTALL_SCHEMES = { 'posix_prefix': { -- 'stdlib': '{installed_base}/lib/python{py_version_short}', -- 'platstdlib': '{platbase}/lib/python{py_version_short}', +- 'stdlib': '{installed_base}/{platlibdir}/python{py_version_short}', +- 'platstdlib': '{platbase}/{platlibdir}/python{py_version_short}', - 'purelib': '{base}/lib/python{py_version_short}/site-packages', -- 'platlib': '{platbase}/lib/python{py_version_short}/site-packages', +- 'platlib': '{platbase}/{platlibdir}/python{py_version_short}/site-packages', + 'stdlib': '{LIBDEST}', + 'platstdlib': '{LIBDEST}', + 'purelib': '{LIBDEST}/site-packages', @@ -29,3 +30,6 @@ index d15cec8..87fa5e6 100644 'include': '{installed_base}/include/python{py_version_short}{abiflags}', 'platinclude': +-- +2.24.0 + diff --git a/poky/meta/recipes-devtools/python/python3/0001-Use-FLAG_REF-always-for-interned-strings.patch b/poky/meta/recipes-devtools/python/python3/0001-Use-FLAG_REF-always-for-interned-strings.patch index 957839bf3e..793385de91 100644 --- a/poky/meta/recipes-devtools/python/python3/0001-Use-FLAG_REF-always-for-interned-strings.patch +++ b/poky/meta/recipes-devtools/python/python3/0001-Use-FLAG_REF-always-for-interned-strings.patch @@ -1,19 +1,20 @@ -From 6c8ea7c1dacd42f3ba00440231ec0e6b1a38300d Mon Sep 17 00:00:00 2001 +From 9f63e83b1cec872917647b11155edaffe399d103 Mon Sep 17 00:00:00 2001 From: Inada Naoki <songofacandy@gmail.com> Date: Sat, 14 Jul 2018 00:46:11 +0900 Subject: [PATCH] Use FLAG_REF always for interned strings Upstream-Status: Submitted [https://github.com/python/cpython/pull/8226] Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> + --- Python/marshal.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Python/marshal.c b/Python/marshal.c -index 6d06266c6a..51db2e3b2e 100644 +index c4538bd..2437160 100644 --- a/Python/marshal.c +++ b/Python/marshal.c -@@ -275,9 +275,14 @@ w_ref(PyObject *v, char *flag, WFILE *p) +@@ -298,9 +298,14 @@ w_ref(PyObject *v, char *flag, WFILE *p) if (p->version < 3 || p->hashtable == NULL) return 0; /* not writing object references */ @@ -28,8 +29,5 @@ index 6d06266c6a..51db2e3b2e 100644 return 0; + } - entry = _Py_HASHTABLE_GET_ENTRY(p->hashtable, v); + entry = _Py_hashtable_get_entry(p->hashtable, v); if (entry != NULL) { --- -2.21.0 - diff --git a/poky/meta/recipes-devtools/python/python3/0001-configure.ac-fix-LIBPL.patch b/poky/meta/recipes-devtools/python/python3/0001-configure.ac-fix-LIBPL.patch deleted file mode 100644 index 123ce3a2dc..0000000000 --- a/poky/meta/recipes-devtools/python/python3/0001-configure.ac-fix-LIBPL.patch +++ /dev/null @@ -1,35 +0,0 @@ -From acce3d441e7eadadd2d3ce38654155dc43f1f607 Mon Sep 17 00:00:00 2001 -From: Changqing Li <changqing.li@windriver.com> -Date: Fri, 7 Feb 2020 09:36:25 +0800 -Subject: [PATCH] configure.ac: fix LIBPL - -Use LIBDIR rather than prefix/lib, so that it would work when lib64. - -Upstream-Status: Inappropriate [oe-core specific] - -Signed-off-by: Robert Yang <liezhi.yang@windriver.com> -Signed-off-by: Li Zhou <li.zhou@windriver.c> -Signed-off-by: Changqing Li <changqing.li@windriver.com> ---- - configure.ac | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/configure.ac b/configure.ac -index ce04258..915f475 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -4532,9 +4532,9 @@ fi - dnl define LIBPL after ABIFLAGS and LDVERSION is defined. - AC_SUBST(PY_ENABLE_SHARED) - if test x$PLATFORM_TRIPLET = x; then -- LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}" -+ LIBPL='$(LIBDIR)'"/python${VERSION}/config-${LDVERSION}" - else -- LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}-${PLATFORM_TRIPLET}" -+ LIBPL='$(LIBDIR)'"/python${VERSION}/config-${LDVERSION}-${PLATFORM_TRIPLET}" - fi - AC_SUBST(LIBPL) - --- -2.7.4 - diff --git a/poky/meta/recipes-devtools/python/python3/0001-distutils-sysconfig-append-STAGING_LIBDIR-python-sys.patch b/poky/meta/recipes-devtools/python/python3/0001-distutils-sysconfig-append-STAGING_LIBDIR-python-sys.patch index 2b68c0acc2..b982691b36 100644 --- a/poky/meta/recipes-devtools/python/python3/0001-distutils-sysconfig-append-STAGING_LIBDIR-python-sys.patch +++ b/poky/meta/recipes-devtools/python/python3/0001-distutils-sysconfig-append-STAGING_LIBDIR-python-sys.patch @@ -1,4 +1,4 @@ -From bc59d49efff41051034d7fbf5d0c8505e4c3134b Mon Sep 17 00:00:00 2001 +From e65bfe22c858872b08366aff49119d4145a77f40 Mon Sep 17 00:00:00 2001 From: Alexander Kanavin <alex.kanavin@gmail.com> Date: Thu, 31 Jan 2019 16:46:30 +0100 Subject: [PATCH] distutils/sysconfig: append diff --git a/poky/meta/recipes-devtools/python/python3/0001-python3-Do-not-hardcode-lib-for-distutils.patch b/poky/meta/recipes-devtools/python/python3/0001-python3-Do-not-hardcode-lib-for-distutils.patch deleted file mode 100644 index fe031b9983..0000000000 --- a/poky/meta/recipes-devtools/python/python3/0001-python3-Do-not-hardcode-lib-for-distutils.patch +++ /dev/null @@ -1,43 +0,0 @@ -From bb711b53f10d32a90a27ccf4b0dc51e4a701d862 Mon Sep 17 00:00:00 2001 -From: Changqing Li <changqing.li@windriver.com> -Date: Fri, 7 Feb 2020 09:42:09 +0800 -Subject: [PATCH] python3: Do not hardcode "lib" for distutils - -Get the sys.lib from python3 itself and do not use -hardcoded value of 'lib' for distutils. - -Upstream-Status: Inappropriate [oe-core specific] - -Signed-off-by: Li Zhou <li.zhou@windriver.com> -Signed-off-by: Changqing Li <changqing.li@windriver.com> ---- - Lib/distutils/command/install.py | 6 ++++-- - 1 file changed, 4 insertions(+), 2 deletions(-) - -diff --git a/Lib/distutils/command/install.py b/Lib/distutils/command/install.py -index c625c95..8e32f54 100644 ---- a/Lib/distutils/command/install.py -+++ b/Lib/distutils/command/install.py -@@ -19,6 +19,8 @@ from site import USER_BASE - from site import USER_SITE - HAS_USER_SITE = True - -+libname = sys.lib -+ - WINDOWS_SCHEME = { - 'purelib': '$base/Lib/site-packages', - 'platlib': '$base/Lib/site-packages', -@@ -29,8 +31,8 @@ WINDOWS_SCHEME = { - - INSTALL_SCHEMES = { - 'unix_prefix': { -- 'purelib': '$base/lib/python$py_version_short/site-packages', -- 'platlib': '$platbase/lib/python$py_version_short/site-packages', -+ 'purelib': '$base/' + libname + '/python$py_version_short/site-packages', -+ 'platlib': '$platbase/' + libname + '/python$py_version_short/site-packages', - 'headers': '$base/include/python$py_version_short$abiflags/$dist_name', - 'scripts': '$base/bin', - 'data' : '$base', --- -2.7.4 - diff --git a/poky/meta/recipes-devtools/python/python3/0001-python3-use-cc_basename-to-replace-CC-for-checking-c.patch b/poky/meta/recipes-devtools/python/python3/0001-python3-use-cc_basename-to-replace-CC-for-checking-c.patch index fb10ca94b3..bfddc1ad52 100644 --- a/poky/meta/recipes-devtools/python/python3/0001-python3-use-cc_basename-to-replace-CC-for-checking-c.patch +++ b/poky/meta/recipes-devtools/python/python3/0001-python3-use-cc_basename-to-replace-CC-for-checking-c.patch @@ -1,4 +1,4 @@ -From 994783da5c21cab81b6589ed2d4275e665a946f9 Mon Sep 17 00:00:00 2001 +From 5f9eea2c4f8716830f6c8855a3e10872119fae32 Mon Sep 17 00:00:00 2001 From: Changqing Li <changqing.li@windriver.com> Date: Mon, 22 Oct 2018 15:19:51 +0800 Subject: [PATCH] python3: use cc_basename to replace CC for checking compiler @@ -27,7 +27,7 @@ Signed-off-by: Changqing Li <changqing.li@windriver.com> 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/configure.ac b/configure.ac -index a189d42..0f85486 100644 +index d60f052..e491e24 100644 --- a/configure.ac +++ b/configure.ac @@ -54,6 +54,7 @@ AC_CONFIG_HEADER(pyconfig.h) @@ -38,7 +38,7 @@ index a189d42..0f85486 100644 # pybuilddir.txt will be created by --generate-posix-vars in the Makefile rm -f pybuilddir.txt -@@ -671,7 +672,7 @@ AC_MSG_RESULT($with_cxx_main) +@@ -689,7 +690,7 @@ AC_MSG_RESULT($with_cxx_main) preset_cxx="$CXX" if test -z "$CXX" then @@ -47,7 +47,7 @@ index a189d42..0f85486 100644 gcc) AC_PATH_TOOL(CXX, [g++], [g++], [notfound]) ;; cc) AC_PATH_TOOL(CXX, [c++], [c++], [notfound]) ;; clang|*/clang) AC_PATH_TOOL(CXX, [clang++], [clang++], [notfound]) ;; -@@ -957,7 +958,7 @@ rmdir CaseSensitiveTestDir +@@ -975,7 +976,7 @@ rmdir CaseSensitiveTestDir case $ac_sys_system in hp*|HP*) @@ -56,7 +56,7 @@ index a189d42..0f85486 100644 cc|*/cc) CC="$CC -Ae";; esac;; esac -@@ -1335,7 +1336,7 @@ else +@@ -1366,7 +1367,7 @@ else fi], [AC_MSG_RESULT(no)]) if test "$Py_LTO" = 'true' ; then @@ -65,7 +65,7 @@ index a189d42..0f85486 100644 *clang*) AC_SUBST(LLVM_AR) AC_PATH_TOOL(LLVM_AR, llvm-ar, '', ${llvm_path}) -@@ -1425,7 +1426,7 @@ then +@@ -1456,7 +1457,7 @@ then fi fi LLVM_PROF_ERR=no @@ -74,7 +74,7 @@ index a189d42..0f85486 100644 *clang*) # Any changes made here should be reflected in the GCC+Darwin case below PGO_PROF_GEN_FLAG="-fprofile-instr-generate" -@@ -1486,7 +1487,7 @@ esac +@@ -1517,7 +1518,7 @@ esac # compiler and platform. BASECFLAGS tweaks need to be made even if the # user set OPT. @@ -83,7 +83,7 @@ index a189d42..0f85486 100644 *clang*) cc_is_clang=1 ;; -@@ -1622,7 +1623,7 @@ yes) +@@ -1653,7 +1654,7 @@ yes) # ICC doesn't recognize the option, but only emits a warning ## XXX does it emit an unused result warning and can it be disabled? @@ -92,16 +92,16 @@ index a189d42..0f85486 100644 *icc*) ac_cv_disable_unused_result_warning=no ;; -@@ -1943,7 +1944,7 @@ yes) +@@ -1993,7 +1994,7 @@ yes) + ;; esac - # ICC needs -fp-model strict or floats behave badly -case "$CC" in +case "$cc_basename" in *icc*) + # ICC needs -fp-model strict or floats behave badly CFLAGS_NODIST="$CFLAGS_NODIST -fp-model strict" - ;; -@@ -2711,7 +2712,7 @@ then +@@ -2765,7 +2766,7 @@ then then LINKFORSHARED="-Wl,--export-dynamic" fi;; @@ -110,7 +110,7 @@ index a189d42..0f85486 100644 *gcc*) if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null then -@@ -5362,7 +5363,7 @@ if test "$have_gcc_asm_for_x87" = yes; then +@@ -5507,7 +5508,7 @@ if test "$have_gcc_asm_for_x87" = yes; then # Some versions of gcc miscompile inline asm: # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html diff --git a/poky/meta/recipes-devtools/python/python3/0017-setup.py-do-not-report-missing-dependencies-for-disa.patch b/poky/meta/recipes-devtools/python/python3/0017-setup.py-do-not-report-missing-dependencies-for-disa.patch index 4bd98f62fd..5c620361da 100644 --- a/poky/meta/recipes-devtools/python/python3/0017-setup.py-do-not-report-missing-dependencies-for-disa.patch +++ b/poky/meta/recipes-devtools/python/python3/0017-setup.py-do-not-report-missing-dependencies-for-disa.patch @@ -25,7 +25,7 @@ index 7691258..ec3f2a4 100644 + # There is no need to report missing module dependencies, + # if the modules have been disabled in the first place. -+ self.missing = list(set(self.missing) - set(sysconf_dis)) ++ self.missing = list(set(self.missing) - set(mods_disabled)) + if self.missing: print() diff --git a/poky/meta/recipes-devtools/python/python3/12-distutils-prefix-is-inside-staging-area.patch b/poky/meta/recipes-devtools/python/python3/12-distutils-prefix-is-inside-staging-area.patch index 820fb98ed8..5a39cf8933 100644 --- a/poky/meta/recipes-devtools/python/python3/12-distutils-prefix-is-inside-staging-area.patch +++ b/poky/meta/recipes-devtools/python/python3/12-distutils-prefix-is-inside-staging-area.patch @@ -1,27 +1,26 @@ -From 064187668fcbefdd39a8cde372bf651124c3e578 Mon Sep 17 00:00:00 2001 +From c52fa7948ef109db1132fdc1aee0b68f8d767b4e Mon Sep 17 00:00:00 2001 From: Khem Raj <raj.khem@gmail.com> Date: Tue, 14 May 2013 15:00:26 -0700 -Subject: [PATCH] python3: Add target and native recipes +Subject: [PATCH 1/2] python3: Add target and native recipes Upstream-Status: Inappropriate [embedded specific] 02/2015 Rebased for Python 3.4.2 -# The proper prefix is inside our staging area. -# Signed-Off: Michael 'Mickey' Lauer <mickey@vanille-media.de> -# Signed-off-by: Phil Blundell <philb@gnu.org> -# Signed-off-by: Khem Raj <raj.khem@gmail.com> -# Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com> - +The proper prefix is inside our staging area. +Signed-Off: Michael 'Mickey' Lauer <mickey@vanille-media.de> +Signed-off-by: Phil Blundell <philb@gnu.org> +Signed-off-by: Khem Raj <raj.khem@gmail.com> +Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com> --- Lib/distutils/sysconfig.py | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/Lib/distutils/sysconfig.py b/Lib/distutils/sysconfig.py -index 2df348c..4f8db84 100644 +index 4774e12..ccf7d58 100644 --- a/Lib/distutils/sysconfig.py +++ b/Lib/distutils/sysconfig.py -@@ -96,7 +96,9 @@ def get_python_inc(plat_specific=0, prefix=None): +@@ -95,7 +95,9 @@ def get_python_inc(plat_specific=0, prefix=None): If 'prefix' is supplied, use it instead of sys.base_prefix or sys.base_exec_prefix -- i.e., ignore 'plat_specific'. """ @@ -32,7 +31,7 @@ index 2df348c..4f8db84 100644 prefix = plat_specific and BASE_EXEC_PREFIX or BASE_PREFIX if os.name == "posix": if python_build: -@@ -139,7 +141,13 @@ def get_python_lib(plat_specific=0, standard_lib=0, prefix=None): +@@ -138,7 +140,13 @@ def get_python_lib(plat_specific=0, standard_lib=0, prefix=None): If 'prefix' is supplied, use it instead of sys.base_prefix or sys.base_exec_prefix -- i.e., ignore 'plat_specific'. """ @@ -47,12 +46,15 @@ index 2df348c..4f8db84 100644 if standard_lib: prefix = plat_specific and BASE_EXEC_PREFIX or BASE_PREFIX else: -@@ -147,7 +155,7 @@ def get_python_lib(plat_specific=0, standard_lib=0, prefix=None): - - if os.name == "posix": - libpython = os.path.join(prefix, -- "lib", "python" + get_python_version()) -+ lib_basename, "python" + get_python_version()) +@@ -152,7 +160,7 @@ def get_python_lib(plat_specific=0, standard_lib=0, prefix=None): + else: + # Pure Python + libdir = "lib" +- libpython = os.path.join(prefix, libdir, ++ libpython = os.path.join(prefix, lib_basename, + "python" + get_python_version()) if standard_lib: return libpython - else: +-- +2.24.0 + diff --git a/poky/meta/recipes-devtools/python/python3/CVE-2020-27619.patch b/poky/meta/recipes-devtools/python/python3/CVE-2020-27619.patch new file mode 100644 index 0000000000..b2053e7a47 --- /dev/null +++ b/poky/meta/recipes-devtools/python/python3/CVE-2020-27619.patch @@ -0,0 +1,69 @@ +From b664a1df4ee71d3760ab937653b10997081b1794 Mon Sep 17 00:00:00 2001 +From: "Miss Skeleton (bot)" <31488909+miss-islington@users.noreply.github.com> +Date: Tue, 6 Oct 2020 05:37:36 -0700 +Subject: [PATCH] bpo-41944: No longer call eval() on content received via HTTP + in the CJK codec tests (GH-22566) + +(cherry picked from commit 2ef5caa58febc8968e670e39e3d37cf8eef3cab8) + +Co-authored-by: Serhiy Storchaka <storchaka@gmail.com> + +Upstream-Status: Backport [https://github.com/python/cpython/commit/b664a1df4ee71d3760ab937653b10997081b1794] +CVE: CVE-2020-27619 +Signed-off-by: Chee Yang Lee <chee.yang.lee@intel.com> + +--- + Lib/test/multibytecodec_support.py | 22 +++++++------------ + .../2020-10-05-17-43-46.bpo-41944.rf1dYb.rst | 1 + + 2 files changed, 9 insertions(+), 14 deletions(-) + create mode 100644 Misc/NEWS.d/next/Tests/2020-10-05-17-43-46.bpo-41944.rf1dYb.rst + +diff --git a/Lib/test/multibytecodec_support.py b/Lib/test/multibytecodec_support.py +index cca8af67d6d1d..f76c0153f5ecf 100644 +--- a/Lib/test/multibytecodec_support.py ++++ b/Lib/test/multibytecodec_support.py +@@ -305,29 +305,23 @@ def test_mapping_file(self): + self._test_mapping_file_plain() + + def _test_mapping_file_plain(self): +- unichrs = lambda s: ''.join(map(chr, map(eval, s.split('+')))) ++ def unichrs(s): ++ return ''.join(chr(int(x, 16)) for x in s.split('+')) ++ + urt_wa = {} + + with self.open_mapping_file() as f: + for line in f: + if not line: + break +- data = line.split('#')[0].strip().split() ++ data = line.split('#')[0].split() + if len(data) != 2: + continue + +- csetval = eval(data[0]) +- if csetval <= 0x7F: +- csetch = bytes([csetval & 0xff]) +- elif csetval >= 0x1000000: +- csetch = bytes([(csetval >> 24), ((csetval >> 16) & 0xff), +- ((csetval >> 8) & 0xff), (csetval & 0xff)]) +- elif csetval >= 0x10000: +- csetch = bytes([(csetval >> 16), ((csetval >> 8) & 0xff), +- (csetval & 0xff)]) +- elif csetval >= 0x100: +- csetch = bytes([(csetval >> 8), (csetval & 0xff)]) +- else: ++ if data[0][:2] != '0x': ++ self.fail(f"Invalid line: {line!r}") ++ csetch = bytes.fromhex(data[0][2:]) ++ if len(csetch) == 1 and 0x80 <= csetch[0]: + continue + + unich = unichrs(data[1]) +diff --git a/Misc/NEWS.d/next/Tests/2020-10-05-17-43-46.bpo-41944.rf1dYb.rst b/Misc/NEWS.d/next/Tests/2020-10-05-17-43-46.bpo-41944.rf1dYb.rst +new file mode 100644 +index 0000000000000..4f9782f1c85af +--- /dev/null ++++ b/Misc/NEWS.d/next/Tests/2020-10-05-17-43-46.bpo-41944.rf1dYb.rst +@@ -0,0 +1 @@ ++Tests for CJK codecs no longer call ``eval()`` on content received via HTTP. diff --git a/poky/meta/recipes-devtools/python/python3/python-config.patch b/poky/meta/recipes-devtools/python/python3/python-config.patch index c8a8f3d4aa..d0ddbbc7fd 100644 --- a/poky/meta/recipes-devtools/python/python3/python-config.patch +++ b/poky/meta/recipes-devtools/python/python3/python-config.patch @@ -1,4 +1,4 @@ -From 07df0ae0d70cba6d1847fe1c24a71063930bec60 Mon Sep 17 00:00:00 2001 +From 57d073c12e7bede29919117b0141df14015eb27f Mon Sep 17 00:00:00 2001 From: Tyler Hall <tylerwhall@gmail.com> Date: Sun, 4 May 2014 20:06:43 -0400 Subject: [PATCH] python-config: Revert to using distutils.sysconfig @@ -21,7 +21,7 @@ Signed-off-by: Tyler Hall <tylerwhall@gmail.com> 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Misc/python-config.in b/Misc/python-config.in -index 727c4a8..c702829 100644 +index ebd99da..13e57ae 100644 --- a/Misc/python-config.in +++ b/Misc/python-config.in @@ -6,7 +6,7 @@ @@ -37,11 +37,11 @@ index 727c4a8..c702829 100644 for opt in opt_flags: if opt == '--prefix': -- print(sysconfig.get_config_var('prefix')) +- print(getvar('prefix')) + print(sysconfig.PREFIX) elif opt == '--exec-prefix': -- print(sysconfig.get_config_var('exec_prefix')) +- print(getvar('exec_prefix')) + print(sysconfig.EXEC_PREFIX) elif opt in ('--includes', '--cflags'): diff --git a/poky/meta/recipes-devtools/python/python3/python3-manifest.json b/poky/meta/recipes-devtools/python/python3/python3-manifest.json index 69aecb7004..615dc3a5e5 100644 --- a/poky/meta/recipes-devtools/python/python3/python3-manifest.json +++ b/poky/meta/recipes-devtools/python/python3/python3-manifest.json @@ -122,8 +122,7 @@ "logging", "netclient", "numbers", - "stringold", - "typing" + "stringold" ], "files": [ "${libdir}/python${PYTHON_MAJMIN}/asyncio", @@ -173,10 +172,12 @@ ], "files": [ "${libdir}/python${PYTHON_MAJMIN}/compileall.py", + "${libdir}/python${PYTHON_MAJMIN}/filecmp.py", "${libdir}/python${PYTHON_MAJMIN}/py_compile.py" ], "cached": [ "${libdir}/python${PYTHON_MAJMIN}/__pycache__/compileall.*.pyc", + "${libdir}/python${PYTHON_MAJMIN}/__pycache__/filecmp.*.pyc", "${libdir}/python${PYTHON_MAJMIN}/__pycache__/py_compile.*.pyc" ] }, @@ -313,6 +314,7 @@ "${libdir}/python${PYTHON_MAJMIN}/tokenize.py", "${libdir}/python${PYTHON_MAJMIN}/traceback.py", "${libdir}/python${PYTHON_MAJMIN}/types.py", + "${libdir}/python${PYTHON_MAJMIN}/typing.py", "${libdir}/python${PYTHON_MAJMIN}/urllib", "${libdir}/python${PYTHON_MAJMIN}/urllib/parse.py", "${libdir}/python${PYTHON_MAJMIN}/warnings.py", @@ -388,6 +390,7 @@ "${libdir}/python${PYTHON_MAJMIN}/__pycache__/tokenize.*.pyc", "${libdir}/python${PYTHON_MAJMIN}/__pycache__/traceback.*.pyc", "${libdir}/python${PYTHON_MAJMIN}/__pycache__/types.*.pyc", + "${libdir}/python${PYTHON_MAJMIN}/__pycache__/typing.*.pyc", "${libdir}/python${PYTHON_MAJMIN}/__pycache__/warnings.*.pyc", "${libdir}/python${PYTHON_MAJMIN}/__pycache__/weakref.*.pyc", "${libdir}/python${PYTHON_MAJMIN}/collections/__pycache__", @@ -557,18 +560,12 @@ "doctest": { "summary": "Python framework for running examples in docstrings", "rdepends": [ - "asyncio", "core", "debugger", "difflib", - "io", - "logging", - "netclient", - "numbers", "pprint", "shell", "stringold", - "typing", "unittest" ], "files": [ @@ -822,7 +819,6 @@ "terminal", "threading", "tkinter", - "typing", "unittest", "unixadmin", "venv", @@ -999,12 +995,14 @@ ], "files": [ "${libdir}/python${PYTHON_MAJMIN}/cProfile.py", + "${libdir}/python${PYTHON_MAJMIN}/dataclasses.py", "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_lsprof.*.so", "${libdir}/python${PYTHON_MAJMIN}/profile.py", "${libdir}/python${PYTHON_MAJMIN}/pstats.py" ], "cached": [ "${libdir}/python${PYTHON_MAJMIN}/__pycache__/cProfile.*.pyc", + "${libdir}/python${PYTHON_MAJMIN}/__pycache__/dataclasses.*.pyc", "${libdir}/python${PYTHON_MAJMIN}/__pycache__/profile.*.pyc", "${libdir}/python${PYTHON_MAJMIN}/__pycache__/pstats.*.pyc" ] @@ -1130,13 +1128,11 @@ "core" ], "files": [ - "${libdir}/python${PYTHON_MAJMIN}/_dummy_thread.py", "${libdir}/python${PYTHON_MAJMIN}/_threading_local.py", "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_queue.*.so", "${libdir}/python${PYTHON_MAJMIN}/queue.py" ], "cached": [ - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/_dummy_thread.*.pyc", "${libdir}/python${PYTHON_MAJMIN}/__pycache__/_threading_local.*.pyc", "${libdir}/python${PYTHON_MAJMIN}/__pycache__/queue.*.pyc" ] @@ -1147,23 +1143,11 @@ "core" ], "files": [ - "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_tkinter.*.so", + "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_tkinter.*.so", "${libdir}/python${PYTHON_MAJMIN}/tkinter" ], "cached": [] }, - "typing": { - "summary": "Python typing support", - "rdepends": [ - "core" - ], - "files": [ - "${libdir}/python${PYTHON_MAJMIN}/typing.py" - ], - "cached": [ - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/typing.*.pyc" - ] - }, "unittest": { "summary": "Python unit testing framework", "rdepends": [ @@ -1175,8 +1159,7 @@ "netclient", "numbers", "pprint", - "stringold", - "typing" + "stringold" ], "files": [ "${libdir}/python${PYTHON_MAJMIN}/unittest", diff --git a/poky/meta/recipes-devtools/python/python3_3.8.5.bb b/poky/meta/recipes-devtools/python/python3_3.9.0.bb index 2a3c52a116..19a8950f15 100644 --- a/poky/meta/recipes-devtools/python/python3_3.8.5.bb +++ b/poky/meta/recipes-devtools/python/python3_3.9.0.bb @@ -3,7 +3,7 @@ HOMEPAGE = "http://www.python.org" LICENSE = "PSFv2" SECTION = "devel/python" -LIC_FILES_CHKSUM = "file://LICENSE;md5=203a6dbc802ee896020a47161e759642" +LIC_FILES_CHKSUM = "file://LICENSE;md5=33223c9ef60c31e3f0e866cb09b65e83" SRC_URI = "http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.xz \ file://run-ptest \ @@ -11,27 +11,25 @@ SRC_URI = "http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.xz \ file://get_module_deps3.py \ file://python3-manifest.json \ file://check_build_completeness.py \ + file://reformat_sysconfig.py \ file://cgi_py.patch \ file://0001-Do-not-add-usr-lib-termcap-to-linker-flags-to-avoid-.patch \ ${@bb.utils.contains('PACKAGECONFIG', 'tk', '', 'file://avoid_warning_about_tkinter.patch', d)} \ file://0001-Do-not-use-the-shell-version-of-python-config-that-w.patch \ file://python-config.patch \ file://0001-Makefile.pre-use-qemu-wrapper-when-gathering-profile.patch \ - file://0001-Do-not-hardcode-lib-as-location-for-site-packages-an.patch \ file://0001-python3-use-cc_basename-to-replace-CC-for-checking-c.patch \ - file://0001-Lib-sysconfig.py-fix-another-place-where-lib-is-hard.patch \ file://0001-Makefile-fix-Issue36464-parallel-build-race-problem.patch \ file://0001-bpo-36852-proper-detection-of-mips-architecture-for-.patch \ file://crosspythonpath.patch \ - file://reformat_sysconfig.py \ file://0001-Use-FLAG_REF-always-for-interned-strings.patch \ file://0001-test_locale.py-correct-the-test-output-format.patch \ file://0017-setup.py-do-not-report-missing-dependencies-for-disa.patch \ file://0001-setup.py-pass-missing-libraries-to-Extension-for-mul.patch \ file://0001-Makefile-do-not-compile-.pyc-in-parallel.patch \ - file://0001-configure.ac-fix-LIBPL.patch \ - file://0001-python3-Do-not-hardcode-lib-for-distutils.patch \ file://0020-configure.ac-setup.py-do-not-add-a-curses-include-pa.patch \ + file://0001-Lib-sysconfig.py-use-libdir-values-from-configuratio.patch \ + file://CVE-2020-27619.patch \ " SRC_URI_append_class-native = " \ @@ -40,8 +38,7 @@ SRC_URI_append_class-native = " \ file://0001-Don-t-search-system-for-headers-libraries.patch \ " -SRC_URI[md5sum] = "35b5a3d0254c1c59be9736373d429db7" -SRC_URI[sha256sum] = "e3003ed57db17e617acb382b0cade29a248c6026b1bd8aad1f976e9af66a83b0" +SRC_URI[sha256sum] = "9c73e63c99855709b9be0b3cc9e5b072cb60f37311e8c4e50f15576a0bf82854" # exclude pre-releases for both python 2.x and 3.x UPSTREAM_CHECK_REGEX = "[Pp]ython-(?P<pver>\d+(\.\d+)+).tar" @@ -49,10 +46,15 @@ UPSTREAM_CHECK_URI = "https://www.python.org/downloads/source/" CVE_PRODUCT = "python" +# Upstream consider this expected behaviour +CVE_CHECK_WHITELIST += "CVE-2007-4559" # This is not exploitable when glibc has CVE-2016-10739 fixed. CVE_CHECK_WHITELIST += "CVE-2019-18348" -PYTHON_MAJMIN = "3.8" +# This is windows only issue. +CVE_CHECK_WHITELIST += "CVE-2020-15523" + +PYTHON_MAJMIN = "3.9" S = "${WORKDIR}/Python-${PV}" @@ -71,13 +73,16 @@ DEPENDS = "bzip2-replacement-native libffi bzip2 openssl sqlite3 zlib virtual/li DEPENDS_append_class-target = " python3-native" DEPENDS_append_class-nativesdk = " python3-native" -EXTRA_OECONF = " --without-ensurepip --enable-shared" +EXTRA_OECONF = " --without-ensurepip --enable-shared --with-platlibdir=${baselib}" EXTRA_OECONF_append_class-native = " --bindir=${bindir}/${PN}" export CROSSPYTHONPATH="${STAGING_LIBDIR_NATIVE}/python${PYTHON_MAJMIN}/lib-dynload/" EXTRANATIVEPATH += "python3-native" +# LTO will be enabled via packageconfig depending upong distro features +LTO_class-target = "" + CACHED_CONFIGUREVARS = " \ ac_cv_file__dev_ptmx=yes \ ac_cv_file__dev_ptc=no \ @@ -92,7 +97,7 @@ def possibly_include_pgo(d): return '' -PACKAGECONFIG_class-target ??= "readline ${@possibly_include_pgo(d)} gdbm" +PACKAGECONFIG_class-target ??= "readline ${@possibly_include_pgo(d)} gdbm ${@bb.utils.filter('DISTRO_FEATURES', 'lto', d)}" PACKAGECONFIG_class-native ??= "readline gdbm" PACKAGECONFIG_class-nativesdk ??= "readline gdbm" PACKAGECONFIG[readline] = ",,readline" @@ -100,6 +105,7 @@ PACKAGECONFIG[readline] = ",,readline" PACKAGECONFIG[pgo] = "--enable-optimizations,,qemu-native" PACKAGECONFIG[tk] = ",,tk" PACKAGECONFIG[gdbm] = ",,gdbm" +PACKAGECONFIG[lto] = "--with-lto,," do_configure_prepend () { mkdir -p ${B}/Modules @@ -162,6 +168,14 @@ do_install_append() { -e "/^ 'INCLDIRSTOMAKE'/{N; s,/usr/include,${STAGING_INCDIR},g}" \ -e "/^ 'INCLUDEPY'/s,/usr/include,${STAGING_INCDIR},g" \ ${D}${libdir}/python-sysconfigdata/_sysconfigdata.py + + # Unfortunately the following pyc files are non-deterministc due to 'frozenset' + # being written without strict ordering, even with PYTHONHASHSEED = 0 + # Upstream is discussing ways to solve the issue properly, until then let's + # just not install the problematic files. + # More info: http://benno.id.au/blog/2013/01/15/python-determinism + rm ${D}${libdir}/python${PYTHON_MAJMIN}/test/__pycache__/test_range.cpython* + rm ${D}${libdir}/python${PYTHON_MAJMIN}/test/__pycache__/test_xml_etree.cpython* } do_install_append_class-nativesdk () { |