diff options
Diffstat (limited to 'poky/meta/recipes-devtools/python')
45 files changed, 241 insertions, 358 deletions
diff --git a/poky/meta/recipes-devtools/python/files/0001-bpo-39503-CVE-2020-8492-Fix-AbstractBasicAuthHandler.patch b/poky/meta/recipes-devtools/python/files/0001-bpo-39503-CVE-2020-8492-Fix-AbstractBasicAuthHandler.patch deleted file mode 100644 index e16b99bcb..000000000 --- a/poky/meta/recipes-devtools/python/files/0001-bpo-39503-CVE-2020-8492-Fix-AbstractBasicAuthHandler.patch +++ /dev/null @@ -1,248 +0,0 @@ -From 0b297d4ff1c0e4480ad33acae793fbaf4bf015b4 Mon Sep 17 00:00:00 2001 -From: Victor Stinner <vstinner@python.org> -Date: Thu, 2 Apr 2020 02:52:20 +0200 -Subject: [PATCH] bpo-39503: CVE-2020-8492: Fix AbstractBasicAuthHandler - (GH-18284) - -Upstream-Status: Backport -(https://github.com/python/cpython/commit/0b297d4ff1c0e4480ad33acae793fbaf4bf015b4) - -CVE: CVE-2020-8492 - -The AbstractBasicAuthHandler class of the urllib.request module uses -an inefficient regular expression which can be exploited by an -attacker to cause a denial of service. Fix the regex to prevent the -catastrophic backtracking. Vulnerability reported by Ben Caller -and Matt Schwager. - -AbstractBasicAuthHandler of urllib.request now parses all -WWW-Authenticate HTTP headers and accepts multiple challenges per -header: use the realm of the first Basic challenge. - -Co-Authored-By: Serhiy Storchaka <storchaka@gmail.com> -Signed-off-by: Trevor Gamblin <trevor.gamblin@windriver.com> ---- - Lib/test/test_urllib2.py | 90 ++++++++++++------- - Lib/urllib/request.py | 69 ++++++++++---- - .../2020-03-25-16-02-16.bpo-39503.YmMbYn.rst | 3 + - .../2020-01-30-16-15-29.bpo-39503.B299Yq.rst | 5 ++ - 4 files changed, 115 insertions(+), 52 deletions(-) - create mode 100644 Misc/NEWS.d/next/Library/2020-03-25-16-02-16.bpo-39503.YmMbYn.rst - create mode 100644 Misc/NEWS.d/next/Security/2020-01-30-16-15-29.bpo-39503.B299Yq.rst - -diff --git a/Lib/test/test_urllib2.py b/Lib/test/test_urllib2.py -index 8abedaac98..e69ac3e213 100644 ---- a/Lib/test/test_urllib2.py -+++ b/Lib/test/test_urllib2.py -@@ -1446,40 +1446,64 @@ class HandlerTests(unittest.TestCase): - bypass = {'exclude_simple': True, 'exceptions': []} - self.assertTrue(_proxy_bypass_macosx_sysconf('test', bypass)) - -- def test_basic_auth(self, quote_char='"'): -- opener = OpenerDirector() -- password_manager = MockPasswordManager() -- auth_handler = urllib.request.HTTPBasicAuthHandler(password_manager) -- realm = "ACME Widget Store" -- http_handler = MockHTTPHandler( -- 401, 'WWW-Authenticate: Basic realm=%s%s%s\r\n\r\n' % -- (quote_char, realm, quote_char)) -- opener.add_handler(auth_handler) -- opener.add_handler(http_handler) -- self._test_basic_auth(opener, auth_handler, "Authorization", -- realm, http_handler, password_manager, -- "http://acme.example.com/protected", -- "http://acme.example.com/protected", -- ) -- -- def test_basic_auth_with_single_quoted_realm(self): -- self.test_basic_auth(quote_char="'") -- -- def test_basic_auth_with_unquoted_realm(self): -- opener = OpenerDirector() -- password_manager = MockPasswordManager() -- auth_handler = urllib.request.HTTPBasicAuthHandler(password_manager) -- realm = "ACME Widget Store" -- http_handler = MockHTTPHandler( -- 401, 'WWW-Authenticate: Basic realm=%s\r\n\r\n' % realm) -- opener.add_handler(auth_handler) -- opener.add_handler(http_handler) -- with self.assertWarns(UserWarning): -+ def check_basic_auth(self, headers, realm): -+ with self.subTest(realm=realm, headers=headers): -+ opener = OpenerDirector() -+ password_manager = MockPasswordManager() -+ auth_handler = urllib.request.HTTPBasicAuthHandler(password_manager) -+ body = '\r\n'.join(headers) + '\r\n\r\n' -+ http_handler = MockHTTPHandler(401, body) -+ opener.add_handler(auth_handler) -+ opener.add_handler(http_handler) - self._test_basic_auth(opener, auth_handler, "Authorization", -- realm, http_handler, password_manager, -- "http://acme.example.com/protected", -- "http://acme.example.com/protected", -- ) -+ realm, http_handler, password_manager, -+ "http://acme.example.com/protected", -+ "http://acme.example.com/protected") -+ -+ def test_basic_auth(self): -+ realm = "realm2@example.com" -+ realm2 = "realm2@example.com" -+ basic = f'Basic realm="{realm}"' -+ basic2 = f'Basic realm="{realm2}"' -+ other_no_realm = 'Otherscheme xxx' -+ digest = (f'Digest realm="{realm2}", ' -+ f'qop="auth, auth-int", ' -+ f'nonce="dcd98b7102dd2f0e8b11d0f600bfb0c093", ' -+ f'opaque="5ccc069c403ebaf9f0171e9517f40e41"') -+ for realm_str in ( -+ # test "quote" and 'quote' -+ f'Basic realm="{realm}"', -+ f"Basic realm='{realm}'", -+ -+ # charset is ignored -+ f'Basic realm="{realm}", charset="UTF-8"', -+ -+ # Multiple challenges per header -+ f'{basic}, {basic2}', -+ f'{basic}, {other_no_realm}', -+ f'{other_no_realm}, {basic}', -+ f'{basic}, {digest}', -+ f'{digest}, {basic}', -+ ): -+ headers = [f'WWW-Authenticate: {realm_str}'] -+ self.check_basic_auth(headers, realm) -+ -+ # no quote: expect a warning -+ with support.check_warnings(("Basic Auth Realm was unquoted", -+ UserWarning)): -+ headers = [f'WWW-Authenticate: Basic realm={realm}'] -+ self.check_basic_auth(headers, realm) -+ -+ # Multiple headers: one challenge per header. -+ # Use the first Basic realm. -+ for challenges in ( -+ [basic, basic2], -+ [basic, digest], -+ [digest, basic], -+ ): -+ headers = [f'WWW-Authenticate: {challenge}' -+ for challenge in challenges] -+ self.check_basic_auth(headers, realm) - - def test_proxy_basic_auth(self): - opener = OpenerDirector() -diff --git a/Lib/urllib/request.py b/Lib/urllib/request.py -index 7fe50535da..2a3d71554f 100644 ---- a/Lib/urllib/request.py -+++ b/Lib/urllib/request.py -@@ -937,8 +937,15 @@ class AbstractBasicAuthHandler: - - # allow for double- and single-quoted realm values - # (single quotes are a violation of the RFC, but appear in the wild) -- rx = re.compile('(?:.*,)*[ \t]*([^ \t]+)[ \t]+' -- 'realm=(["\']?)([^"\']*)\\2', re.I) -+ rx = re.compile('(?:^|,)' # start of the string or ',' -+ '[ \t]*' # optional whitespaces -+ '([^ \t]+)' # scheme like "Basic" -+ '[ \t]+' # mandatory whitespaces -+ # realm=xxx -+ # realm='xxx' -+ # realm="xxx" -+ 'realm=(["\']?)([^"\']*)\\2', -+ re.I) - - # XXX could pre-emptively send auth info already accepted (RFC 2617, - # end of section 2, and section 1.2 immediately after "credentials" -@@ -950,27 +957,51 @@ class AbstractBasicAuthHandler: - self.passwd = password_mgr - self.add_password = self.passwd.add_password - -+ def _parse_realm(self, header): -+ # parse WWW-Authenticate header: accept multiple challenges per header -+ found_challenge = False -+ for mo in AbstractBasicAuthHandler.rx.finditer(header): -+ scheme, quote, realm = mo.groups() -+ if quote not in ['"', "'"]: -+ warnings.warn("Basic Auth Realm was unquoted", -+ UserWarning, 3) -+ -+ yield (scheme, realm) -+ -+ found_challenge = True -+ -+ if not found_challenge: -+ if header: -+ scheme = header.split()[0] -+ else: -+ scheme = '' -+ yield (scheme, None) -+ - def http_error_auth_reqed(self, authreq, host, req, headers): - # host may be an authority (without userinfo) or a URL with an - # authority -- # XXX could be multiple headers -- authreq = headers.get(authreq, None) -+ headers = headers.get_all(authreq) -+ if not headers: -+ # no header found -+ return - -- if authreq: -- scheme = authreq.split()[0] -- if scheme.lower() != 'basic': -- raise ValueError("AbstractBasicAuthHandler does not" -- " support the following scheme: '%s'" % -- scheme) -- else: -- mo = AbstractBasicAuthHandler.rx.search(authreq) -- if mo: -- scheme, quote, realm = mo.groups() -- if quote not in ['"',"'"]: -- warnings.warn("Basic Auth Realm was unquoted", -- UserWarning, 2) -- if scheme.lower() == 'basic': -- return self.retry_http_basic_auth(host, req, realm) -+ unsupported = None -+ for header in headers: -+ for scheme, realm in self._parse_realm(header): -+ if scheme.lower() != 'basic': -+ unsupported = scheme -+ continue -+ -+ if realm is not None: -+ # Use the first matching Basic challenge. -+ # Ignore following challenges even if they use the Basic -+ # scheme. -+ return self.retry_http_basic_auth(host, req, realm) -+ -+ if unsupported is not None: -+ raise ValueError("AbstractBasicAuthHandler does not " -+ "support the following scheme: %r" -+ % (scheme,)) - - def retry_http_basic_auth(self, host, req, realm): - user, pw = self.passwd.find_user_password(realm, host) -diff --git a/Misc/NEWS.d/next/Library/2020-03-25-16-02-16.bpo-39503.YmMbYn.rst b/Misc/NEWS.d/next/Library/2020-03-25-16-02-16.bpo-39503.YmMbYn.rst -new file mode 100644 -index 0000000000..be80ce79d9 ---- /dev/null -+++ b/Misc/NEWS.d/next/Library/2020-03-25-16-02-16.bpo-39503.YmMbYn.rst -@@ -0,0 +1,3 @@ -+:class:`~urllib.request.AbstractBasicAuthHandler` of :mod:`urllib.request` -+now parses all WWW-Authenticate HTTP headers and accepts multiple challenges -+per header: use the realm of the first Basic challenge. -diff --git a/Misc/NEWS.d/next/Security/2020-01-30-16-15-29.bpo-39503.B299Yq.rst b/Misc/NEWS.d/next/Security/2020-01-30-16-15-29.bpo-39503.B299Yq.rst -new file mode 100644 -index 0000000000..9f2800581c ---- /dev/null -+++ b/Misc/NEWS.d/next/Security/2020-01-30-16-15-29.bpo-39503.B299Yq.rst -@@ -0,0 +1,5 @@ -+CVE-2020-8492: The :class:`~urllib.request.AbstractBasicAuthHandler` class of the -+:mod:`urllib.request` module uses an inefficient regular expression which can -+be exploited by an attacker to cause a denial of service. Fix the regex to -+prevent the catastrophic backtracking. Vulnerability reported by Ben Caller -+and Matt Schwager. --- -2.24.1 - 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 5f99cd251..ee0a9dbb1 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 a8f871c9ebc4fcb99d4163b226aabeef26567099 Mon Sep 17 00:00:00 2001 +From 6a5086619ee1c4bcebc7df622face11de6679255 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,10 +15,10 @@ 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 426301d..55c8062 100644 +index bcbd4f5..6455afd 100644 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py -@@ -649,6 +649,11 @@ class easy_install(Command): +@@ -653,6 +653,11 @@ class easy_install(Command): os.path.exists(tmpdir) and rmtree(rmtree_safe(tmpdir)) def easy_install(self, spec, deps=False): @@ -27,6 +27,6 @@ index 426301d..55c8062 100644 + "Please add its native recipe to DEPENDS." % spec) + return None + - if not self.editable: - self.install_site_py() - + with self._tmpdir() as tmpdir: + if not isinstance(spec, Requirement): + if URL_SCHEME(spec): diff --git a/poky/meta/recipes-devtools/python/python-cython.inc b/poky/meta/recipes-devtools/python/python-cython.inc index 437e79662..b1e71f3cc 100644 --- a/poky/meta/recipes-devtools/python/python-cython.inc +++ b/poky/meta/recipes-devtools/python/python-cython.inc @@ -7,8 +7,7 @@ LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=e23fadd6ceef8c618fc1c65191d846fa" PYPI_PACKAGE = "Cython" BBCLASSEXTEND = "native nativesdk" -SRC_URI[md5sum] = "a899abaa48b68bb679aef45ceb4b89d3" -SRC_URI[sha256sum] = "232755284f942cbb3b43a06cd85974ef3c970a021aef19b5243c03ee2b08fa05" +SRC_URI[sha256sum] = "e57acb89bd55943c8d8bf813763d20b9099cc7165c0f16b707631a7654be9cad" UPSTREAM_CHECK_REGEX = "Cython-(?P<pver>.*)\.tar" inherit pypi diff --git a/poky/meta/recipes-devtools/python/python-extras.inc b/poky/meta/recipes-devtools/python/python-extras.inc index b5e11b711..335bde272 100644 --- a/poky/meta/recipes-devtools/python/python-extras.inc +++ b/poky/meta/recipes-devtools/python/python-extras.inc @@ -1,5 +1,5 @@ SUMMARY = "Useful extra bits for Python - things that should be in the standard library" -HOMEPAGE = "https://pypi.python.org/pypi/extras/" +HOMEPAGE = "https://pypi.org/project/extras/" SECTION = "devel/python" LICENSE = "Apache-2.0" LIC_FILES_CHKSUM = "file://LICENSE;md5=6d108f338b2f68fe48ac366c4650bd8b" diff --git a/poky/meta/recipes-devtools/python/python-gitdb.inc b/poky/meta/recipes-devtools/python/python-gitdb.inc index a91bb32c3..618d85ff8 100644 --- a/poky/meta/recipes-devtools/python/python-gitdb.inc +++ b/poky/meta/recipes-devtools/python/python-gitdb.inc @@ -8,7 +8,7 @@ inherit pypi PYPI_PACKAGE = "gitdb" -SRC_URI[sha256sum] = "6f0ecd46f99bb4874e5678d628c3a198e2b4ef38daea2756a2bfd8df7dd5c1a5" +SRC_URI[sha256sum] = "c9e1f2d0db7ddb9a704c2a0217be31214e91a4fe1dea1efad19ae42ba0c285c9" DEPENDS = "${PYTHON_PN}-async ${PYTHON_PN}-setuptools-native ${PYTHON_PN}-smmap" diff --git a/poky/meta/recipes-devtools/python/python-pbr.inc b/poky/meta/recipes-devtools/python/python-pbr.inc index ce3c224d5..bc470e727 100644 --- a/poky/meta/recipes-devtools/python/python-pbr.inc +++ b/poky/meta/recipes-devtools/python/python-pbr.inc @@ -1,6 +1,6 @@ SUMMARY = "Python Build Reasonableness" DESCRIPTION = "PBR is a library that injects some useful and sensible default behaviors into your setuptools run" -HOMEPAGE = "https://pypi.python.org/pypi/pbr" +HOMEPAGE = "https://pypi.org/project/pbr" SECTION = "devel/python" LICENSE = "Apache-2.0" LIC_FILES_CHKSUM = "file://LICENSE;md5=1dece7821bf3fd70fe1309eaa37d52a2" diff --git a/poky/meta/recipes-devtools/python/python-six.inc b/poky/meta/recipes-devtools/python/python-six.inc index 05b32810b..df97f845b 100644 --- a/poky/meta/recipes-devtools/python/python-six.inc +++ b/poky/meta/recipes-devtools/python/python-six.inc @@ -1,5 +1,5 @@ SUMMARY = "Python 2 and 3 compatibility library" -HOMEPAGE = "https://pypi.python.org/pypi/six/" +HOMEPAGE = "https://pypi.org/project/six/" SECTION = "devel/python" LICENSE = "MIT" LIC_FILES_CHKSUM = "file://LICENSE;md5=43cfc9e4ac0e377acfb9b76f56b8415d" diff --git a/poky/meta/recipes-devtools/python/python-smmap.inc b/poky/meta/recipes-devtools/python/python-smmap.inc index b878b4b39..7703722bc 100644 --- a/poky/meta/recipes-devtools/python/python-smmap.inc +++ b/poky/meta/recipes-devtools/python/python-smmap.inc @@ -9,10 +9,9 @@ LIC_FILES_CHKSUM = "file://PKG-INFO;beginline=8;endline=8;md5=e910b35b0ef4e1f665 inherit pypi -PYPI_PACKAGE = "smmap2" +PYPI_PACKAGE = "smmap" -SRC_URI[md5sum] = "1c59a985be5aa645c4c5a4e063a40dd5" -SRC_URI[sha256sum] = "29a9ffa0497e7f2be94ca0ed1ca1aa3cd4cf25a1f6b4f5f87f74b46ed91d609a" +SRC_URI[sha256sum] = "9c98bbd1f9786d22f14b3d4126894d56befb835ec90cef151af566c7e19b5d24" RDEPENDS_${PN} += "${PYTHON_PN}-codecs \ ${PYTHON_PN}-mmap \ diff --git a/poky/meta/recipes-devtools/python/python-subunit.inc b/poky/meta/recipes-devtools/python/python-subunit.inc index afaaa51fa..a2f9c5c3f 100644 --- a/poky/meta/recipes-devtools/python/python-subunit.inc +++ b/poky/meta/recipes-devtools/python/python-subunit.inc @@ -1,13 +1,13 @@ SUMMARY = "Python implementation of subunit test streaming protocol" -HOMEPAGE = "https://pypi.python.org/pypi/python-subunit/" +HOMEPAGE = "https://pypi.org/project/python-subunit/" SECTION = "devel/python" LICENSE = "Apache-2.0" LIC_FILES_CHKSUM = "file://README.rst;beginline=1;endline=20;md5=909c08e291647fd985fbe5d9836d51b6" PYPI_PACKAGE = "python-subunit" -SRC_URI[md5sum] = "16d468a3aeafe6c60a0c3b2b9132d65b" -SRC_URI[sha256sum] = "9607edbee4c1e5a30ff88549ce8d9feb0b9bcbcb5e55033a9d76e86075465cbb" +SRC_URI[md5sum] = "30f1ab20651d94442dd9a7f8c9e8d633" +SRC_URI[sha256sum] = "042039928120fbf392e8c983d60f3d8ae1b88f90a9f8fd7188ddd9c26cad1e48" inherit pypi diff --git a/poky/meta/recipes-devtools/python/python-testtools.inc b/poky/meta/recipes-devtools/python/python-testtools.inc index d0b2e46d7..e8d308b71 100644 --- a/poky/meta/recipes-devtools/python/python-testtools.inc +++ b/poky/meta/recipes-devtools/python/python-testtools.inc @@ -1,13 +1,13 @@ SUMMARY = "Extensions to the Python standard library unit testing framework" -HOMEPAGE = "https://pypi.python.org/pypi/testtools/" +HOMEPAGE = "https://pypi.org/project/testtools/" SECTION = "devel/python" LICENSE = "Apache-2.0" LIC_FILES_CHKSUM = "file://LICENSE;md5=e2c9d3e8ba7141c83bfef190e0b9379a" inherit pypi -SRC_URI[md5sum] = "0f0feb915497816cb99e39437494217e" -SRC_URI[sha256sum] = "5827ec6cf8233e0f29f51025addd713ca010061204fdea77484a2934690a0559" +SRC_URI[md5sum] = "e8fc7185b47cfb908c641f8c4b2a6add" +SRC_URI[sha256sum] = "64c974a6cca4385d05f4bbfa2deca1c39ce88ede31c3448bee86a7259a9a61c8" DEPENDS += " \ ${PYTHON_PN}-pbr \ diff --git a/poky/meta/recipes-devtools/python/python3-cython_0.29.16.bb b/poky/meta/recipes-devtools/python/python3-cython_0.29.21.bb index 2ce6bdbd6..2ce6bdbd6 100644 --- a/poky/meta/recipes-devtools/python/python3-cython_0.29.16.bb +++ b/poky/meta/recipes-devtools/python/python3-cython_0.29.21.bb diff --git a/poky/meta/recipes-devtools/python/python3-dbusmock_0.19.bb b/poky/meta/recipes-devtools/python/python3-dbusmock_0.19.bb index 5389e4897..d297dbc1d 100644 --- a/poky/meta/recipes-devtools/python/python3-dbusmock_0.19.bb +++ b/poky/meta/recipes-devtools/python/python3-dbusmock_0.19.bb @@ -12,5 +12,6 @@ inherit pypi setuptools3 RDEPENDS_${PN} += "\ ${PYTHON_PN}-dbus \ ${PYTHON_PN}-pygobject \ + ${PYTHON_PN}-unittest \ ${PYTHON_PN}-xml \ " diff --git a/poky/meta/recipes-devtools/python/python3-git_3.1.2.bb b/poky/meta/recipes-devtools/python/python3-git_3.1.7.bb index 72280ec30..6d1fc4b65 100644 --- a/poky/meta/recipes-devtools/python/python3-git_3.1.2.bb +++ b/poky/meta/recipes-devtools/python/python3-git_3.1.7.bb @@ -12,8 +12,7 @@ PYPI_PACKAGE = "GitPython" inherit pypi setuptools3 -SRC_URI[md5sum] = "2397bea2d7c36ef9f874ab6355abae59" -SRC_URI[sha256sum] = "864a47472548f3ba716ca202e034c1900f197c0fb3a08f641c20c3cafd15ed94" +SRC_URI[sha256sum] = "2db287d71a284e22e5c2846042d0602465c7434d910406990d5b74df4afb0858" DEPENDS += " ${PYTHON_PN}-gitdb" diff --git a/poky/meta/recipes-devtools/python/python3-gitdb_4.0.4.bb b/poky/meta/recipes-devtools/python/python3-gitdb_4.0.4.bb deleted file mode 100644 index 2dcd9c8af..000000000 --- a/poky/meta/recipes-devtools/python/python3-gitdb_4.0.4.bb +++ /dev/null @@ -1,3 +0,0 @@ -inherit setuptools3 -require python-gitdb.inc - diff --git a/poky/meta/recipes-devtools/python/python3-gitdb_4.0.5.bb b/poky/meta/recipes-devtools/python/python3-gitdb_4.0.5.bb new file mode 100644 index 000000000..fe56bf964 --- /dev/null +++ b/poky/meta/recipes-devtools/python/python3-gitdb_4.0.5.bb @@ -0,0 +1,4 @@ +inherit setuptools3 +require python-gitdb.inc + +SRC_URI[md5sum] = "0e2d3f34efece5deda7c55fede6507cc" diff --git a/poky/meta/recipes-devtools/python/python3-iniparse_0.4.bb b/poky/meta/recipes-devtools/python/python3-iniparse_0.4.bb index 4eba9ecd3..47cd6598c 100644 --- a/poky/meta/recipes-devtools/python/python3-iniparse_0.4.bb +++ b/poky/meta/recipes-devtools/python/python3-iniparse_0.4.bb @@ -1,5 +1,5 @@ SUMMARY = "Accessing and Modifying INI files" -HOMEPAGE = "https://pypi.python.org/pypi/iniparse/" +HOMEPAGE = "https://pypi.org/project/iniparse/" LICENSE = "MIT & PSF" LIC_FILES_CHKSUM = "file://LICENSE-PSF;md5=1c78a5bb3584b353496d5f6f34edb4b2 \ file://LICENSE;md5=52f28065af11d69382693b45b5a8eb54" diff --git a/poky/meta/recipes-devtools/python/python3-jinja2/run-ptest b/poky/meta/recipes-devtools/python/python3-jinja2/run-ptest new file mode 100644 index 000000000..5cec71169 --- /dev/null +++ b/poky/meta/recipes-devtools/python/python3-jinja2/run-ptest @@ -0,0 +1,3 @@ +#!/bin/sh + +pytest diff --git a/poky/meta/recipes-devtools/python/python3-jinja2_2.11.2.bb b/poky/meta/recipes-devtools/python/python3-jinja2_2.11.2.bb new file mode 100644 index 000000000..89538d2f2 --- /dev/null +++ b/poky/meta/recipes-devtools/python/python3-jinja2_2.11.2.bb @@ -0,0 +1,45 @@ +DESCRIPTION = "Python Jinja2: A small but fast and easy to use stand-alone template engine written in pure python." + +LICENSE = "BSD-3-Clause" +LIC_FILES_CHKSUM = "file://LICENSE.rst;md5=5dc88300786f1c214c1e9827a5229462" + +SRC_URI[sha256sum] = "89aab215427ef59c34ad58735269eb58b1a5808103067f7bb9d5836c651b3bb0" + +PYPI_PACKAGE = "Jinja2" + +CLEANBROKEN = "1" + +inherit pypi setuptools3 +# ptest disabled in OE-Core for now due to missing dependencies + + +SRC_URI += " \ + file://run-ptest \ +" + +do_install_ptest() { + install -d ${D}${PTEST_PATH}/tests + cp -rf ${S}/tests/* ${D}${PTEST_PATH}/tests/ +} + +RDEPENDS_${PN}-ptest += " \ + ${PYTHON_PN}-pytest \ + ${PYTHON_PN}-unixadmin \ +" + +RDEPENDS_${PN} += " \ + ${PYTHON_PN}-asyncio \ + ${PYTHON_PN}-crypt \ + ${PYTHON_PN}-io \ + ${PYTHON_PN}-json \ + ${PYTHON_PN}-markupsafe \ + ${PYTHON_PN}-math \ + ${PYTHON_PN}-netclient \ + ${PYTHON_PN}-numbers\ + ${PYTHON_PN}-pickle \ + ${PYTHON_PN}-pprint \ + ${PYTHON_PN}-shell \ + ${PYTHON_PN}-threading \ +" + +BBCLASSEXTEND = "native nativesdk" diff --git a/poky/meta/recipes-devtools/python/python3-libarchive-c_2.9.bb b/poky/meta/recipes-devtools/python/python3-libarchive-c_2.9.bb index 4983ae527..3a2d8733e 100644 --- a/poky/meta/recipes-devtools/python/python3-libarchive-c_2.9.bb +++ b/poky/meta/recipes-devtools/python/python3-libarchive-c_2.9.bb @@ -12,6 +12,10 @@ inherit pypi setuptools3 SRC_URI[md5sum] = "083bd2cb0043c1e22a52cb9a05e31532" SRC_URI[sha256sum] = "9919344cec203f5db6596a29b5bc26b07ba9662925a05e24980b84709232ef60" -RDEPENDS_${PN} += "libarchive" +RDEPENDS_${PN} += "\ + libarchive \ + ${PYTHON_PN}-ctypes \ + ${PYTHON_PN}-mmap \ +" BBCLASSEXTEND = "native" diff --git a/poky/meta/recipes-devtools/python/python3-magic_0.4.18.bb b/poky/meta/recipes-devtools/python/python3-magic_0.4.18.bb index be423adac..101b96d31 100644 --- a/poky/meta/recipes-devtools/python/python3-magic_0.4.18.bb +++ b/poky/meta/recipes-devtools/python/python3-magic_0.4.18.bb @@ -14,6 +14,9 @@ inherit pypi setuptools3 SRC_URI[md5sum] = "5edc6caa39cc62641850f6b1b6f284ba" SRC_URI[sha256sum] = "b757db2a5289ea3f1ced9e60f072965243ea43a2221430048fd8cacab17be0ce" -RDEPENDS_${PN} += "file" +RDEPENDS_${PN} += "file \ + ${PYTHON_PN}-ctypes \ + ${PYTHON_PN}-io \ + ${PYTHON_PN}-shell" BBCLASSEXTEND = "native" diff --git a/poky/meta/recipes-devtools/python/python3-mako_1.1.1.bb b/poky/meta/recipes-devtools/python/python3-mako_1.1.3.bb index bc38009de..cda4e9922 100644 --- a/poky/meta/recipes-devtools/python/python3-mako_1.1.1.bb +++ b/poky/meta/recipes-devtools/python/python3-mako_1.1.3.bb @@ -8,8 +8,7 @@ PYPI_PACKAGE = "Mako" inherit pypi setuptools3 -SRC_URI[md5sum] = "2660a4916f2f63456e6885c727b7cd2f" -SRC_URI[sha256sum] = "2984a6733e1d472796ceef37ad48c26f4a984bb18119bb2dbc37a44d8f6e75a4" +SRC_URI[sha256sum] = "8195c8c1400ceb53496064314c6736719c6f25e7479cd24c77be3d9361cddc27" RDEPENDS_${PN} = "${PYTHON_PN}-html \ ${PYTHON_PN}-netclient \ diff --git a/poky/meta/recipes-devtools/python/python3-markupsafe/run-ptest b/poky/meta/recipes-devtools/python/python3-markupsafe/run-ptest new file mode 100644 index 000000000..5cec71169 --- /dev/null +++ b/poky/meta/recipes-devtools/python/python3-markupsafe/run-ptest @@ -0,0 +1,3 @@ +#!/bin/sh + +pytest diff --git a/poky/meta/recipes-devtools/python/python3-markupsafe_1.1.1.bb b/poky/meta/recipes-devtools/python/python3-markupsafe_1.1.1.bb new file mode 100644 index 000000000..403a98a43 --- /dev/null +++ b/poky/meta/recipes-devtools/python/python3-markupsafe_1.1.1.bb @@ -0,0 +1,28 @@ +DESCRIPTION = "Implements a XML/HTML/XHTML Markup safe string for Python" +HOMEPAGE = "http://github.com/mitsuhiko/markupsafe" +LICENSE = "BSD-3-Clause" +LIC_FILES_CHKSUM = "file://LICENSE.rst;md5=ffeffa59c90c9c4a033c7574f8f3fb75" + +SRC_URI[md5sum] = "43fd756864fe42063068e092e220c57b" +SRC_URI[sha256sum] = "29872e92839765e546828bb7754a68c418d927cd064fd4708fab9fe9c8bb116b" + +PYPI_PACKAGE = "MarkupSafe" +inherit pypi setuptools3 +# ptest disabled in OE-Core for now due to missing dependencies + +RDEPENDS_${PN} += "${PYTHON_PN}-stringold" + +BBCLASSEXTEND = "native nativesdk" + +SRC_URI += " \ + file://run-ptest \ +" + +RDEPENDS_${PN}-ptest += " \ + ${PYTHON_PN}-pytest \ +" + +do_install_ptest() { + install -d ${D}${PTEST_PATH}/tests + cp -f ${S}/tests/* ${D}${PTEST_PATH}/tests/ +} diff --git a/poky/meta/recipes-devtools/python/python3-pip_20.0.2.bb b/poky/meta/recipes-devtools/python/python3-pip_20.0.2.bb index 96973db77..99eeea2ed 100644 --- a/poky/meta/recipes-devtools/python/python3-pip_20.0.2.bb +++ b/poky/meta/recipes-devtools/python/python3-pip_20.0.2.bb @@ -1,5 +1,5 @@ SUMMARY = "The PyPA recommended tool for installing Python packages" -HOMEPAGE = "https://pypi.python.org/pypi/pip" +HOMEPAGE = "https://pypi.org/project/pip" SECTION = "devel/python" LICENSE = "MIT" LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=8ba06d529c955048e5ddd7c45459eb2e" diff --git a/poky/meta/recipes-devtools/python/python3-pycairo_1.19.0.bb b/poky/meta/recipes-devtools/python/python3-pycairo_1.19.1.bb index 8f60834c1..34c8543bc 100644 --- a/poky/meta/recipes-devtools/python/python3-pycairo_1.19.0.bb +++ b/poky/meta/recipes-devtools/python/python3-pycairo_1.19.1.bb @@ -13,8 +13,8 @@ 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] = "38b84416021640b01250c8f8ec4c52d4" -SRC_URI[sha256sum] = "4f5ba9374a46c98729dd3727d993f5e17ed0286fd6738ed464fe4efa0612d19c" +SRC_URI[md5sum] = "59bc5c5d1debc3af0f6791af9d612551" +SRC_URI[sha256sum] = "2c143183280feb67f5beb4e543fd49990c28e7df427301ede04fc550d3562e84" S = "${WORKDIR}/pycairo-${PV}" diff --git a/poky/meta/recipes-devtools/python/python3-pycryptodome_3.9.7.bb b/poky/meta/recipes-devtools/python/python3-pycryptodome_3.9.7.bb deleted file mode 100644 index 8f19984be..000000000 --- a/poky/meta/recipes-devtools/python/python3-pycryptodome_3.9.7.bb +++ /dev/null @@ -1,5 +0,0 @@ -require python-pycryptodome.inc -inherit setuptools3 - -SRC_URI[sha256sum] = "f1add21b6d179179b3c177c33d18a2186a09cc0d3af41ff5ed3f377360b869f2" - 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 new file mode 100644 index 000000000..46e122072 --- /dev/null +++ b/poky/meta/recipes-devtools/python/python3-pycryptodome_3.9.8.bb @@ -0,0 +1,5 @@ +require python-pycryptodome.inc +inherit setuptools3 + +SRC_URI[sha256sum] = "0e24171cf01021bc5dc17d6a9d4f33a048f09d62cc3f62541e95ef104588bda4" + diff --git a/poky/meta/recipes-devtools/python/python3-pycryptodomex_3.9.7.bb b/poky/meta/recipes-devtools/python/python3-pycryptodomex_3.9.8.bb index abb03b990..035c7fa63 100644 --- a/poky/meta/recipes-devtools/python/python3-pycryptodomex_3.9.7.bb +++ b/poky/meta/recipes-devtools/python/python3-pycryptodomex_3.9.8.bb @@ -1,7 +1,7 @@ require python-pycryptodome.inc inherit setuptools3 -SRC_URI[sha256sum] = "50163324834edd0c9ce3e4512ded3e221c969086e10fdd5d3fdcaadac5e24a78" +SRC_URI[sha256sum] = "48cc2cfc251f04a6142badeb666d1ff49ca6fdfc303fd72579f62b768aaa52b9" FILES_${PN}-tests = " \ ${PYTHON_SITEPACKAGES_DIR}/Cryptodome/SelfTest/ \ diff --git a/poky/meta/recipes-devtools/python/python3-pygments_2.5.2.bb b/poky/meta/recipes-devtools/python/python3-pygments_2.6.1.bb index 474b95494..bffef59e6 100644 --- a/poky/meta/recipes-devtools/python/python3-pygments_2.5.2.bb +++ b/poky/meta/recipes-devtools/python/python3-pygments_2.6.1.bb @@ -5,8 +5,8 @@ LICENSE = "BSD-2-Clause" LIC_FILES_CHKSUM = "file://LICENSE;md5=e1d7b7bffbfeaa14083fd2bd3236aea8" inherit setuptools3 -SRC_URI[md5sum] = "465a35559863089d959d783a69f79b9f" -SRC_URI[sha256sum] = "98c8aa5a9f778fcd1026a17361ddaf7330d1b7c62ae97c3bb0ae73e0b9b6b0fe" +SRC_URI[md5sum] = "a48c5219de92f12c41acba814730b31a" +SRC_URI[sha256sum] = "647344a061c249a3b74e230c739f434d7ea4d8b1d5f3721bc0f3558049b38f44" DEPENDS += "\ ${PYTHON_PN} \ diff --git a/poky/meta/recipes-devtools/python/python3-pygobject_3.34.0.bb b/poky/meta/recipes-devtools/python/python3-pygobject_3.36.1.bb index 6babf0cae..0a34d4373 100644 --- a/poky/meta/recipes-devtools/python/python3-pygobject_3.34.0.bb +++ b/poky/meta/recipes-devtools/python/python3-pygobject_3.36.1.bb @@ -14,8 +14,8 @@ 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] = "ca1dc4f31c1d6d283758e8f315a88ab6" -SRC_URI[sha256sum] = "87e2c9aa785f352ef111dcc5f63df9b85cf6e05e52ff04f803ffbebdacf5271a" +SRC_URI[md5sum] = "ebfebc4533856572281add29f08412bf" +SRC_URI[sha256sum] = "d1bf42802d1cec113b5adaa0e7bf7f3745b44521dc2163588d276d5cd61d718f" UNKNOWN_CONFIGURE_WHITELIST = "introspection" diff --git a/poky/meta/recipes-devtools/python/python3-setuptools/0001-change-shebang-to-python3.patch b/poky/meta/recipes-devtools/python/python3-setuptools/0001-change-shebang-to-python3.patch index 33af8daed..6dcf52771 100644 --- a/poky/meta/recipes-devtools/python/python3-setuptools/0001-change-shebang-to-python3.patch +++ b/poky/meta/recipes-devtools/python/python3-setuptools/0001-change-shebang-to-python3.patch @@ -8,8 +8,7 @@ Upstream-Status: Pending Signed-off-by: Changqing Li <changqing.li@windriver.com> --- pkg_resources/_vendor/appdirs.py | 2 +- - setuptools/command/easy_install.py | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) + 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/pkg_resources/_vendor/appdirs.py b/pkg_resources/_vendor/appdirs.py index ae67001..933e398 100644 @@ -21,16 +20,6 @@ index ae67001..933e398 100644 # -*- coding: utf-8 -*- # Copyright (c) 2005-2010 ActiveState Software Inc. # Copyright (c) 2013 Eddy Petrișor -diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py -index abca1ae..6bcdc98 100644 ---- a/setuptools/command/easy_install.py -+++ b/setuptools/command/easy_install.py -@@ -1,4 +1,4 @@ --#!/usr/bin/env python -+#!/usr/bin/env python3 - """ - Easy Install - ------------ -- 2.24.1 diff --git a/poky/meta/recipes-devtools/python/python3-setuptools_45.2.0.bb b/poky/meta/recipes-devtools/python/python3-setuptools_45.2.0.bb deleted file mode 100644 index 0dc1ed862..000000000 --- a/poky/meta/recipes-devtools/python/python3-setuptools_45.2.0.bb +++ /dev/null @@ -1,6 +0,0 @@ -require python-setuptools.inc -inherit setuptools3 - -do_install_append() { - mv ${D}${bindir}/easy_install ${D}${bindir}/easy3_install -} diff --git a/poky/meta/recipes-devtools/python/python-setuptools.inc b/poky/meta/recipes-devtools/python/python3-setuptools_49.6.0.bb index e9ad93dbe..360128b11 100644 --- a/poky/meta/recipes-devtools/python/python-setuptools.inc +++ b/poky/meta/recipes-devtools/python/python3-setuptools_49.6.0.bb @@ -1,19 +1,18 @@ SUMMARY = "Download, build, install, upgrade, and uninstall Python packages" -HOMEPAGE = "https://pypi.python.org/pypi/setuptools" +HOMEPAGE = "https://pypi.org/project/setuptools" SECTION = "devel/python" LICENSE = "MIT" LIC_FILES_CHKSUM = "file://LICENSE;beginline=1;endline=19;md5=9a33897f1bca1160d7aad3835152e158" PYPI_PACKAGE_EXT = "zip" -inherit pypi +inherit pypi setuptools3 SRC_URI_append_class-native = " file://0001-conditionally-do-not-fetch-code-by-easy_install.patch" SRC_URI += "file://0001-change-shebang-to-python3.patch" -SRC_URI[md5sum] = "0c956eea142af9c2b02d72e3c042af30" -SRC_URI[sha256sum] = "89c6e6011ec2f6d57d43a3f9296c4ef022c2cbf49bab26b407fe67992ae3397f" +SRC_URI[sha256sum] = "46bd862894ed22c2edff033c758c2dc026324788d758e96788e8f7c11f4e9707" DEPENDS += "${PYTHON_PN}" @@ -37,10 +36,15 @@ RDEPENDS_${PN} = "\ ${PYTHON_PN}-unittest \ ${PYTHON_PN}-xml \ " + do_install_prepend() { install -d ${D}${PYTHON_SITEPACKAGES_DIR} } +do_install_append() { + mv ${D}${bindir}/easy_install ${D}${bindir}/easy3_install +} + BBCLASSEXTEND = "native nativesdk" # The pkg-resources module can be used by itself, without the package downloader @@ -48,6 +52,12 @@ BBCLASSEXTEND = "native nativesdk" # minimal distributions. PACKAGES =+ "${PYTHON_PN}-pkg-resources " FILES_${PYTHON_PN}-pkg-resources = "${PYTHON_SITEPACKAGES_DIR}/pkg_resources/*" +RDEPENDS_${PYTHON_PN}-pkg-resources = "\ + ${PYTHON_PN}-compression \ + ${PYTHON_PN}-email \ + ${PYTHON_PN}-plistlib \ + ${PYTHON_PN}-pprint \ +" # Due to the way OE-Core implemented native recipes, the native class cannot # have a dependency on something that is not a recipe name. Work around that by # manually setting RPROVIDES. diff --git a/poky/meta/recipes-devtools/python/python3-six_1.14.0.bb b/poky/meta/recipes-devtools/python/python3-six_1.14.0.bb deleted file mode 100644 index 151c366ca..000000000 --- a/poky/meta/recipes-devtools/python/python3-six_1.14.0.bb +++ /dev/null @@ -1,5 +0,0 @@ -inherit setuptools3 -require python-six.inc - -SRC_URI[md5sum] = "21674588a57e649d1a6d977ec3122140" -SRC_URI[sha256sum] = "236bdbdce46e6e6a3d61a337c0f8b763ca1e8717c03b369e87a7ec7ce1319c0a" diff --git a/poky/meta/recipes-devtools/python/python3-six_1.15.0.bb b/poky/meta/recipes-devtools/python/python3-six_1.15.0.bb new file mode 100644 index 000000000..6c6f3f962 --- /dev/null +++ b/poky/meta/recipes-devtools/python/python3-six_1.15.0.bb @@ -0,0 +1,5 @@ +inherit setuptools3 +require python-six.inc + +SRC_URI[md5sum] = "9f90a0eaa0ea7747fda01ca79d21ebcb" +SRC_URI[sha256sum] = "30639c035cdb23534cd4aa2dd52c3bf48f06e5f4a941509c8bafd8ce11080259" diff --git a/poky/meta/recipes-devtools/python/python3-smmap_2.0.5.bb b/poky/meta/recipes-devtools/python/python3-smmap_3.0.4.bb index e87b8df8c..5f0f341d6 100644 --- a/poky/meta/recipes-devtools/python/python3-smmap_2.0.5.bb +++ b/poky/meta/recipes-devtools/python/python3-smmap_3.0.4.bb @@ -1,2 +1,3 @@ inherit setuptools3 require python-smmap.inc + diff --git a/poky/meta/recipes-devtools/python/python3-subunit_1.3.0.bb b/poky/meta/recipes-devtools/python/python3-subunit_1.4.0.bb index 55066e2d0..55066e2d0 100644 --- a/poky/meta/recipes-devtools/python/python3-subunit_1.3.0.bb +++ b/poky/meta/recipes-devtools/python/python3-subunit_1.4.0.bb diff --git a/poky/meta/recipes-devtools/python/python3-testtools_2.3.0.bb b/poky/meta/recipes-devtools/python/python3-testtools_2.4.0.bb index a254b90a7..a254b90a7 100644 --- a/poky/meta/recipes-devtools/python/python3-testtools_2.3.0.bb +++ b/poky/meta/recipes-devtools/python/python3-testtools_2.4.0.bb 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 acf8e1e9b..3e471b9a4 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,16 +1,17 @@ -From 85e8f86ad2b7dec0848cd55b8e810a5e2722b20a Mon Sep 17 00:00:00 2001 +From b880e78bf4a1852e260188e6df3ec6034403d2fc 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 Upstream-Status: Inappropriate [oe-core specific] Signed-off-by: Jeremy Puhlman <jpuhlman@mvista.com> + --- setup.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py -index 9da1b3a..59782c0 100644 +index 7208cd0..c0bd0ad 100644 --- a/setup.py +++ b/setup.py @@ -674,8 +674,8 @@ class PyBuildExt(build_ext): @@ -24,6 +25,3 @@ index 9da1b3a..59782c0 100644 # lib_dirs and inc_dirs are used to search for files; # if a file is found in one of those directories, it can # be assumed that no additional -I,-L directives are needed. --- -2.24.1 - 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 e7af3c6f5..2b68c0acc 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 7ada9c749f6beb51c13a3debc850755e911548a6 Mon Sep 17 00:00:00 2001 +From bc59d49efff41051034d7fbf5d0c8505e4c3134b 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-setup.py-pass-missing-libraries-to-Extension-for-mul.patch b/poky/meta/recipes-devtools/python/python3/0001-setup.py-pass-missing-libraries-to-Extension-for-mul.patch index d38ed61dd..ea0af02e7 100644 --- a/poky/meta/recipes-devtools/python/python3/0001-setup.py-pass-missing-libraries-to-Extension-for-mul.patch +++ b/poky/meta/recipes-devtools/python/python3/0001-setup.py-pass-missing-libraries-to-Extension-for-mul.patch @@ -46,7 +46,7 @@ ValueError: semaphore or lock released too many times And the semaphore issue also caused multiprocessing.Queue().put() hung. -Upstream-Status: Pensing +Upstream-Status: Pending Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> 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 61ac3e71d..820fb98ed 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,4 +1,4 @@ -From 251347fc970a397a9cd63ed3f87c5e6c52e15187 Mon Sep 17 00:00:00 2001 +From 064187668fcbefdd39a8cde372bf651124c3e578 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 diff --git a/poky/meta/recipes-devtools/python/python3/get_module_deps3.py b/poky/meta/recipes-devtools/python/python3/get_module_deps3.py index fd12baad8..6806f2317 100644 --- a/poky/meta/recipes-devtools/python/python3/get_module_deps3.py +++ b/poky/meta/recipes-devtools/python/python3/get_module_deps3.py @@ -9,6 +9,7 @@ debug=False import sys +import os # We can get a list of the modules which are currently required to run python # so we run python-core and get its modules, we then import what we need @@ -48,8 +49,19 @@ current_module = str(sys.argv[1]).rstrip() if(debug==True): log = open('log_%s' % current_module,'w') log.write('Module %s generated the following dependencies:\n' % current_module) -try: - importlib.import_module('%s' % current_module) +try: + m = importlib.import_module(current_module) + # handle python packages which may not include all modules in the __init__ + if os.path.basename(m.__file__) == "__init__.py": + modulepath = os.path.dirname(m.__file__) + for i in os.listdir(modulepath): + if i.startswith("_") or not(i.endswith(".py")): + continue + submodule = "{}.{}".format(current_module, i[:-3]) + try: + importlib.import_module(submodule) + except: + pass # ignore all import or other exceptions raised during import except ImportError as e: if (debug==True): log.write('Module was not found') @@ -107,6 +119,8 @@ for item in dif: dep_path = dep_path.replace(soabi,'*') print (dep_path) continue + if "_sysconfigdata" in dep_path: + dep_path = dep_path.replace(sysconfig._get_sysconfigdata_name(), "_sysconfigdata*") if (debug==True): log.write(dep_path+'\n') @@ -140,6 +154,8 @@ for item in dif: log.write(cached) cached = fix_path(cached) cached = cached.replace(cpython_tag,'*') + if "_sysconfigdata" in cached: + cached = cached.replace(sysconfig._get_sysconfigdata_name(), "_sysconfigdata*") print (cached) if debug==True: diff --git a/poky/meta/recipes-devtools/python/python3/python3-manifest.json b/poky/meta/recipes-devtools/python/python3/python3-manifest.json index 3bcc9b866..69aecb700 100644 --- a/poky/meta/recipes-devtools/python/python3/python3-manifest.json +++ b/poky/meta/recipes-devtools/python/python3/python3-manifest.json @@ -285,7 +285,7 @@ "${libdir}/python${PYTHON_MAJMIN}/operator.py", "${libdir}/python${PYTHON_MAJMIN}/optparse.py", "${libdir}/python${PYTHON_MAJMIN}/os.py", - "${libdir}/python${PYTHON_MAJMIN}/pathlib.py", + "${libdir}/python${PYTHON_MAJMIN}/pathlib.py", "${libdir}/python${PYTHON_MAJMIN}/pkgutil.py", "${libdir}/python${PYTHON_MAJMIN}/platform.py", "${libdir}/python${PYTHON_MAJMIN}/posixpath.py", @@ -313,6 +313,8 @@ "${libdir}/python${PYTHON_MAJMIN}/tokenize.py", "${libdir}/python${PYTHON_MAJMIN}/traceback.py", "${libdir}/python${PYTHON_MAJMIN}/types.py", + "${libdir}/python${PYTHON_MAJMIN}/urllib", + "${libdir}/python${PYTHON_MAJMIN}/urllib/parse.py", "${libdir}/python${PYTHON_MAJMIN}/warnings.py", "${libdir}/python${PYTHON_MAJMIN}/weakref.py", "${prefix}/lib/python${PYTHON_MAJMIN}/config*/*[!.a]" @@ -324,7 +326,7 @@ "${libdir}/python${PYTHON_MAJMIN}/__pycache__/_compression.*.pyc", "${libdir}/python${PYTHON_MAJMIN}/__pycache__/_markupbase.*.pyc", "${libdir}/python${PYTHON_MAJMIN}/__pycache__/_sitebuiltins.*.pyc", - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/_sysconfigdata.*.pyc", + "${libdir}/python${PYTHON_MAJMIN}/__pycache__/_sysconfigdata*.*.pyc", "${libdir}/python${PYTHON_MAJMIN}/__pycache__/_weakrefset.*.pyc", "${libdir}/python${PYTHON_MAJMIN}/__pycache__/abc.*.pyc", "${libdir}/python${PYTHON_MAJMIN}/__pycache__/argparse.*.pyc", @@ -359,7 +361,7 @@ "${libdir}/python${PYTHON_MAJMIN}/__pycache__/operator.*.pyc", "${libdir}/python${PYTHON_MAJMIN}/__pycache__/optparse.*.pyc", "${libdir}/python${PYTHON_MAJMIN}/__pycache__/os.*.pyc", - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/pathlib.*.pyc", + "${libdir}/python${PYTHON_MAJMIN}/__pycache__/pathlib.*.pyc", "${libdir}/python${PYTHON_MAJMIN}/__pycache__/pkgutil.*.pyc", "${libdir}/python${PYTHON_MAJMIN}/__pycache__/platform.*.pyc", "${libdir}/python${PYTHON_MAJMIN}/__pycache__/posixpath.*.pyc", @@ -397,7 +399,9 @@ "${libdir}/python${PYTHON_MAJMIN}/importlib/__pycache__", "${libdir}/python${PYTHON_MAJMIN}/importlib/__pycache__/abc.*.pyc", "${libdir}/python${PYTHON_MAJMIN}/importlib/__pycache__/machinery.*.pyc", - "${libdir}/python${PYTHON_MAJMIN}/importlib/__pycache__/util.*.pyc" + "${libdir}/python${PYTHON_MAJMIN}/importlib/__pycache__/util.*.pyc", + "${libdir}/python${PYTHON_MAJMIN}/urllib/__pycache__", + "${libdir}/python${PYTHON_MAJMIN}/urllib/__pycache__/parse.*.pyc" ] }, "crypt": { @@ -427,7 +431,10 @@ "ctypes": { "summary": "Python C types support", "rdepends": [ - "core" + "core", + "crypt", + "io", + "math" ], "files": [ "${libdir}/python${PYTHON_MAJMIN}/ctypes", @@ -537,7 +544,10 @@ "distutils": { "summary": "Python Distribution Utilities", "rdepends": [ - "core" + "compression", + "core", + "email", + "stringold" ], "files": [ "${libdir}/python${PYTHON_MAJMIN}/distutils" @@ -548,7 +558,6 @@ "summary": "Python framework for running examples in docstrings", "rdepends": [ "asyncio", - "compression", "core", "debugger", "difflib", @@ -577,7 +586,9 @@ "datetime", "io", "math", - "netclient" + "mime", + "netclient", + "stringold" ], "files": [ "${libdir}/python${PYTHON_MAJMIN}/email", @@ -648,7 +659,6 @@ "io": { "summary": "Python low-level I/O", "rdepends": [ - "compression", "core", "crypt", "math", @@ -690,7 +700,11 @@ "summary": "Python logging support", "rdepends": [ "core", - "stringold" + "io", + "netserver", + "pickle", + "stringold", + "threading" ], "files": [ "${libdir}/python${PYTHON_MAJMIN}/logging" @@ -824,11 +838,18 @@ "summary": "Python multiprocessing support", "rdepends": [ "core", + "crypt", + "ctypes", "io", - "pickle" + "math", + "mmap", + "netclient", + "pickle", + "threading" ], "files": [ "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_multiprocessing.*.so", + "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_posixshmem.*.so", "${libdir}/python${PYTHON_MAJMIN}/multiprocessing" ], "cached": [] @@ -855,10 +876,9 @@ "${libdir}/python${PYTHON_MAJMIN}/mimetypes.py", "${libdir}/python${PYTHON_MAJMIN}/nntplib.py", "${libdir}/python${PYTHON_MAJMIN}/poplib.py", + "${libdir}/python${PYTHON_MAJMIN}/secrets.py", "${libdir}/python${PYTHON_MAJMIN}/smtplib.py", "${libdir}/python${PYTHON_MAJMIN}/telnetlib.py", - "${libdir}/python${PYTHON_MAJMIN}/urllib", - "${libdir}/python${PYTHON_MAJMIN}/urllib/__pycache__", "${libdir}/python${PYTHON_MAJMIN}/uuid.py" ], "cached": [ @@ -868,6 +888,7 @@ "${libdir}/python${PYTHON_MAJMIN}/__pycache__/mimetypes.*.pyc", "${libdir}/python${PYTHON_MAJMIN}/__pycache__/nntplib.*.pyc", "${libdir}/python${PYTHON_MAJMIN}/__pycache__/poplib.*.pyc", + "${libdir}/python${PYTHON_MAJMIN}/__pycache__/secrets.*.pyc", "${libdir}/python${PYTHON_MAJMIN}/__pycache__/smtplib.*.pyc", "${libdir}/python${PYTHON_MAJMIN}/__pycache__/telnetlib.*.pyc", "${libdir}/python${PYTHON_MAJMIN}/__pycache__/uuid.*.pyc" @@ -876,7 +897,6 @@ "netserver": { "summary": "Python Internet Protocol servers", "rdepends": [ - "compression", "core", "crypt", "datetime", @@ -992,8 +1012,7 @@ "pydoc": { "summary": "Python interactive help support", "rdepends": [ - "core", - "netclient" + "core" ], "files": [ "${bindir}/pydoc*", @@ -1017,7 +1036,6 @@ "shell": { "summary": "Python shell-like functionality", "rdepends": [ - "compression", "core", "stringold" ], @@ -1150,7 +1168,6 @@ "summary": "Python unit testing framework", "rdepends": [ "asyncio", - "compression", "core", "difflib", "io", @@ -1185,7 +1202,6 @@ "venv": { "summary": "Provides support for creating lightweight virtual environments with their own site directories, optionally isolated from system site directories.", "rdepends": [ - "compression", "core", "logging", "stringold" @@ -1211,7 +1227,21 @@ "xmlrpc": { "summary": "Python XML-RPC support", "rdepends": [ + "compression", "core", + "crypt", + "datetime", + "email", + "fcntl", + "html", + "io", + "math", + "mime", + "netclient", + "netserver", + "numbers", + "pydoc", + "stringold", "xml" ], "files": [ diff --git a/poky/meta/recipes-devtools/python/python3_3.8.2.bb b/poky/meta/recipes-devtools/python/python3_3.8.5.bb index 0474f0721..cabe5dc07 100644 --- a/poky/meta/recipes-devtools/python/python3_3.8.2.bb +++ b/poky/meta/recipes-devtools/python/python3_3.8.5.bb @@ -32,7 +32,6 @@ SRC_URI = "http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.xz \ 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-bpo-39503-CVE-2020-8492-Fix-AbstractBasicAuthHandler.patch \ " SRC_URI_append_class-native = " \ @@ -41,8 +40,8 @@ SRC_URI_append_class-native = " \ file://0001-Don-t-search-system-for-headers-libraries.patch \ " -SRC_URI[md5sum] = "e9d6ebc92183a177b8e8a58cad5b8d67" -SRC_URI[sha256sum] = "2646e7dc233362f59714c6193017bb2d6f7b38d6ab4a0cb5fbac5c36c4d845df" +SRC_URI[md5sum] = "35b5a3d0254c1c59be9736373d429db7" +SRC_URI[sha256sum] = "e3003ed57db17e617acb382b0cade29a248c6026b1bd8aad1f976e9af66a83b0" # exclude pre-releases for both python 2.x and 3.x UPSTREAM_CHECK_REGEX = "[Pp]ython-(?P<pver>\d+(\.\d+)+).tar" @@ -83,16 +82,16 @@ CACHED_CONFIGUREVARS = " \ ac_cv_file__dev_ptc=no \ ac_cv_working_tzset=yes \ " -python() { + +def possibly_include_pgo(d): # PGO currently causes builds to not be reproducible, so disable it for # now. See YOCTO #13407 if bb.utils.contains('MACHINE_FEATURES', 'qemu-usermode', True, False, d) and d.getVar('BUILD_REPRODUCIBLE_BINARIES') != '1': - d.setVar('PACKAGECONFIG_PGO', 'pgo') - else: - d.setVar('PACKAGECONFIG_PGO', '') -} + return 'pgo' + + return '' -PACKAGECONFIG_class-target ??= "readline ${PACKAGECONFIG_PGO} gdbm" +PACKAGECONFIG_class-target ??= "readline ${@possibly_include_pgo(d)} gdbm" PACKAGECONFIG_class-native ??= "readline gdbm" PACKAGECONFIG_class-nativesdk ??= "readline gdbm" PACKAGECONFIG[readline] = ",,readline" @@ -332,7 +331,15 @@ INSANE_SKIP_${PN}-dev += "dev-elf" # catch all the rest (unsorted) PACKAGES += "${PN}-misc" -RDEPENDS_${PN}-misc += "python3-core python3-email python3-codecs python3-pydoc python3-pickle python3-audio" +RDEPENDS_${PN}-misc += "\ + ${PN}-core \ + ${PN}-email \ + ${PN}-codecs \ + ${PN}-pydoc \ + ${PN}-pickle \ + ${PN}-audio \ + ${PN}-numbers \ +" RDEPENDS_${PN}-modules_append_class-target = " ${MLPREFIX}python3-misc" RDEPENDS_${PN}-modules_append_class-nativesdk = " ${MLPREFIX}python3-misc" FILES_${PN}-misc = "${libdir}/python${PYTHON_MAJMIN} ${libdir}/python${PYTHON_MAJMIN}/lib-dynload" @@ -343,9 +350,11 @@ FILES_${PN}-man = "${datadir}/man" # See https://bugs.python.org/issue18748 and https://bugs.python.org/issue37395 RDEPENDS_libpython3_append_libc-glibc = " libgcc" +RDEPENDS_${PN}-ctypes_append_libc-glibc = " ${MLPREFIX}ldconfig" RDEPENDS_${PN}-ptest = "${PN}-modules ${PN}-tests unzip bzip2 libgcc tzdata-europe coreutils sed" RDEPENDS_${PN}-ptest_append_libc-glibc = " locale-base-tr-tr.iso-8859-9" RDEPENDS_${PN}-tkinter += "${@bb.utils.contains('PACKAGECONFIG', 'tk', 'tk tk-lib', '', d)}" +RDEPENDS_${PN}-idle += "${@bb.utils.contains('PACKAGECONFIG', 'tk', '${PN}-tkinter tcl', '', d)}" RDEPENDS_${PN}-dev = "" RDEPENDS_${PN}-tests_append_class-target = " ${MLPREFIX}bash" |