meta-openembedded and poky: subtree updates

Squash of the following due to dependencies among them
and OpenBMC changes:

meta-openembedded: subtree update:d0748372d2..9201611135
meta-openembedded: subtree update:9201611135..17fd382f34
poky: subtree update:9052e5b32a..2e11d97b6c
poky: subtree update:2e11d97b6c..a8544811d7

The change log was too large for the jenkins plugin
to handle therefore it has been removed. Here is
the first and last commit of each subtree:

meta-openembedded:d0748372d2
      cppzmq: bump to version 4.6.0
meta-openembedded:17fd382f34
      mpv: Remove X11 dependency
poky:9052e5b32a
      package_ipk: Remove pointless comment to trigger rebuild
poky:a8544811d7
      pbzip2: Fix license warning

Change-Id: If0fc6c37629642ee207a4ca2f7aa501a2c673cd6
Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
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
new file mode 100644
index 0000000..e16b99b
--- /dev/null
+++ b/poky/meta/recipes-devtools/python/files/0001-bpo-39503-CVE-2020-8492-Fix-AbstractBasicAuthHandler.patch
@@ -0,0 +1,248 @@
+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 169d1b1..5f99cd2 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 5bba4f57f048016aa92ce5909e9e372db619554e Mon Sep 17 00:00:00 2001
+From a8f871c9ebc4fcb99d4163b226aabeef26567099 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 @@
  1 file changed, 5 insertions(+)
 
 diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py
-index 05508ce..945e118 100755
+index 426301d..55c8062 100644
 --- a/setuptools/command/easy_install.py
 +++ b/setuptools/command/easy_install.py
-@@ -640,6 +640,11 @@ class easy_install(Command):
+@@ -649,6 +649,11 @@ class easy_install(Command):
              os.path.exists(tmpdir) and rmtree(rmtree_safe(tmpdir))
  
      def easy_install(self, spec, deps=False):
diff --git a/poky/meta/recipes-devtools/python/python-cython.inc b/poky/meta/recipes-devtools/python/python-cython.inc
new file mode 100644
index 0000000..437e796
--- /dev/null
+++ b/poky/meta/recipes-devtools/python/python-cython.inc
@@ -0,0 +1,41 @@
+DESCRIPTION = "Cython is a language specially designed for writing Python extension modules. \
+It's designed to bridge the gap between the nice, high-level, easy-to-use world of Python \
+and the messy, low-level world of C."
+SECTION = "devel/python"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=e23fadd6ceef8c618fc1c65191d846fa"
+PYPI_PACKAGE = "Cython"
+BBCLASSEXTEND = "native nativesdk"
+
+SRC_URI[md5sum] = "a899abaa48b68bb679aef45ceb4b89d3"
+SRC_URI[sha256sum] = "232755284f942cbb3b43a06cd85974ef3c970a021aef19b5243c03ee2b08fa05"
+UPSTREAM_CHECK_REGEX = "Cython-(?P<pver>.*)\.tar"
+
+inherit pypi
+
+RDEPENDS_${PN}_class-target += "\
+    ${PYTHON_PN}-misc \
+    ${PYTHON_PN}-netserver \
+    ${PYTHON_PN}-pkgutil \
+    ${PYTHON_PN}-pyparsing \
+    ${PYTHON_PN}-setuptools \
+    ${PYTHON_PN}-shell \
+    ${PYTHON_PN}-xml \
+"
+
+RDEPENDS_${PN}_class-nativesdk += "\
+    nativesdk-${PYTHON_PN}-misc \
+    nativesdk-${PYTHON_PN}-netserver \
+    nativesdk-${PYTHON_PN}-pkgutil \
+    nativesdk-${PYTHON_PN}-pyparsing \
+    nativesdk-${PYTHON_PN}-setuptools \
+    nativesdk-${PYTHON_PN}-shell \
+    nativesdk-${PYTHON_PN}-xml \
+"
+
+do_install_append() {
+	# Make sure we use /usr/bin/env python
+	for PYTHSCRIPT in `grep -rIl '^#!.*python' ${D}`; do
+		sed -i -e '1s|^#!.*|#!/usr/bin/env ${PYTHON_PN}|' $PYTHSCRIPT
+	done
+}
diff --git a/poky/meta/recipes-devtools/python/python-gitdb.inc b/poky/meta/recipes-devtools/python/python-gitdb.inc
index 633752f..23ec298 100644
--- a/poky/meta/recipes-devtools/python/python-gitdb.inc
+++ b/poky/meta/recipes-devtools/python/python-gitdb.inc
@@ -8,8 +8,8 @@
 
 PYPI_PACKAGE = "gitdb2"
 
-SRC_URI[md5sum] = "94e59e5fb00960541f6e137b1456ab0a"
-SRC_URI[sha256sum] = "83361131a1836661a155172932a13c08bda2db3674e4caa32368aa6eb02f38c2"
+SRC_URI[md5sum] = "1a7ea3362e405f8a5634f7ee53636094"
+SRC_URI[sha256sum] = "1b6df1433567a51a4a9c1a5a0de977aa351a405cc56d7d35f3388bad1f630350"
 
 DEPENDS = "${PYTHON_PN}-async ${PYTHON_PN}-setuptools-native ${PYTHON_PN}-smmap"
 
diff --git a/poky/meta/recipes-devtools/python/python-native/0001-python-native-fix-one-do_populate_sysroot-warning.patch b/poky/meta/recipes-devtools/python/python-native/0001-python-native-fix-one-do_populate_sysroot-warning.patch
deleted file mode 100644
index 707ee59..0000000
--- a/poky/meta/recipes-devtools/python/python-native/0001-python-native-fix-one-do_populate_sysroot-warning.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-From 6cbb7529cf7ff0da3ca649fb3486facd9620d625 Mon Sep 17 00:00:00 2001
-From: Changqing Li <changqing.li@windriver.com>
-Date: Thu, 25 Oct 2018 07:32:14 +0000
-Subject: [PATCH] python-native: fix one do_populate_sysroot warning
-
-Fix below warning:
-WARNING: Skipping RPATH /usr/lib64 as is a standard search path for
-work/x86_64-linux/python-native/2.7.15-r1.1/recipe-sysroot-native/
-usr/lib/python2.7/lib-dynload/_bsddb.so
-
-setup.py will check db.h under include_dirs, for native build,
-/usr/lib64 will be insert to postion 0 of include_dirs, so
-it's priority is higher then our sysroot, cause db.h sysroot
-is ignored, and rpath set to /usr/lib64. and this cause warning
-when do_populate_sysroot. use append to fix it.
-
-Upstream-Status: Inappropriate [oe-specific]
-
-Signed-off-by: Changqing Li <changqing.li@windriver.com>
-
----
- setup.py | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/setup.py b/setup.py
-index a2c8127..22f9e23 100644
---- a/setup.py
-+++ b/setup.py
-@@ -47,7 +47,7 @@ def add_dir_to_list(dirlist, dir):
-         else:
-             dir_exists = os.path.isdir(dir)
-         if dir_exists:
--            dirlist.insert(0, dir)
-+            dirlist.append(dir)
- 
- MACOS_SDK_ROOT = None
- 
--- 
-2.17.1
-
diff --git a/poky/meta/recipes-devtools/python/python-native/10-distutils-fix-swig-parameter.patch b/poky/meta/recipes-devtools/python/python-native/10-distutils-fix-swig-parameter.patch
deleted file mode 100644
index a39247c..0000000
--- a/poky/meta/recipes-devtools/python/python-native/10-distutils-fix-swig-parameter.patch
+++ /dev/null
@@ -1,18 +0,0 @@
-Upstream-Status: Pending
-
-# Some versions of SWIG do not use the extension parameter.
-# Make it optional.
-# Signed-Off: Michael 'Mickey' Lauer <mickey@vanille-media.de>
-Index: Python-2.6.1/Lib/distutils/command/build_ext.py
-===================================================================
---- Python-2.6.1.orig/Lib/distutils/command/build_ext.py
-+++ Python-2.6.1/Lib/distutils/command/build_ext.py
-@@ -566,7 +566,7 @@ class build_ext (Command):
-             target_lang=language)
- 
- 
--    def swig_sources (self, sources, extension):
-+    def swig_sources (self, sources, extension=None):
- 
-         """Walk the list of source files in 'sources', looking for SWIG
-         interface (.i) files.  Run SWIG on all that are found, and
diff --git a/poky/meta/recipes-devtools/python/python-native/11-distutils-never-modify-shebang-line.patch b/poky/meta/recipes-devtools/python/python-native/11-distutils-never-modify-shebang-line.patch
deleted file mode 100644
index c92469b..0000000
--- a/poky/meta/recipes-devtools/python/python-native/11-distutils-never-modify-shebang-line.patch
+++ /dev/null
@@ -1,20 +0,0 @@
-Upstream-Status: Pending
-
-# Don't modify the she-bang line for a cross-build.
-# Otherwise it points to our hostpython (which we do not want)
-#
-# Signed-Off: Michael 'Mickey' Lauer <mickey@vanille-media.de>
-
-Index: Python-2.6.1/Lib/distutils/command/build_scripts.py
-===================================================================
---- Python-2.6.1.orig/Lib/distutils/command/build_scripts.py
-+++ Python-2.6.1/Lib/distutils/command/build_scripts.py
-@@ -87,7 +87,7 @@ class build_scripts (Command):
-                     continue
- 
-                 match = first_line_re.match(first_line)
--                if match:
-+                if False: #match:
-                     adjust = 1
-                     post_interp = match.group(1) or ''
- 
diff --git a/poky/meta/recipes-devtools/python/python-native/multilib.patch b/poky/meta/recipes-devtools/python/python-native/multilib.patch
deleted file mode 100644
index af0f173..0000000
--- a/poky/meta/recipes-devtools/python/python-native/multilib.patch
+++ /dev/null
@@ -1,235 +0,0 @@
-Rebased for Python 2.7.9
-
-Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com>
-
-2011/09/29
-The python recipe building was failing because python-native 
-could not handle sys.lib var. sys.lib var is defined in the 
-multilib patch hence added this multilib.patch for python-native 
-recipe.
-
-Upstream-Status: Inappropriate [oe-specific]
-
-Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
-
-Index: Python-2.7.14/Include/pythonrun.h
-===================================================================
---- Python-2.7.14.orig/Include/pythonrun.h
-+++ Python-2.7.14/Include/pythonrun.h
-@@ -108,6 +108,7 @@ PyAPI_FUNC(char *) Py_GetPath(void);
- /* In their own files */
- PyAPI_FUNC(const char *) Py_GetVersion(void);
- PyAPI_FUNC(const char *) Py_GetPlatform(void);
-+PyAPI_FUNC(const char *) Py_GetLib(void);
- PyAPI_FUNC(const char *) Py_GetCopyright(void);
- PyAPI_FUNC(const char *) Py_GetCompiler(void);
- PyAPI_FUNC(const char *) Py_GetBuildInfo(void);
-Index: Python-2.7.14/Lib/distutils/command/install.py
-===================================================================
---- Python-2.7.14.orig/Lib/distutils/command/install.py
-+++ Python-2.7.14/Lib/distutils/command/install.py
-@@ -22,6 +22,8 @@ from site import USER_BASE
- from site import USER_SITE
- 
- 
-+libname = sys.lib
-+
- if sys.version < "2.2":
-     WINDOWS_SCHEME = {
-         'purelib': '$base',
-@@ -42,7 +44,7 @@ else:
- INSTALL_SCHEMES = {
-     'unix_prefix': {
-         'purelib': '$base/lib/python$py_version_short/site-packages',
--        'platlib': '$platbase/lib/python$py_version_short/site-packages',
-+        'platlib': '$platbase/'+libname+'/python$py_version_short/site-packages',
-         'headers': '$base/include/python$py_version_short/$dist_name',
-         'scripts': '$base/bin',
-         'data'   : '$base',
-Index: Python-2.7.14/Lib/pydoc.py
-===================================================================
---- Python-2.7.14.orig/Lib/pydoc.py
-+++ Python-2.7.14/Lib/pydoc.py
-@@ -375,7 +375,7 @@ class Doc:
-     docmodule = docclass = docroutine = docother = docproperty = docdata = fail
- 
-     def getdocloc(self, object,
--                  basedir=os.path.join(sys.exec_prefix, "lib",
-+                  basedir=os.path.join(sys.exec_prefix, "sys.lib",
-                                        "python"+sys.version[0:3])):
-         """Return the location of module docs or None"""
- 
-Index: Python-2.7.14/Lib/site.py
-===================================================================
---- Python-2.7.14.orig/Lib/site.py
-+++ Python-2.7.14/Lib/site.py
-@@ -288,13 +288,19 @@ def getsitepackages():
-         if sys.platform in ('os2emx', 'riscos'):
-             sitepackages.append(os.path.join(prefix, "Lib", "site-packages"))
-         elif os.sep == '/':
--            sitepackages.append(os.path.join(prefix, "lib",
-+            sitepackages.append(os.path.join(prefix, sys.lib,
-                                         "python" + sys.version[:3],
-                                         "site-packages"))
--            sitepackages.append(os.path.join(prefix, "lib", "site-python"))
-+            if sys.lib != "lib":
-+                sitepackages.append(os.path.join(prefix, "lib",
-+                                        "python" + sys.version[:3],
-+                                        "site-packages"))
-+            sitepackages.append(os.path.join(prefix, sys.lib, "site-python"))
-+            if sys.lib != "lib":
-+                sitepackages.append(os.path.join(prefix, "lib", "site-python"))
-         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):
-Index: Python-2.7.14/Lib/test/test_dl.py
-===================================================================
---- Python-2.7.14.orig/Lib/test/test_dl.py
-+++ Python-2.7.14/Lib/test/test_dl.py
-@@ -4,10 +4,11 @@
- import unittest
- from test.test_support import verbose, import_module
- dl = import_module('dl', deprecated=True)
-+import sys
- 
- sharedlibs = [
--    ('/usr/lib/libc.so', 'getpid'),
--    ('/lib/libc.so.6', 'getpid'),
-+    ('/usr/'+sys.lib+'/libc.so', 'getpid'),
-+    ('/'+sys.lib+'/libc.so.6', 'getpid'),
-     ('/usr/bin/cygwin1.dll', 'getpid'),
-     ('/usr/lib/libc.dylib', 'getpid'),
-     ]
-Index: Python-2.7.14/Lib/trace.py
-===================================================================
---- Python-2.7.14.orig/Lib/trace.py
-+++ Python-2.7.14/Lib/trace.py
-@@ -754,10 +754,10 @@ def main(argv=None):
-                 # should I also call expanduser? (after all, could use $HOME)
- 
-                 s = s.replace("$prefix",
--                              os.path.join(sys.prefix, "lib",
-+                              os.path.join(sys.prefix, sys.lib,
-                                            "python" + sys.version[:3]))
-                 s = s.replace("$exec_prefix",
--                              os.path.join(sys.exec_prefix, "lib",
-+                              os.path.join(sys.exec_prefix, sys.lib,
-                                            "python" + sys.version[:3]))
-                 s = os.path.normpath(s)
-                 ignore_dirs.append(s)
-Index: Python-2.7.14/Makefile.pre.in
-===================================================================
---- Python-2.7.14.orig/Makefile.pre.in
-+++ Python-2.7.14/Makefile.pre.in
-@@ -91,6 +91,7 @@ PY_CFLAGS=	$(CFLAGS) $(CPPFLAGS) $(CFLAG
- 
- # Machine-dependent subdirectories
- MACHDEP=	@MACHDEP@
-+LIB=		@LIB@
- 
- # Multiarch directory (may be empty)
- MULTIARCH=	@MULTIARCH@
-@@ -110,7 +111,7 @@ LIBDIR=		@libdir@
- MANDIR=		@mandir@
- INCLUDEDIR=	@includedir@
- CONFINCLUDEDIR=	$(exec_prefix)/include
--SCRIPTDIR=	$(prefix)/lib
-+SCRIPTDIR=	$(prefix)/@LIB@
- 
- # Detailed destination directories
- BINLIBDEST=	$(LIBDIR)/python$(VERSION)
-@@ -644,6 +645,7 @@ Modules/getpath.o: $(srcdir)/Modules/get
- 		-DEXEC_PREFIX='"$(exec_prefix)"' \
- 		-DVERSION='"$(VERSION)"' \
- 		-DVPATH='"$(VPATH)"' \
-+		-DLIB='"$(LIB)"' \
- 		-o $@ $(srcdir)/Modules/getpath.c
- 
- Modules/python.o: $(srcdir)/Modules/python.c
-@@ -692,7 +694,7 @@ regen-ast:
- Python/compile.o Python/symtable.o Python/ast.o: $(srcdir)/Include/graminit.h $(srcdir)/Include/Python-ast.h
- 
- Python/getplatform.o: $(srcdir)/Python/getplatform.c
--		$(CC) -c $(PY_CFLAGS) -DPLATFORM='"$(MACHDEP)"' -o $@ $(srcdir)/Python/getplatform.c
-+		$(CC) -c $(PY_CFLAGS) -DPLATFORM='"$(MACHDEP)"' -DLIB='"$(LIB)"' -o $@ $(srcdir)/Python/getplatform.c
- 
- Python/importdl.o: $(srcdir)/Python/importdl.c
- 		$(CC) -c $(PY_CFLAGS) -I$(DLINCLDIR) -o $@ $(srcdir)/Python/importdl.c
-Index: Python-2.7.14/Modules/getpath.c
-===================================================================
---- Python-2.7.14.orig/Modules/getpath.c
-+++ Python-2.7.14/Modules/getpath.c
-@@ -100,6 +100,13 @@
- #error "PREFIX, EXEC_PREFIX, VERSION, and VPATH must be constant defined"
- #endif
- 
-+#define LIB_PYTHON LIB "/python" VERSION
-+
-+#ifndef PYTHONPATH
-+#define PYTHONPATH PREFIX "/" LIB_PYTHON ":" \
-+        EXEC_PREFIX "/" LIB_PYTHON "/lib-dynload"
-+#endif
-+
- #ifndef LANDMARK
- #define LANDMARK "os.py"
- #endif
-@@ -108,7 +115,7 @@ static char prefix[MAXPATHLEN+1];
- static char exec_prefix[MAXPATHLEN+1];
- static char progpath[MAXPATHLEN+1];
- static char *module_search_path = NULL;
--static char lib_python[] = "lib/python" VERSION;
-+static char lib_python[] = LIB_PYTHON;
- 
- static void
- reduce(char *dir)
-Index: Python-2.7.14/Python/getplatform.c
-===================================================================
---- Python-2.7.14.orig/Python/getplatform.c
-+++ Python-2.7.14/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;
-+}
-Index: Python-2.7.14/Python/sysmodule.c
-===================================================================
---- Python-2.7.14.orig/Python/sysmodule.c
-+++ Python-2.7.14/Python/sysmodule.c
-@@ -1437,6 +1437,8 @@ _PySys_Init(void)
-                         PyString_FromString(Py_GetCopyright()));
-     SET_SYS_FROM_STRING("platform",
-                         PyString_FromString(Py_GetPlatform()));
-+    SET_SYS_FROM_STRING("lib",
-+                PyString_FromString(Py_GetLib()));
-     SET_SYS_FROM_STRING("executable",
-                         PyString_FromString(Py_GetProgramFullPath()));
-     SET_SYS_FROM_STRING("prefix",
-Index: Python-2.7.14/configure.ac
-===================================================================
---- Python-2.7.14.orig/configure.ac
-+++ Python-2.7.14/configure.ac
-@@ -758,6 +758,11 @@ SunOS*)
-     ;;
- esac
- 
-+AC_SUBST(LIB)
-+AC_MSG_CHECKING(LIB)
-+LIB=`basename ${libdir}`
-+AC_MSG_RESULT($LIB)
-+
- 
- AC_SUBST(LIBRARY)
- AC_MSG_CHECKING(LIBRARY)
diff --git a/poky/meta/recipes-devtools/python/python-native/nohostlibs.patch b/poky/meta/recipes-devtools/python/python-native/nohostlibs.patch
deleted file mode 100644
index 078060b..0000000
--- a/poky/meta/recipes-devtools/python/python-native/nohostlibs.patch
+++ /dev/null
@@ -1,54 +0,0 @@
-Upstream-Status: Inappropriate [embedded specific]
-
-2014/12/15
-Rebased for python-2.7.9
-Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
-Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com>
-
-Index: Python-2.7.9/setup.py
-===================================================================
---- Python-2.7.9.orig/setup.py
-+++ Python-2.7.9/setup.py
-@@ -439,9 +439,9 @@ class PyBuildExt(build_ext):
- 
-     def detect_modules(self):
-         # Ensure that /usr/local is always used
--        if not cross_compiling:
--            add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib')
--            add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
-+        # if not cross_compiling:
-+            # add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib')
-+            # add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
-         if cross_compiling:
-             self.add_gcc_paths()
-         self.add_multiarch_paths()
-@@ -480,15 +480,15 @@ class PyBuildExt(build_ext):
-                     for directory in reversed(options.dirs):
-                         add_dir_to_list(dir_list, directory)
- 
--        if os.path.normpath(sys.prefix) != '/usr' \
--                and not sysconfig.get_config_var('PYTHONFRAMEWORK'):
-+        #if os.path.normpath(sys.prefix) != '/usr' \
-+                #and not sysconfig.get_config_var('PYTHONFRAMEWORK'):
-             # OSX note: Don't add LIBDIR and INCLUDEDIR to building a framework
-             # (PYTHONFRAMEWORK is set) to avoid # linking problems when
-             # building a framework with different architectures than
-             # the one that is currently installed (issue #7473)
--            add_dir_to_list(self.compiler.library_dirs,
-+        add_dir_to_list(self.compiler.library_dirs,
-                             sysconfig.get_config_var("LIBDIR"))
--            add_dir_to_list(self.compiler.include_dirs,
-+        add_dir_to_list(self.compiler.include_dirs,
-                             sysconfig.get_config_var("INCLUDEDIR"))
- 
-         try:
-@@ -761,8 +761,7 @@ class PyBuildExt(build_ext):
-                 pass # Issue 7384: Already linked against curses or tinfo.
-             elif curses_library:
-                 readline_libs.append(curses_library)
--            elif self.compiler.find_library_file(lib_dirs +
--                                                     ['/usr/lib/termcap'],
-+            elif self.compiler.find_library_file(lib_dirs,
-                                                      'termcap'):
-                 readline_libs.append('termcap')
-             exts.append( Extension('readline', ['readline.c'],
diff --git a/poky/meta/recipes-devtools/python/python-native/revert_use_of_sysconfigdata.patch b/poky/meta/recipes-devtools/python/python-native/revert_use_of_sysconfigdata.patch
deleted file mode 100644
index 202aaf1..0000000
--- a/poky/meta/recipes-devtools/python/python-native/revert_use_of_sysconfigdata.patch
+++ /dev/null
@@ -1,86 +0,0 @@
-On older versions of Python, sysconfig read the data from both the Makefile and
-the Python.h file generated at build time, created dictionaries with their variables
-and used those when using get_config_var(), now it uses _sysconfigdata.build_time_vars[]
-which contains information from the HOST, erroneous in our case, this patch reverts this
-behavior and uses Python.h and Makefile to get information.
-
-Upstream-Status: Inappropriate [oe-specific]
-
-Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com>
-
-Index: Python-2.7.9/Lib/distutils/sysconfig.py
-===================================================================
---- Python-2.7.9.orig/Lib/distutils/sysconfig.py
-+++ Python-2.7.9/Lib/distutils/sysconfig.py
-@@ -401,12 +401,66 @@ _config_vars = None
- 
- def _init_posix():
-     """Initialize the module as appropriate for POSIX systems."""
--    # _sysconfigdata is generated at build time, see the sysconfig module
--    from _sysconfigdata import build_time_vars
--    global _config_vars
--    _config_vars = {}
--    _config_vars.update(build_time_vars)
-+    g = {}
-+    # load the installed Makefile:
-+    try:
-+        filename = get_makefile_filename()
-+        parse_makefile(filename, g)
-+    except IOError, msg:
-+        my_msg = "invalid Python installation: unable to open %s" % filename
-+        if hasattr(msg, "strerror"):
-+            my_msg = my_msg + " (%s)" % msg.strerror
-+
-+        raise DistutilsPlatformError(my_msg)
-+
-+    # load the installed pyconfig.h:
-+    try:
-+        filename = get_config_h_filename()
-+        parse_config_h(file(filename), g)
-+    except IOError, msg:
-+        my_msg = "invalid Python installation: unable to open %s" % filename
-+        if hasattr(msg, "strerror"):
-+            my_msg = my_msg + " (%s)" % msg.strerror
-+
-+        raise DistutilsPlatformError(my_msg)
-+
-+    # On AIX, there are wrong paths to the linker scripts in the Makefile
-+    # -- these paths are relative to the Python source, but when installed
-+    # the scripts are in another directory.
-+    if python_build:
-+        g['LDSHARED'] = g['BLDSHARED']
- 
-+    elif get_python_version() < '2.1':
-+        # The following two branches are for 1.5.2 compatibility.
-+        if sys.platform == 'aix4':          # what about AIX 3.x ?
-+            # Linker script is in the config directory, not in Modules as the
-+            # Makefile says.
-+            python_lib = get_python_lib(standard_lib=1)
-+            ld_so_aix = os.path.join(python_lib, 'config', 'ld_so_aix')
-+            python_exp = os.path.join(python_lib, 'config', 'python.exp')
-+
-+            g['LDSHARED'] = "%s %s -bI:%s" % (ld_so_aix, g['CC'], python_exp)
-+
-+        elif sys.platform == 'beos':
-+            # Linker script is in the config directory.  In the Makefile it is
-+            # relative to the srcdir, which after installation no longer makes
-+            # sense.
-+            python_lib = get_python_lib(standard_lib=1)
-+            linkerscript_path = string.split(g['LDSHARED'])[0]
-+            linkerscript_name = os.path.basename(linkerscript_path)
-+            linkerscript = os.path.join(python_lib, 'config',
-+                                        linkerscript_name)
-+
-+            # XXX this isn't the right place to do this: adding the Python
-+            # library to the link, if needed, should be in the "build_ext"
-+            # command.  (It's also needed for non-MS compilers on Windows, and
-+            # it's taken care of for them by the 'build_ext.get_libraries()'
-+            # method.)
-+            g['LDSHARED'] = ("%s -L%s/lib -lpython%s" %
-+                             (linkerscript, PREFIX, get_python_version()))
-+
-+    global _config_vars
-+    _config_vars = g
- 
- def _init_nt():
-     """Initialize the module as appropriate for NT"""
diff --git a/poky/meta/recipes-devtools/python/python-native/unixccompiler.patch b/poky/meta/recipes-devtools/python/python-native/unixccompiler.patch
deleted file mode 100644
index 4502829..0000000
--- a/poky/meta/recipes-devtools/python/python-native/unixccompiler.patch
+++ /dev/null
@@ -1,20 +0,0 @@
-Upstream-Status: Pending
-
-The CC variable,sometimes like:"x86_64-poky-linux-gcc   -m64 --sysroot=/${TMPDIR}/sysroots/qemux86-64", contains option information. 
-This will lead to wrong compiler name "qemux86-64" rather than "x86_64-poky-linux-gcc" when python finding the compiler name.
-
-Signed-off-by: Mei Lei <lei.mei@intel.com>
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-Index: Python-2.7.2/Lib/distutils/unixccompiler.py
-===================================================================
---- Python-2.7.2.orig/Lib/distutils/unixccompiler.py	2011-11-24 13:51:10.539998722 -0800
-+++ Python-2.7.2/Lib/distutils/unixccompiler.py	2011-11-24 15:54:36.872137766 -0800
-@@ -282,7 +282,7 @@
-         # this time, there's no way to determine this information from
-         # the configuration data stored in the Python installation, so
-         # we use this hack.
--        compiler = os.path.basename(sysconfig.get_config_var("CC"))
-+        compiler = sysconfig.get_config_var("CC")
-         if sys.platform[:6] == "darwin":
-             # MacOSX's linker doesn't understand the -R flag at all
-             return "-L" + dir
diff --git a/poky/meta/recipes-devtools/python/python-native_2.7.17.bb b/poky/meta/recipes-devtools/python/python-native_2.7.17.bb
deleted file mode 100644
index 936810d..0000000
--- a/poky/meta/recipes-devtools/python/python-native_2.7.17.bb
+++ /dev/null
@@ -1,88 +0,0 @@
-require python.inc
-EXTRANATIVEPATH += "bzip2-native"
-DEPENDS = "openssl-native bzip2-replacement-native zlib-native readline-native sqlite3-native expat-native gdbm-native db-native"
-
-SRC_URI += "\
-            file://05-enable-ctypes-cross-build.patch \
-            file://10-distutils-fix-swig-parameter.patch \
-            file://11-distutils-never-modify-shebang-line.patch \
-            file://0001-distutils-set-the-prefix-to-be-inside-staging-direct.patch \
-            file://unixccompiler.patch \
-            file://nohostlibs.patch \
-            file://multilib.patch \
-            file://add-md5module-support.patch \
-            file://0001-python-Resolve-intermediate-staging-issues.patch \
-            file://parallel-makeinst-create-bindir.patch \
-            file://revert_use_of_sysconfigdata.patch \
-            file://0001-python-native-fix-one-do_populate_sysroot-warning.patch \
-           "
-
-S = "${WORKDIR}/Python-${PV}"
-
-FILESEXTRAPATHS =. "${FILE_DIRNAME}/${PN}:"
-
-inherit native
-
-EXTRA_OECONF_append = " --bindir=${bindir}/${PN} --with-system-expat=${STAGING_DIR_HOST}"
-
-EXTRA_OEMAKE = '\
-  LIBC="" \
-  STAGING_LIBDIR=${STAGING_LIBDIR_NATIVE} \
-  STAGING_INCDIR=${STAGING_INCDIR_NATIVE} \
-'
-
-do_configure_append() {
-	autoreconf --verbose --install --force --exclude=autopoint ../Python-${PV}/Modules/_ctypes/libffi
-}
-
-# Regenerate all of the generated files
-# This ensures that pgen and friends get created during the compile phase
-do_compile_prepend() {
-    oe_runmake regen-all
-}
-
-do_install() {
-	oe_runmake 'DESTDIR=${D}' install
-	install -d ${D}${bindir}/${PN}
-	install -m 0755 Parser/pgen ${D}${bindir}/${PN}
-
-	# Make sure we use /usr/bin/env python
-	for PYTHSCRIPT in `grep -rIl ${bindir}/${PN}/python ${D}${bindir}/${PN}`; do
-		sed -i -e '1s|^#!.*|#!/usr/bin/env python|' $PYTHSCRIPT
-	done
-
-	# Add a symlink to the native Python so that scripts can just invoke
-	# "nativepython" and get the right one without needing absolute paths
-	# (these often end up too long for the #! parser in the kernel as the
-	# buffer is 128 bytes long).
-	ln -s python-native/python ${D}${bindir}/nativepython
-
-	# We don't want modules in ~/.local being used in preference to those
-	# installed in the native sysroot, so disable user site support.
-	sed -i -e 's,^\(ENABLE_USER_SITE = \).*,\1False,' ${D}${libdir}/python${PYTHON_MAJMIN}/site.py
-}
-
-python(){
-
-    # Read JSON manifest
-    import json
-    pythondir = d.getVar('THISDIR')
-    with open(pythondir+'/python/python2-manifest.json') as manifest_file:
-        manifest_str =  manifest_file.read()
-        json_start = manifest_str.find('# EOC') + 6
-        manifest_file.seek(json_start)
-        manifest_str = manifest_file.read()
-        python_manifest = json.loads(manifest_str)
-
-    rprovides = d.getVar('RPROVIDES').split()
-
-    # Hardcoded since it cant be python-native-foo, should be python-foo-native
-    pn = 'python'
-
-    for key in python_manifest:
-        pypackage = pn + '-' + key + '-native'
-        if pypackage not in rprovides:
-              rprovides.append(pypackage)
-
-    d.setVar('RPROVIDES', ' '.join(rprovides))
-}
diff --git a/poky/meta/recipes-devtools/python/python-pbr.inc b/poky/meta/recipes-devtools/python/python-pbr.inc
index 0e64501..ce3c224 100644
--- a/poky/meta/recipes-devtools/python/python-pbr.inc
+++ b/poky/meta/recipes-devtools/python/python-pbr.inc
@@ -5,6 +5,8 @@
 LICENSE = "Apache-2.0"
 LIC_FILES_CHKSUM = "file://LICENSE;md5=1dece7821bf3fd70fe1309eaa37d52a2"
 
+SRC_URI += "file://0001-change-shebang-to-python3.patch"
+
 inherit pypi
 
 RDEPENDS_${PN} += "${PYTHON_PN}-pip"
diff --git a/poky/meta/recipes-devtools/python/python-pyparsing.inc b/poky/meta/recipes-devtools/python/python-pyparsing.inc
new file mode 100644
index 0000000..348b324
--- /dev/null
+++ b/poky/meta/recipes-devtools/python/python-pyparsing.inc
@@ -0,0 +1,22 @@
+SUMMARY = "Python parsing module"
+HOMEPAGE = "http://pyparsing.wikispaces.com/"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=657a566233888513e1f07ba13e2f47f1"
+
+SRC_URI[md5sum] = "f0953e47a0112f7a65aec2305ffdf7b4"
+SRC_URI[sha256sum] = "c203ec8783bf771a155b207279b9bccb8dea02d8f0c9e5f8ead507bc3246ecc1"
+UPSTREAM_CHECK_REGEX = "pyparsing-(?P<pver>.*)\.tar"
+
+inherit pypi
+
+RDEPENDS_${PN} += " \
+    ${PYTHON_PN}-datetime \
+    ${PYTHON_PN}-debugger \
+    ${PYTHON_PN}-json \
+    ${PYTHON_PN}-netclient \
+    ${PYTHON_PN}-pprint \
+    ${PYTHON_PN}-stringold \
+    ${PYTHON_PN}-threading \
+"
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/poky/meta/recipes-devtools/python/python-setuptools.inc b/poky/meta/recipes-devtools/python/python-setuptools.inc
index 027e259..07c2f8b 100644
--- a/poky/meta/recipes-devtools/python/python-setuptools.inc
+++ b/poky/meta/recipes-devtools/python/python-setuptools.inc
@@ -10,8 +10,10 @@
 
 SRC_URI_append_class-native = " file://0001-conditionally-do-not-fetch-code-by-easy_install.patch"
 
-SRC_URI[md5sum] = "89a592d733b31e180a4b6ad760c0685a"
-SRC_URI[sha256sum] = "7eae782ccf36b790c21bde7d86a4f303a441cd77036b25c559a602cf5186ce4d"
+SRC_URI += "file://0001-change-shebang-to-python3.patch"
+
+SRC_URI[md5sum] = "0c956eea142af9c2b02d72e3c042af30"
+SRC_URI[sha256sum] = "89c6e6011ec2f6d57d43a3f9296c4ef022c2cbf49bab26b407fe67992ae3397f"
 
 DEPENDS += "${PYTHON_PN}"
 
diff --git a/poky/meta/recipes-devtools/python/python-setuptools_41.4.0.bb b/poky/meta/recipes-devtools/python/python-setuptools_41.4.0.bb
deleted file mode 100644
index cf94404..0000000
--- a/poky/meta/recipes-devtools/python/python-setuptools_41.4.0.bb
+++ /dev/null
@@ -1,9 +0,0 @@
-require python-setuptools.inc
-
-PROVIDES = "python-distribute"
-
-inherit setuptools
-
-RREPLACES_${PN} = "python-distribute"
-RPROVIDES_${PN} = "python-distribute"
-RCONFLICTS_${PN} = "python-distribute"
diff --git a/poky/meta/recipes-devtools/python/python-six.inc b/poky/meta/recipes-devtools/python/python-six.inc
index c386090..05b3281 100644
--- a/poky/meta/recipes-devtools/python/python-six.inc
+++ b/poky/meta/recipes-devtools/python/python-six.inc
@@ -2,10 +2,7 @@
 HOMEPAGE = "https://pypi.python.org/pypi/six/"
 SECTION = "devel/python"
 LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=f82eb3a1a7fade60bda5980935084b62"
-
-SRC_URI[md5sum] = "e92c23c882c7d5564ce5773fe31b2771"
-SRC_URI[sha256sum] = "30f610279e8b2578cab6db20741130331735c781b56053c59c4076da27f06b66"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=43cfc9e4ac0e377acfb9b76f56b8415d"
 
 inherit pypi
 
diff --git a/poky/meta/recipes-devtools/python/python.inc b/poky/meta/recipes-devtools/python/python.inc
deleted file mode 100644
index a630c26..0000000
--- a/poky/meta/recipes-devtools/python/python.inc
+++ /dev/null
@@ -1,46 +0,0 @@
-SUMMARY = "The Python Programming Language"
-HOMEPAGE = "http://www.python.org"
-LICENSE = "PSFv2"
-SECTION = "devel/python"
-# bump this on every change in contrib/python/generate-manifest-2.7.py
-INC_PR = "r1"
-
-LIC_FILES_CHKSUM = "file://LICENSE;md5=e466242989bd33c1bd2b6a526a742498"
-
-SRC_URI = "http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.xz \
-           "
-
-SRC_URI[md5sum] = "b3b6d2c92f42a60667814358ab9f0cfd"
-SRC_URI[sha256sum] = "4d43f033cdbd0aa7b7023c81b0e986fd11e653b5248dac9144d508f11812ba41"
-
-# python recipe is actually python 2.x
-# also, exclude pre-releases for both python 2.x and 3.x
-UPSTREAM_CHECK_REGEX = "[Pp]ython-(?P<pver>2(\.\d+)+).tar"
-
-CVE_PRODUCT = "python"
-
-PYTHON_MAJMIN = "2.7"
-
-inherit autotools pkgconfig
-
-EXTRA_OECONF = "\
-  --with-threads \
-  --with-pymalloc \
-  --without-cxx-main \
-  --with-signal-module \
-  --enable-shared \
-  --enable-ipv6=${@bb.utils.contains('DISTRO_FEATURES', 'ipv6', 'yes', 'no', d)} \
-  ac_cv_header_bluetooth_bluetooth_h=no ac_cv_header_bluetooth_h=no \
-"
-
-do_configure_prepend() {
-	libdirleaf="$(echo ${libdir} | sed -e 's:${prefix}/::')"
-	sed -i -e "s:SEDMELIBLEAF:${libdirleaf}:g" \
-		${S}/configure.ac
-}
-
-do_install_append () {
-	sed -i -e 's:${HOSTTOOLS_DIR}/install:install:g' \
-		-e 's:${HOSTTOOLS_DIR}/mkdir:mkdir:g' \
-		${D}/${libdir}/python${PYTHON_MAJMIN}/_sysconfigdata.py
-}
diff --git a/poky/meta/recipes-devtools/python/python/0001-distutils-set-the-prefix-to-be-inside-staging-direct.patch b/poky/meta/recipes-devtools/python/python/0001-distutils-set-the-prefix-to-be-inside-staging-direct.patch
deleted file mode 100644
index 502f849..0000000
--- a/poky/meta/recipes-devtools/python/python/0001-distutils-set-the-prefix-to-be-inside-staging-direct.patch
+++ /dev/null
@@ -1,51 +0,0 @@
-From 4cdf2e9df13c6327fcc94d53e4953005543aef3d Mon Sep 17 00:00:00 2001
-From: Alexander Kanavin <alex.kanavin@gmail.com>
-Date: Wed, 6 Apr 2016 17:43:02 +0300
-Subject: [PATCH 01/10] distutils: set the prefix to be inside staging
- directory
-
-The proper prefix is inside our staging area.
-
-Upstream-Status: Inappropriate [embedded specific]
-Signed-off-by: Michael 'Mickey' Lauer <mickey@vanille-media.de>
-Signed-off-by: Phil Blundell <philb@gnu.org>
-Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
----
- Lib/distutils/sysconfig.py | 10 +++++++---
- 1 file changed, 7 insertions(+), 3 deletions(-)
-
-diff --git a/Lib/distutils/sysconfig.py b/Lib/distutils/sysconfig.py
-index de7da1d..f3aacf7 100644
---- a/Lib/distutils/sysconfig.py
-+++ b/Lib/distutils/sysconfig.py
-@@ -75,7 +75,7 @@ def get_python_inc(plat_specific=0, prefix=None):
-     sys.exec_prefix -- i.e., ignore 'plat_specific'.
-     """
-     if prefix is None:
--        prefix = plat_specific and EXEC_PREFIX or PREFIX
-+        prefix = os.environ['STAGING_INCDIR'].rstrip('include')
- 
-     if os.name == "posix":
-         if python_build:
-@@ -115,12 +115,16 @@ def get_python_lib(plat_specific=0, standard_lib=0, prefix=None):
-     If 'prefix' is supplied, use it instead of sys.prefix or
-     sys.exec_prefix -- i.e., ignore 'plat_specific'.
-     """
-+    lib_basename = os.environ['STAGING_LIBDIR'].split('/')[-1]
-     if prefix is None:
--        prefix = plat_specific and EXEC_PREFIX or PREFIX
-+        if plat_specific:
-+            prefix = os.environ['STAGING_LIBDIR'].rstrip(lib_basename)
-+        else:
-+            prefix = PREFIX
- 
-     if os.name == "posix":
-         libpython = os.path.join(prefix,
--                                 "lib", "python" + get_python_version())
-+                                 lib_basename, "python" + get_python_version())
-         if standard_lib:
-             return libpython
-         else:
--- 
-2.8.0.rc3
-
diff --git a/poky/meta/recipes-devtools/python/python/0001-python-Resolve-intermediate-staging-issues.patch b/poky/meta/recipes-devtools/python/python/0001-python-Resolve-intermediate-staging-issues.patch
deleted file mode 100644
index 2ff2ccc..0000000
--- a/poky/meta/recipes-devtools/python/python/0001-python-Resolve-intermediate-staging-issues.patch
+++ /dev/null
@@ -1,59 +0,0 @@
-From 77bcb3238b2853d511714544e0f84a37be6c79bf Mon Sep 17 00:00:00 2001
-From: Richard Purdie <richard.purdie@linuxfoundation.org>
-Date: Wed, 14 Nov 2012 14:31:24 +0000
-Subject: [PATCH] python: Resolve intermediate staging issues
-
-When cross compiling python, we used to need to install the Makefile, pyconfig.h
-and the python library to their final location before being able to compile the
-rest of python. This change allows us to point python at its own source when
-building, avoiding a variety of sysroot staging issues and simplifying the main
-python recipe.
-
-Upstream-Status: Inappropriate
-RP 2012/11/13
-
----
- Lib/distutils/sysconfig.py | 3 +++
- Lib/sysconfig.py           | 5 ++++-
- 2 files changed, 7 insertions(+), 1 deletion(-)
-
-diff --git a/Lib/distutils/sysconfig.py b/Lib/distutils/sysconfig.py
-index 2f4b8ca..15bceb5 100644
---- a/Lib/distutils/sysconfig.py
-+++ b/Lib/distutils/sysconfig.py
-@@ -31,6 +31,9 @@ else:
-     # sys.executable can be empty if argv[0] has been changed and Python is
-     # unable to retrieve the real program name
-     project_base = os.getcwd()
-+_PYTHONBUILDDIR = os.environ.get("PYTHONBUILDDIR", None)
-+if _PYTHONBUILDDIR:
-+    project_base = _PYTHONBUILDDIR
- if os.name == "nt" and "pcbuild" in project_base[-8:].lower():
-     project_base = os.path.abspath(os.path.join(project_base, os.path.pardir))
- # PC/VS7.1
-diff --git a/Lib/sysconfig.py b/Lib/sysconfig.py
-index 9c8350d..bddbe2e 100644
---- a/Lib/sysconfig.py
-+++ b/Lib/sysconfig.py
-@@ -93,6 +93,7 @@ _PREFIX = os.path.normpath(sys.prefix)
- _EXEC_PREFIX = os.path.normpath(sys.exec_prefix)
- _CONFIG_VARS = None
- _USER_BASE = None
-+_PYTHONBUILDDIR = os.environ.get("PYTHONBUILDDIR", None)
- 
- def _safe_realpath(path):
-     try:
-@@ -100,7 +101,9 @@ def _safe_realpath(path):
-     except OSError:
-         return path
- 
--if sys.executable:
-+if _PYTHONBUILDDIR:
-+    _PROJECT_BASE = _PYTHONBUILDDIR
-+elif sys.executable:
-     _PROJECT_BASE = os.path.dirname(_safe_realpath(sys.executable))
- else:
-     # sys.executable can be empty if argv[0] has been changed and Python is
--- 
-2.17.1
-
diff --git a/poky/meta/recipes-devtools/python/python/0001-python2-use-cc_basename-to-replace-CC-for-checking-c.patch b/poky/meta/recipes-devtools/python/python/0001-python2-use-cc_basename-to-replace-CC-for-checking-c.patch
deleted file mode 100644
index 6e4f820..0000000
--- a/poky/meta/recipes-devtools/python/python/0001-python2-use-cc_basename-to-replace-CC-for-checking-c.patch
+++ /dev/null
@@ -1,114 +0,0 @@
-From 3f49be81e31c164654aeb10b65ebade982ca2ed8 Mon Sep 17 00:00:00 2001
-From: Changqing Li <changqing.li@windriver.com>
-Date: Mon, 22 Oct 2018 15:24:48 +0800
-Subject: [PATCH] python2: use cc_basename to replace CC for checking compiler
-
-When working path contains "clang"/"gcc"/"icc", it might be part of $CC
-because of the "--sysroot" parameter. That could cause judgement error
-about clang/gcc/icc compilers. e.g.
-When "icc" is containded in working path, below errors are reported when
-compiling python:
-x86_64-wrs-linux-gcc: error: strict: No such file or directory
-x86_64-wrs-linux-gcc: error: unrecognized command line option '-fp-model'
-
-Here use cc_basename to replace CC for checking compiler to avoid such
-kind of issue.
-
-Upstream-Status: Pending
-
-Signed-off-by: Li Zhou <li.zhou@windriver.com>
-
-Patch orignally from Li Zhou, I just rework it to new version
-
-Signed-off-by: Changqing Li <changqing.li@windriver.com>
----
- configure.ac | 18 +++++++++---------
- 1 file changed, 9 insertions(+), 9 deletions(-)
-
-diff --git a/configure.ac b/configure.ac
-index db1c940..dfcd89a 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -684,7 +684,7 @@ AC_MSG_RESULT($with_cxx_main)
- preset_cxx="$CXX"
- if test -z "$CXX"
- then
--        case "$CC" in
-+        case "$cc_basename" in
-         gcc)    AC_PATH_TOOL(CXX, [g++], [g++], [notfound]) ;;
-         cc)     AC_PATH_TOOL(CXX, [c++], [c++], [notfound]) ;;
-         esac
-@@ -757,14 +757,14 @@ rmdir CaseSensitiveTestDir
- 
- case $MACHDEP in
- bsdos*)
--    case $CC in
-+    case $cc_basename in
-     gcc) CC="$CC -D_HAVE_BSDI";;
-     esac;;
- esac
- 
- case $ac_sys_system in
- hp*|HP*)
--    case $CC in
-+    case $cc_basename in
-     cc|*/cc) CC="$CC -Ae";;
-     esac;;
- SunOS*)
-@@ -1084,7 +1084,7 @@ then
-         fi
- 
-         # Clang also needs -fwrapv
--        case $CC in
-+        case $cc_basename in
-             *clang*) WRAP="-fwrapv"
-             ;;
-         esac
-@@ -1304,7 +1304,7 @@ yes)
- esac
- 
- # ICC needs -fp-model strict or floats behave badly
--case "$CC" in
-+case "$cc_basename" in
- *icc*)
-     BASECFLAGS="$BASECFLAGS -fp-model strict"
-     ;;
-@@ -1443,7 +1443,7 @@ else
- fi],
- [AC_MSG_RESULT(no)])
- if test "$Py_LTO" = 'true' ; then
--  case $CC in
-+  case $cc_basename in
-     *clang*)
-       # Any changes made here should be reflected in the GCC+Darwin case below
-       LTOFLAGS="-flto"
-@@ -1508,7 +1508,7 @@ then
-   fi
- fi
- LLVM_PROF_ERR=no
--case $CC in
-+case $cc_basename in
-   *clang*)
-     # Any changes made here should be reflected in the GCC+Darwin case below
-     PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
-@@ -2322,7 +2322,7 @@ then
- 		then CCSHARED="-fPIC"
- 		else CCSHARED="-Kpic -belf"
- 		fi;;
--	IRIX*/6*)  case $CC in
-+	IRIX*/6*)  case $cc_basename in
- 		   *gcc*) CCSHARED="-shared";;
- 		   *) CCSHARED="";;
- 		   esac;;
-@@ -2366,7 +2366,7 @@ then
- 		then
- 			LINKFORSHARED="-Wl,--export-dynamic"
- 		fi;;
--	SunOS/5*) case $CC in
-+	SunOS/5*) case $cc_basename in
- 		  *gcc*)
- 		    if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
- 		    then
--- 
-2.7.4
-
diff --git a/poky/meta/recipes-devtools/python/python/01-use-proper-tools-for-cross-build.patch b/poky/meta/recipes-devtools/python/python/01-use-proper-tools-for-cross-build.patch
deleted file mode 100644
index e795a74..0000000
--- a/poky/meta/recipes-devtools/python/python/01-use-proper-tools-for-cross-build.patch
+++ /dev/null
@@ -1,100 +0,0 @@
-We need to ensure our host tools get run during build, not the freshly
-built cross-tools (this will not work), so we introduce HOSTPYTHON and HOSTPGEN.
-
-Upstream-Status: Inappropriate [embedded specific]
-
-Signed-off-by: Michael 'Mickey' Lauer <mickey@vanille-media.de>
-Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
-
-Rebased for python-2.7.9
-Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com>
-
-Rebased for python-2.7.14
-Signed-off-by: Derek Straka <derek@asterius.io>
-
-Index: Python-2.7.13/Makefile.pre.in
-===================================================================
---- Python-2.7.13.orig/Makefile.pre.in
-+++ Python-2.7.13/Makefile.pre.in
-@@ -245,6 +245,7 @@ LIBFFI_INCLUDEDIR=	@LIBFFI_INCLUDEDIR@
- ##########################################################################
- # Parser
- PGEN=		Parser/pgen$(EXE)
-+HOSTPGEN=	$(PGEN)$(EXE)
- 
- PSRCS=		\
- 		Parser/acceler.c \
-@@ -512,7 +513,7 @@ $(BUILDPYTHON):	Modules/python.o $(LIBRA
- 			$(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS) $(LDLAST)
- 
- platform: $(BUILDPYTHON) pybuilddir.txt
--	$(RUNSHARED) $(PYTHON_FOR_BUILD) -c 'import sys ; from sysconfig import get_platform ; print get_platform()+"-"+sys.version[0:3]' >platform
-+	$(RUNSHARED) $(PYTHON_FOR_BUILD) -c 'import sys ; from distutils.util import get_platform ; print get_platform()+"-"+sys.version[0:3]' >platform
- 
- # Create build directory and generate the sysconfig build-time data there.
- # pybuilddir.txt contains the name of the build dir and is used for
-@@ -663,7 +663,7 @@
- 	# Regenerate Include/graminit.h and Python/graminit.c
- 	# from Grammar/Grammar using pgen
- 	@$(MKDIR_P) Include
--	$(PGEN) $(srcdir)/Grammar/Grammar \
-+	$(HOSTPGEN) $(srcdir)/Grammar/Grammar \
- 		$(srcdir)/Include/graminit.h \
- 		$(srcdir)/Python/graminit.c
- 
-@@ -1121,27 +1122,27 @@ libinstall:	build_all $(srcdir)/Lib/$(PL
- 			$(DESTDIR)$(LIBDEST)/distutils/tests ; \
- 	fi
- 	PYTHONPATH=$(DESTDIR)$(LIBDEST)  $(RUNSHARED) \
--		$(PYTHON_FOR_BUILD) -Wi -tt $(DESTDIR)$(LIBDEST)/compileall.py \
-+		$(HOSTPYTHON) -Wi -tt $(DESTDIR)$(LIBDEST)/compileall.py \
- 		-d $(LIBDEST) -f \
- 		-x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \
- 		$(DESTDIR)$(LIBDEST)
- 	PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
--		$(PYTHON_FOR_BUILD) -Wi -tt -O $(DESTDIR)$(LIBDEST)/compileall.py \
-+		$(HOSTPYTHON) -Wi -tt $(DESTDIR)$(LIBDEST)/compileall.py \
- 		-d $(LIBDEST) -f \
- 		-x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \
- 		$(DESTDIR)$(LIBDEST)
- 	-PYTHONPATH=$(DESTDIR)$(LIBDEST)  $(RUNSHARED) \
--		$(PYTHON_FOR_BUILD) -Wi -t $(DESTDIR)$(LIBDEST)/compileall.py \
-+		$(HOSTPYTHON) -Wi -tt $(DESTDIR)$(LIBDEST)/compileall.py \
- 		-d $(LIBDEST)/site-packages -f \
- 		-x badsyntax $(DESTDIR)$(LIBDEST)/site-packages
- 	-PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
--		$(PYTHON_FOR_BUILD) -Wi -t -O $(DESTDIR)$(LIBDEST)/compileall.py \
-+		$(HOSTPYTHON) -Wi -tt $(DESTDIR)$(LIBDEST)/compileall.py \
- 		-d $(LIBDEST)/site-packages -f \
- 		-x badsyntax $(DESTDIR)$(LIBDEST)/site-packages
- 	-PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
--		$(PYTHON_FOR_BUILD) -m lib2to3.pgen2.driver $(DESTDIR)$(LIBDEST)/lib2to3/Grammar.txt
-+		$(HOSTPYTHON) -m lib2to3.pgen2.driver $(DESTDIR)$(LIBDEST)/lib2to3/Grammar.txt
- 	-PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
--		$(PYTHON_FOR_BUILD) -m lib2to3.pgen2.driver $(DESTDIR)$(LIBDEST)/lib2to3/PatternGrammar.txt
-+		$(HOSTPYTHON) -m lib2to3.pgen2.driver $(DESTDIR)$(LIBDEST)/lib2to3/PatternGrammar.txt
- 
- # Create the PLATDIR source directory, if one wasn't distributed..
- $(srcdir)/Lib/$(PLATDIR):
-Index: Python-2.7.13/setup.py
-===================================================================
---- Python-2.7.13.orig/setup.py
-+++ Python-2.7.13/setup.py
-@@ -350,6 +350,7 @@ class PyBuildExt(build_ext):
-             self.failed.append(ext.name)
-             self.announce('*** WARNING: renaming "%s" since importing it'
-                           ' failed: %s' % (ext.name, why), level=3)
-+            return
-             assert not self.inplace
-             basename, tail = os.path.splitext(ext_filename)
-             newname = basename + "_failed" + tail
-@@ -574,6 +575,9 @@ class PyBuildExt(build_ext):
- 
-         # XXX Omitted modules: gl, pure, dl, SGI-specific modules
- 
-+        lib_dirs = [ os.getenv("STAGING_LIBDIR"),  os.getenv("STAGING_BASELIBDIR") ]
-+        inc_dirs = [ os.getenv("STAGING_INCDIR") ]
-+
-         #
-         # The following modules are all pretty straightforward, and compile
-         # on pretty much any POSIXish platform.
diff --git a/poky/meta/recipes-devtools/python/python/03-fix-tkinter-detection.patch b/poky/meta/recipes-devtools/python/python/03-fix-tkinter-detection.patch
deleted file mode 100644
index 650ceb5..0000000
--- a/poky/meta/recipes-devtools/python/python/03-fix-tkinter-detection.patch
+++ /dev/null
@@ -1,46 +0,0 @@
-Upstream-Status: Inappropriate [embedded specific]
-
-We need to supply STAGING_INCDIR here, otherwise the Tk headers
-will not be found.
-
-Signed-off-by: Michael 'Mickey' Lauer <mickey@vanille.de>
-Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
-
-Rebased for python-2.7.9
-
-diff --git a/setup.py b/setup.py
-index 8fe1fb8..67eda74 100644
---- a/setup.py
-+++ b/setup.py
-@@ -1892,7 +1892,7 @@ class PyBuildExt(build_ext):
-                 dotversion = dotversion[:-1] + '.' + dotversion[-1]
-             tcl_include_sub = []
-             tk_include_sub = []
--            for dir in inc_dirs:
-+            for dir in [os.getenv("STAGING_INCDIR")]:
-                 tcl_include_sub += [dir + os.sep + "tcl" + dotversion]
-                 tk_include_sub += [dir + os.sep + "tk" + dotversion]
-             tk_include_sub += tcl_include_sub
-@@ -1911,22 +1911,6 @@ class PyBuildExt(build_ext):
-             if dir not in include_dirs:
-                 include_dirs.append(dir)
- 
--        # Check for various platform-specific directories
--        if host_platform == 'sunos5':
--            include_dirs.append('/usr/openwin/include')
--            added_lib_dirs.append('/usr/openwin/lib')
--        elif os.path.exists('/usr/X11R6/include'):
--            include_dirs.append('/usr/X11R6/include')
--            added_lib_dirs.append('/usr/X11R6/lib64')
--            added_lib_dirs.append('/usr/X11R6/lib')
--        elif os.path.exists('/usr/X11R5/include'):
--            include_dirs.append('/usr/X11R5/include')
--            added_lib_dirs.append('/usr/X11R5/lib')
--        else:
--            # Assume default location for X11
--            include_dirs.append('/usr/X11/include')
--            added_lib_dirs.append('/usr/X11/lib')
--
-         # If Cygwin, then verify that X is installed before proceeding
-         if host_platform == 'cygwin':
-             x11_inc = find_file('X11/Xlib.h', [], include_dirs)
diff --git a/poky/meta/recipes-devtools/python/python/05-enable-ctypes-cross-build.patch b/poky/meta/recipes-devtools/python/python/05-enable-ctypes-cross-build.patch
deleted file mode 100644
index 5cc8742..0000000
--- a/poky/meta/recipes-devtools/python/python/05-enable-ctypes-cross-build.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-Rebased for python 2.7.9
-
-Upstream-Status: Inappropriate [embedded specific]
-
-# CTypes need to know the actual host we are building on.
-# Signed-Off: Michael Dietrich <mdt@emdete.de>
-
-Index: Python-2.7.9/setup.py
-===================================================================
---- Python-2.7.9.orig/setup.py
-+++ Python-2.7.9/setup.py
-@@ -2028,12 +2028,12 @@ class PyBuildExt(build_ext):
- 
-                 # Pass empty CFLAGS because we'll just append the resulting
-                 # CFLAGS to Python's; -g or -O2 is to be avoided.
--                cmd = "cd %s && env CFLAGS='' '%s/configure' %s" \
--                      % (ffi_builddir, ffi_srcdir, " ".join(config_args))
-+                cmd = "(cd %s && autoconf -W cross) && (cd %s && env CFLAGS='' '%s/configure' %s)" \
-+                    % (ffi_srcdir, ffi_builddir, ffi_srcdir, " ".join(config_args))
- 
-                 res = os.system(cmd)
-                 if res or not os.path.exists(ffi_configfile):
--                    print "Failed to configure _ctypes module"
-+                    print "Failed to configure _ctypes module (res=%d) or missing conffile=%s" % ( res, ffi_configfile )
-                     return False
- 
-             fficonfig = {}
diff --git a/poky/meta/recipes-devtools/python/python/06-avoid_usr_lib_termcap_path_in_linking.patch b/poky/meta/recipes-devtools/python/python/06-avoid_usr_lib_termcap_path_in_linking.patch
deleted file mode 100644
index 435b319..0000000
--- a/poky/meta/recipes-devtools/python/python/06-avoid_usr_lib_termcap_path_in_linking.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-Upstream-Status: Pending
-
-The poison directories patch has detected library path issue while 
-compiling the python in cross environment, as seen bellow.
-
-warning: library search path "/usr/lib/termcap" is unsafe for cross-compilation
-
-This Patch fixes this issue in the python build environment.
-11 Oct 2010
-Nitin A Kamble <nitin.a.kamble@intel.com>
-
-2011/09/29
-Rebased for python 2.7.2
-Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
-
-Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
-
-diff --git a/setup.py b/setup.py
-index 67eda74..59c537e 100644
---- a/setup.py
-+++ b/setup.py
-@@ -761,12 +761,10 @@ class PyBuildExt(build_ext):
-                 pass # Issue 7384: Already linked against curses or tinfo.
-             elif curses_library:
-                 readline_libs.append(curses_library)
--            elif self.compiler.find_library_file(lib_dirs +
--                                                     ['/usr/lib/termcap'],
-+            elif self.compiler.find_library_file(lib_dirs,
-                                                      'termcap'):
-                 readline_libs.append('termcap')
-             exts.append( Extension('readline', ['readline.c'],
--                                   library_dirs=['/usr/lib/termcap'],
-                                    extra_link_args=readline_extra_link_args,
-                                    libraries=readline_libs) )
-         else:
diff --git a/poky/meta/recipes-devtools/python/python/add-CROSSPYTHONPATH-for-PYTHON_FOR_BUILD.patch b/poky/meta/recipes-devtools/python/python/add-CROSSPYTHONPATH-for-PYTHON_FOR_BUILD.patch
deleted file mode 100644
index 3297340..0000000
--- a/poky/meta/recipes-devtools/python/python/add-CROSSPYTHONPATH-for-PYTHON_FOR_BUILD.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-configure.ac: add CROSSPYTHONPATH into PYTHONPATH for PYTHON_FOR_BUILD
-
-When building x86->x86 the system will try to execute .so and related items
-from the default PYTHONPATH.  This will fail if the target CPU contains
-instructions that the host CPU does not have, add CROSSPYTHONPATH
-into PYTHONPATH so we can prepend the list to find correct libs.
-
-Upstream-Status: Inappropriate [OE-Core integration specific]
-
-Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
-Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
----
- configure.ac | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-Index: Python-2.7.14/configure.ac
-===================================================================
---- Python-2.7.14.orig/configure.ac
-+++ Python-2.7.14/configure.ac
-@@ -36,7 +36,7 @@ if test "$cross_compiling" = yes; then
- 	    AC_MSG_ERROR([python$PACKAGE_VERSION interpreter not found])
- 	fi
-         AC_MSG_RESULT($interp)
--	PYTHON_FOR_BUILD='_PYTHON_PROJECT_BASE=$(abs_builddir) _PYTHON_HOST_PLATFORM=$(_PYTHON_HOST_PLATFORM) PYTHONPATH=$(shell test -f pybuilddir.txt && echo $(abs_builddir)/`cat pybuilddir.txt`:)$(srcdir)/Lib:$(srcdir)/Lib/$(PLATDIR) '$interp
-+	PYTHON_FOR_BUILD='_PYTHON_PROJECT_BASE=$(abs_builddir) _PYTHON_HOST_PLATFORM=$(_PYTHON_HOST_PLATFORM) PYTHONPATH=$(CROSSPYTHONPATH):$(shell test -f pybuilddir.txt && echo $(abs_builddir)/`cat pybuilddir.txt`:)$(srcdir)/Lib:$(srcdir)/Lib/plat-$(MACHDEP) '$interp
-     fi
- elif test "$cross_compiling" = maybe; then
-     AC_MSG_ERROR([Cross compiling required --host=HOST-TUPLE and --build=ARCH])
diff --git a/poky/meta/recipes-devtools/python/python/add-md5module-support.patch b/poky/meta/recipes-devtools/python/python/add-md5module-support.patch
deleted file mode 100644
index 33fea77..0000000
--- a/poky/meta/recipes-devtools/python/python/add-md5module-support.patch
+++ /dev/null
@@ -1,18 +0,0 @@
-
-Upstream-Status: Inappropriate [configuration]
-
-Signed-off-by: Saul Wold <sgw@linux.intel.com>
-
-Index: Python-2.7.2/Modules/Setup.dist
-===================================================================
---- Python-2.7.2.orig/Modules/Setup.dist	2011-06-11 08:46:26.000000000 -0700
-+++ Python-2.7.2/Modules/Setup.dist	2011-12-27 15:51:41.244623219 -0800
-@@ -248,7 +248,7 @@
- # Message-Digest Algorithm, described in RFC 1321.  The necessary files
- # md5.c and md5.h are included here.
- 
--#_md5 md5module.c md5.c
-+_md5 md5module.c md5.c
- 
- 
- # The _sha module implements the SHA checksum algorithms.
diff --git a/poky/meta/recipes-devtools/python/python/avoid_warning_about_tkinter.patch b/poky/meta/recipes-devtools/python/python/avoid_warning_about_tkinter.patch
deleted file mode 100644
index 287095f..0000000
--- a/poky/meta/recipes-devtools/python/python/avoid_warning_about_tkinter.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-_tkinter module needs tk module along with tcl. tk is not yet integrated
-in yocto so we skip the check for this module.
-Avoid a warning by not adding this module to missing variable.
-
-Upstream-Status: Inappropriate [distribution]
-
-Also simply disable the tk module since its not in DEPENDS.
-Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
-
-Index: Python-2.7.13/setup.py
-===================================================================
---- Python-2.7.13.orig/setup.py
-+++ Python-2.7.13/setup.py
-@@ -1783,10 +1783,12 @@ class PyBuildExt(build_ext):
-         self.extensions.extend(exts)
- 
-         # Call the method for detecting whether _tkinter can be compiled
--        self.detect_tkinter(inc_dirs, lib_dirs)
-+        # self.detect_tkinter(inc_dirs, lib_dirs)
- 
--        if '_tkinter' not in [e.name for e in self.extensions]:
--            missing.append('_tkinter')
-+        # tkinter module will not be avalaible as yocto
-+        # doesn't have tk integrated (yet)
-+        #if '_tkinter' not in [e.name for e in self.extensions]:
-+        #    missing.append('_tkinter')
- 
- ##         # Uncomment these lines if you want to play with xxmodule.c
- ##         ext = Extension('xx', ['xxmodule.c'])
diff --git a/poky/meta/recipes-devtools/python/python/avoid_warning_for_sunos_specific_module.patch b/poky/meta/recipes-devtools/python/python/avoid_warning_for_sunos_specific_module.patch
deleted file mode 100644
index 8ba5823..0000000
--- a/poky/meta/recipes-devtools/python/python/avoid_warning_for_sunos_specific_module.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-sunaudiodev module is sunos specific so we avoid a warning by not 
-adding this module to missing variable.
-
-Upstream-Status: Inappropriate [distribution]
-
-Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
-
-Index: Python-2.7.13/setup.py
-===================================================================
---- Python-2.7.13.orig/setup.py
-+++ Python-2.7.13/setup.py
-@@ -1671,8 +1671,9 @@ class PyBuildExt(build_ext):
-         if host_platform == 'sunos5':
-             # SunOS specific modules
-             exts.append( Extension('sunaudiodev', ['sunaudiodev.c']) )
--        else:
--            missing.append('sunaudiodev')
-+        # If platform is not sunos warning is useless
-+        #else:
-+        #    missing.append('sunaudiodev')
- 
-         if host_platform == 'darwin':
-             # _scproxy
diff --git a/poky/meta/recipes-devtools/python/python/cgi_py.patch b/poky/meta/recipes-devtools/python/python/cgi_py.patch
deleted file mode 100644
index de504f9..0000000
--- a/poky/meta/recipes-devtools/python/python/cgi_py.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-Lib/cgi.py: Update the script as mentioned in the comment
-
-Upstream-Status: Inappropriate [distribution]
-
-Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
-
---- Python-2.6.6/Lib/cgi.py.orig	2010-08-01 22:14:27.000000000 -0500
-+++ Python-2.6.6/Lib/cgi.py	2011-09-21 15:28:40.478208631 -0500
-@@ -1,13 +1,4 @@
--#! /usr/local/bin/python
--
--# NOTE: the above "/usr/local/bin/python" is NOT a mistake.  It is
--# intentionally NOT "/usr/bin/env python".  On many systems
--# (e.g. Solaris), /usr/local/bin is not in $PATH as passed to CGI
--# scripts, and /usr/local/bin is the default directory where Python is
--# installed, so /usr/bin/env would be unable to find python.  Granted,
--# binary installations by Linux vendors often install Python in
--# /usr/bin.  So let those vendors patch cgi.py to match their choice
--# of installation.
-+#! /usr/bin/env python
- 
- """Support module for CGI (Common Gateway Interface) scripts.
- 
diff --git a/poky/meta/recipes-devtools/python/python/check-if-target-is-64b-not-host.patch b/poky/meta/recipes-devtools/python/python/check-if-target-is-64b-not-host.patch
deleted file mode 100644
index e6d6c65..0000000
--- a/poky/meta/recipes-devtools/python/python/check-if-target-is-64b-not-host.patch
+++ /dev/null
@@ -1,57 +0,0 @@
-Author: Andrei Gherzan <andrei@gherzan.ro>
-Date:   Sun Mar 25 02:02:27 2012 +0200
-
-This patch was added for 64bit host machines. In the compile process python
-is checking if platform is a 64bit platform using sys.maxint which is the host's
-value. The patch fixes this issue so that python would check if TARGET machine
-is 64bit not the HOST machine. In this way will have "dl" and "imageop" modules
-built if HOST machine is 64bit but the target machine is 32bit.
-
-Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
-
-Upstream-Status: Pending
-
-Index: Python-2.7.11/setup.py
-===================================================================
---- Python-2.7.11.orig/setup.py
-+++ Python-2.7.11/setup.py
-@@ -35,6 +35,21 @@ COMPILED_WITH_PYDEBUG = ('--with-pydebug
- # This global variable is used to hold the list of modules to be disabled.
- disabled_module_list = []
- 
-+def target_is_64bit_platform ():
-+    """
-+    In case of cross-compile, some modules are not build as setup checks if HOST
-+    is 64bit and not TARGET.
-+    As python was built for TARGET we can check this in pyconfig.h in this way:
-+	Sizeof LONG on a 32 bit platform is 4 bytes
-+	Sizeof LONG on a 64 bit platform is 8 bytes
-+    """
-+    pyconf = open("pyconfig.h").read()
-+    aux = re.search(r"#s*define\s+SIZEOF_LONG\s+8\s*", pyconf)
-+    if aux is not None:
-+	return True
-+    else:
-+	return False
-+
- def add_dir_to_list(dirlist, dir):
-     """Add the directory 'dir' to the list 'dirlist' (at the front) if
-     1) 'dir' is not already in 'dirlist'
-@@ -716,7 +731,7 @@ class PyBuildExt(build_ext):
-         exts.append( Extension('audioop', ['audioop.c']) )
- 
-         # Disabled on 64-bit platforms
--        if sys.maxsize != 9223372036854775807L:
-+        if not target_is_64bit_platform():
-             # Operations on images
-             exts.append( Extension('imageop', ['imageop.c']) )
-         else:
-@@ -1545,7 +1560,7 @@ class PyBuildExt(build_ext):
-                 missing.append('_codecs_%s' % loc)
- 
-         # Dynamic loading module
--        if sys.maxint == 0x7fffffff:
-+        if not target_is_64bit_platform():
-             # This requires sizeof(int) == sizeof(long) == sizeof(char*)
-             dl_inc = find_file('dlfcn.h', [], inc_dirs)
-             if (dl_inc is not None) and (host_platform not in ['atheos']):
diff --git a/poky/meta/recipes-devtools/python/python/create_manifest2.py b/poky/meta/recipes-devtools/python/python/create_manifest2.py
deleted file mode 100644
index 3465951..0000000
--- a/poky/meta/recipes-devtools/python/python/create_manifest2.py
+++ /dev/null
@@ -1,298 +0,0 @@
-# This script is used as a bitbake task to create a new python manifest
-# $ bitbake python -c create_manifest
-#
-# Our goal is to keep python-core as small as posible and add other python
-# packages only when the user needs them, hence why we split upstream python
-# into several packages.
-#
-# In a very simplistic way what this does is: 
-# Launch python and see specifically what is required for it to run at a minimum
-#
-# Go through the python-manifest file and launch a separate task for every single
-# one of the files on each package, this task will check what was required for that
-# specific module to run, these modules will be called dependencies.
-# The output of such task will be a list of the modules or dependencies that were
-# found for that file.
-#
-# Such output will be parsed by this script, we will look for each dependency on the
-# manifest and if we find that another package already includes it, then we will add
-# that package as an RDEPENDS to the package we are currently checking; in case we dont
-# find the current dependency on any other package we will add it to the current package
-# as part of FILES.
-#
-#
-# This way we will create a new manifest from the data structure that was built during
-# this process, on this new manifest each package will contain specifically only
-# what it needs to run.
-#
-# There are some caveats which we try to deal with, such as repeated files on different
-# packages, packages that include folders, wildcards, and special packages.
-# Its also important to note that this method only works for python files, and shared
-# libraries. Static libraries, header files and binaries need to be dealt with manually.
-#
-# Author: Alejandro Enedino Hernandez Samaniego "aehs29" <aehs29 at gmail dot com>
-
-
-import sys
-import subprocess
-import json
-import os
-import collections
-
-# Hack to get native python search path (for folders), not fond of it but it works for now
-pivot='recipe-sysroot-native'
-for p in sys.path:
-  if pivot in p:
-    nativelibfolder=p[:p.find(pivot)+len(pivot)]
-
-# Empty dict to hold the whole manifest
-new_manifest = collections.OrderedDict()
-
-# Check for repeated files, folders and wildcards
-allfiles=[]
-repeated=[]
-wildcards=[]
-
-hasfolders=[]
-allfolders=[]
-
-def isFolder(value):
-  if os.path.isdir(value.replace('${libdir}',nativelibfolder+'/usr/lib')) or os.path.isdir(value.replace('${libdir}',nativelibfolder+'/usr/lib64')) or os.path.isdir(value.replace('${libdir}',nativelibfolder+'/usr/lib32')):
-    return True
-  else:
-    return False
-
-def prepend_comments(comments, json_manifest):
-    with open(json_manifest, 'r+') as manifest:
-        json_contents = manifest.read()
-        manifest.seek(0, 0)
-        manifest.write(comments + json_contents)
-
-# Read existing JSON manifest
-with open('python2-manifest.json') as manifest:
-    # The JSON format doesn't allow comments so we hack the call to keep the comments using a marker
-    manifest_str =  manifest.read()
-    json_start = manifest_str.find('# EOC') + 6 # EOC + \n
-    manifest.seek(0)
-    comments = manifest.read(json_start)
-    manifest_str = manifest.read()
-    old_manifest = json.loads(manifest_str, object_pairs_hook=collections.OrderedDict)
-
-# First pass to get core-package functionality, because we base everything on the fact that core is actually working
-# Not exactly the same so it should not be a function
-print ("Getting dependencies for core package:")
-
-# Special call to check for core package
-output = subprocess.check_output([sys.executable, 'get_module_deps2.py', 'python-core-package'])
-for item in output.split():
-    # We append it so it doesnt hurt what we currently have:
-    if item not in old_manifest['core']['files']:
-        # We use the same data structure since its the one which will be used to check
-        # dependencies for other packages
-        old_manifest['core']['files'].append(item)
-
-for value in old_manifest['core']['files']:
-  # Ignore folders, since we don't import those, difficult to handle multilib
-  if isFolder(value):
-    # Pass it directly
-    if value not in old_manifest['core']['files']:
-      old_manifest['core']['files'].append(value)
-  # Ignore binaries, since we don't import those, assume it was added correctly (manually)
-  if '${bindir}' in value:
-    # Pass it directly
-    if value not in old_manifest['core']['files']:
-      old_manifest['core']['files'].append(value)
-    continue
-  # Ignore empty values
-  if value == '':
-    continue
-  if '${includedir}' in value:
-    if value not in old_manifest['core']['files']:
-      old_manifest['core']['files'].append(value)
-    continue
-  # Get module name , shouldnt be affected by libdir/bindir
-  value = os.path.splitext(os.path.basename(os.path.normpath(value)))[0]
-
-
-  # Launch separate task for each module for deterministic behavior
-  # Each module will only import what is necessary for it to work in specific
-  print ('Getting dependencies for module: %s' % value)
-  output = subprocess.check_output([sys.executable, 'get_module_deps2.py', '%s' % value])
-  for item in output.split():
-    # We append it so it doesnt hurt what we currently have:
-    if item not in old_manifest['core']['files']:
-      old_manifest['core']['files'].append(item)
-
-# We check which packages include folders
-for key in old_manifest:
-    for value in old_manifest[key]['files']:
-        # Ignore folders, since we don't import those, difficult to handle multilib
-        if isFolder(value):
-            print ('%s is a folder' % value)
-            if key not in hasfolders:
-                hasfolders.append(key)
-            if value not in allfolders:
-                allfolders.append(value)
-
-for key in old_manifest:
-    # Use an empty dict as data structure to hold data for each package and fill it up
-    new_manifest[key] = collections.OrderedDict()
-    new_manifest[key]['summary'] = old_manifest[key]['summary']
-    new_manifest[key]['rdepends']=[]
-    new_manifest[key]['files'] = []
-
-    # All packages should depend on core
-    if key != 'core':
-        new_manifest[key]['rdepends'].append('core')
-
-    # Handle special cases, we assume that when they were manually added 
-    # to the manifest we knew what we were doing.
-    print ('Handling package %s' % key)
-    special_packages=['misc', 'modules', 'tests', 'dev']
-    if key in special_packages or 'staticdev' in key:
-        print('Passing %s package directly' % key)
-        new_manifest[key]=old_manifest[key]
-        continue
-
-    for value in old_manifest[key]['files']:
-        # We already handled core on the first pass
-        if key == 'core':
-            new_manifest[key]['files'].append(value)
-            continue
-        # Ignore folders, since we don't import those, difficult to handle multilib
-        if isFolder(value):
-            # Pass folders directly
-            new_manifest[key]['files'].append(value)
-        # Ignore binaries, since we don't import those
-        if '${bindir}' in value:
-            # Pass it directly to the new manifest data structure
-            if value not in new_manifest[key]['files']:
-                new_manifest[key]['files'].append(value)
-            continue
-        # Ignore empty values
-        if value == '':
-            continue
-        if '${includedir}' in value:
-            if value not in new_manifest[key]['files']:
-                new_manifest[key]['files'].append(value)
-            continue
-        # Get module name , shouldnt be affected by libdir/bindir
-        value = os.path.splitext(os.path.basename(os.path.normpath(value)))[0]
-
-        # Launch separate task for each module for deterministic behavior
-        # Each module will only import what is necessary for it to work in specific
-        print ('Getting dependencies for module: %s' % value)
-        output = subprocess.check_output([sys.executable, 'get_module_deps2.py', '%s' % value])
-
-        # We can print dependencies for debugging purposes
-        #print (output)
-        # Output will have all dependencies
-        for item in output.split():
-
-            # Warning: This first part is ugly
-            # One of the dependencies that was found, could be inside of one of the folders included by another package
-            # We need to check if this happens so we can add the package containing the folder as an RDEPENDS
-            # e.g. Folder encodings contained in codecs
-            # This would be solved if no packages included any folders
-
-            # This can be done in two ways:
-            # 1 - We assume that if we take out the filename from the path we would get
-            #   the folder string, then we would check if folder string is in the list of folders
-            #   This would not work if a package contains a folder which contains another folder
-            #   e.g. path/folder1/folder2/filename  folder_string= path/folder1/folder2
-            #   folder_string would not match any value contained in the list of folders
-            #
-            # 2 - We do it the other way around, checking if the folder is contained in the path
-            #   e.g. path/folder1/folder2/filename  folder_string= path/folder1/folder2
-            #   is folder_string inside path/folder1/folder2/filename?, 
-            #   Yes, it works, but we waste a couple of milliseconds.
-
-            inFolders=False
-            for folder in allfolders:
-                # The module could have a directory named after it, e.g. xml, if we take out the filename from the path
-                # we'll end up with ${libdir}, and we want ${libdir}/xml
-                if isFolder(item):
-                    check_path = item
-                else:
-                    check_path = os.path.dirname(item)
-                if folder in check_path :
-                    inFolders = True # Did we find a folder?
-                    folderFound = False # Second flag to break inner for
-                    # Loop only through packages which contain folders
-                    for keyfolder in hasfolders:
-                        if (folderFound == False):
-                            #print("Checking folder %s on package %s" % (item,keyfolder))
-                            for file_folder in old_manifest[keyfolder]['files']:
-                                if file_folder==folder:
-                                    print ('%s found in %s' % (folder, keyfolder))
-                                    folderFound = True
-                                    if keyfolder not in new_manifest[key]['rdepends'] and keyfolder != key:
-                                        new_manifest[key]['rdepends'].append(keyfolder)
-                        else:
-                            break
-
-            # A folder was found so we're done with this item, we can go on
-            if inFolders:
-                continue
-
-            # We might already have it on the dictionary since it could depend on a (previously checked) module
-            if item not in new_manifest[key]['files']:
-                # Handle core as a special package, we already did it so we pass it to NEW data structure directly
-                if key=='core':
-                  print('Adding %s to %s FILES' % (item, key))
-                  if item.endswith('*'):
-                      wildcards.append(item)
-                  new_manifest[key]['files'].append(item)
-
-                  # Check for repeated files
-                  if item not in allfiles:
-                      allfiles.append(item)
-                  else:
-                      repeated.append(item)
-
-                else:
-
-                    # Check if this dependency is already contained on another package, so we add it
-                    # as an RDEPENDS, or if its not, it means it should be contained on the current
-                    # package, so we should add it to FILES
-                    for newkey in old_manifest:
-                        # Debug
-                        #print("Checking %s " % item + " in %s" % newkey)
-                        if item in old_manifest[newkey]['files']:      
-                                # Since were nesting, we need to check its not the same key
-                                if(newkey!=key):
-                                    if newkey not in new_manifest[key]['rdepends']:
-                                       # Add it to the new manifest data struct
-                                       # Debug
-                                       print('Adding %s to %s RDEPENDS, because it contains %s' % (newkey, key, item))
-                                       new_manifest[key]['rdepends'].append(newkey)
-                                    break
-                    else:
-                        # Debug
-                        print('Adding %s to %s FILES' % (item, key))
-                        # Since it wasnt found on another package, its not an RDEP, so add it to FILES for this package
-                        new_manifest[key]['files'].append(item)
-                        if item.endswith('*'):
-                            wildcards.append(item)
-                        if item not in allfiles:
-                            allfiles.append(item)
-                        else:
-                            repeated.append(item)
-
-print ('The following files are repeated (contained in more than one package), please check which package should get it:')
-print (repeated)
-print('The following files contain wildcards, please check they are necessary')
-print(wildcards)
-print('The following files contain folders, please check they are necessary')
-print(hasfolders)
-
-# Sort it just so it looks nice 
-for key in new_manifest:
-    new_manifest[key]['files'].sort()
-    new_manifest[key]['rdepends'].sort()
-
-# Create the manifest from the data structure that was built
-with open('python2-manifest.json.new','w') as outfile:
-    json.dump(new_manifest,outfile, indent=4)
-
-prepend_comments(comments,'python2-manifest.json.new')
diff --git a/poky/meta/recipes-devtools/python/python/fix_for_using_different_libdir.patch b/poky/meta/recipes-devtools/python/python/fix_for_using_different_libdir.patch
deleted file mode 100644
index 5f73093..0000000
--- a/poky/meta/recipes-devtools/python/python/fix_for_using_different_libdir.patch
+++ /dev/null
@@ -1,77 +0,0 @@
-Upstream-Status: Inappropriate [Embedded specific]
-
-This patch fixes issuing with different libdir like lib64.
-This patch makes the native python binary modules findable
-in the install process of the host python.
-
-Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
-Date: 2012/03/14
-
-Updated for python 2.7.3
-Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
-Date: 2012/05/01
-
-Rebased for python-2.7.9
-Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com>
-
-
-Index: Python-2.7.9/Lib/sysconfig.py
-===================================================================
---- Python-2.7.9.orig/Lib/sysconfig.py
-+++ Python-2.7.9/Lib/sysconfig.py
-@@ -9,7 +9,7 @@ _INSTALL_SCHEMES = {
-     'posix_prefix': {
-         'stdlib': '{base}/'+sys.lib+'/python{py_version_short}',
-         'platstdlib': '{platbase}/'+sys.lib+'/python{py_version_short}',
--        'purelib': '{base}/lib/python{py_version_short}/site-packages',
-+        'purelib': '{base}/'+sys.lib+'/python{py_version_short}/site-packages',
-         'platlib': '{platbase}/'+sys.lib+'/python{py_version_short}/site-packages',
-         'include': '{base}/include/python{py_version_short}',
-         'platinclude': '{platbase}/include/python{py_version_short}',
-@@ -67,7 +67,7 @@ _INSTALL_SCHEMES = {
-     'posix_user': {
-         'stdlib': '{userbase}/'+sys.lib+'/python{py_version_short}',
-         'platstdlib': '{userbase}/'+sys.lib+'/python{py_version_short}',
--        'purelib': '{userbase}/lib/python{py_version_short}/site-packages',
-+        'purelib': '{userbase}/'+sys.lib+'/python{py_version_short}/site-packages',
-         'platlib': '{userbase}/'+sys.lib+'/python{py_version_short}/site-packages',
-         'include': '{userbase}/include/python{py_version_short}',
-         'scripts': '{userbase}/bin',
-Index: Python-2.7.9/Makefile.pre.in
-===================================================================
---- Python-2.7.9.orig/Makefile.pre.in
-+++ Python-2.7.9/Makefile.pre.in
-@@ -1046,27 +1046,27 @@ libinstall:	build_all $(srcdir)/Lib/$(PL
- 		$(INSTALL_DATA) $(srcdir)/Modules/xxmodule.c \
- 			$(DESTDIR)$(LIBDEST)/distutils/tests ; \
- 	fi
--	PYTHONPATH=$(DESTDIR)$(LIBDEST)  $(RUNSHARED) \
-+	PYTHONPATH=$(DESTDIR)$(LIBDEST):${CROSSPYTHONPATH} $(RUNSHARED) \
- 		$(HOSTPYTHON) -Wi -tt $(DESTDIR)$(LIBDEST)/compileall.py \
- 		-d $(LIBDEST) -f \
- 		-x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \
- 		$(DESTDIR)$(LIBDEST)
--	PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
-+	PYTHONPATH=$(DESTDIR)$(LIBDEST):${CROSSPYTHONPATH}$(RUNSHARED) \
- 		$(HOSTPYTHON) -Wi -tt $(DESTDIR)$(LIBDEST)/compileall.py \
- 		-d $(LIBDEST) -f \
- 		-x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \
- 		$(DESTDIR)$(LIBDEST)
--	-PYTHONPATH=$(DESTDIR)$(LIBDEST)  $(RUNSHARED) \
-+	-PYTHONPATH=$(DESTDIR)$(LIBDEST):${CROSSPYTHONPATH} $(RUNSHARED) \
- 		$(HOSTPYTHON) -Wi -tt $(DESTDIR)$(LIBDEST)/compileall.py \
- 		-d $(LIBDEST)/site-packages -f \
- 		-x badsyntax $(DESTDIR)$(LIBDEST)/site-packages
--	-PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
-+	-PYTHONPATH=$(DESTDIR)$(LIBDEST):${CROSSPYTHONPATH} $(RUNSHARED) \
- 		$(HOSTPYTHON) -Wi -tt $(DESTDIR)$(LIBDEST)/compileall.py \
- 		-d $(LIBDEST)/site-packages -f \
- 		-x badsyntax $(DESTDIR)$(LIBDEST)/site-packages
--	-PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
-+	-PYTHONPATH=$(DESTDIR)$(LIBDEST):${CROSSPYTHONPATH} $(RUNSHARED) \
- 		$(HOSTPYTHON) -m lib2to3.pgen2.driver $(DESTDIR)$(LIBDEST)/lib2to3/Grammar.txt
--	-PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
-+	-PYTHONPATH=$(DESTDIR)$(LIBDEST):${CROSSPYTHONPATH} $(RUNSHARED) \
- 		$(HOSTPYTHON) -m lib2to3.pgen2.driver $(DESTDIR)$(LIBDEST)/lib2to3/PatternGrammar.txt
- 
- # Create the PLATDIR source directory, if one wasn't distributed..
diff --git a/poky/meta/recipes-devtools/python/python/float-endian.patch b/poky/meta/recipes-devtools/python/python/float-endian.patch
deleted file mode 100644
index 8a5c90a..0000000
--- a/poky/meta/recipes-devtools/python/python/float-endian.patch
+++ /dev/null
@@ -1,216 +0,0 @@
-Python uses AC_RUN_IFELSE to determine the byte order for floats and doubles,
-and falls back onto "I don't know" if it can't run code.  This results in
-crippled floating point numbers in Python, and the regression tests fail.
-
-Instead of running code, take a macro from autoconf-archive which compiles C
-with a special double in which has an ASCII representation, and then greps the
-binary to identify the format.
-
-Upstream-Status: Backport
-Signed-off-by: Ross Burton <ross.burton@intel.com>
-
-From 253f47b28120c42cfe53a4e2f5ed0ab0ed469deb Mon Sep 17 00:00:00 2001
-From: Ross Burton <ross@burtonini.com>
-Date: Wed, 19 Sep 2018 07:25:48 +0100
-Subject: [PATCH] closes bpo-34585: Don't do runtime test to get float byte
- order. (GH-9085)
-
-Currently configure.ac uses AC_RUN_IFELSE to determine the byte order of doubles, but this silently fails under cross compilation and Python doesn't do floats properly.
-
-Instead, steal a macro from autoconf-archive which compiles code using magic doubles (which encode to ASCII) and grep for the representation in the binary.
-
-RFC because this doesn't yet handle the weird ancient ARMv4 OABI 'mixed-endian' encoding properly. This encoding is ancient and I don't believe the union of "Python 3.8 users" and "OABI users" has anything in. Should the support for this just be dropped too? Alternatively, someone will need to find an OABI toolchain to verify the encoding of the magic double.
-
-Signed-off-by: Ross Burton <ross.burton@intel.com>
----
- .../Build/2018-09-18-16-28-31.bpo-34585.CGMu0h.rst |  3 +
- configure.ac                                       | 76 ++++----------------
- m4/ax_c_float_words_bigendian.m4                   | 83 ++++++++++++++++++++++
- 3 files changed, 99 insertions(+), 63 deletions(-)
- create mode 100644 Misc/NEWS.d/next/Build/2018-09-18-16-28-31.bpo-34585.CGMu0h.rst
- create mode 100644 m4/ax_c_float_words_bigendian.m4
-
-diff --git a/configure.ac b/configure.ac
-index 913d5469d0..7672735396 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -3835,74 +3835,24 @@ fi],
- # * Check for various properties of floating point *
- # **************************************************
- 
--AC_MSG_CHECKING(whether C doubles are little-endian IEEE 754 binary64)
--AC_CACHE_VAL(ac_cv_little_endian_double, [
--AC_RUN_IFELSE([AC_LANG_SOURCE([[
--#include <string.h>
--int main() {
--    double x = 9006104071832581.0;
--    if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
--        return 0;
--    else
--        return 1;
--}
--]])],
--[ac_cv_little_endian_double=yes],
--[ac_cv_little_endian_double=no],
--[ac_cv_little_endian_double=no])])
--AC_MSG_RESULT($ac_cv_little_endian_double)
--if test "$ac_cv_little_endian_double" = yes
--then
--  AC_DEFINE(DOUBLE_IS_LITTLE_ENDIAN_IEEE754, 1,
--  [Define if C doubles are 64-bit IEEE 754 binary format, stored
--   with the least significant byte first])
--fi
--
--AC_MSG_CHECKING(whether C doubles are big-endian IEEE 754 binary64)
--AC_CACHE_VAL(ac_cv_big_endian_double, [
--AC_RUN_IFELSE([AC_LANG_SOURCE([[
--#include <string.h>
--int main() {
--    double x = 9006104071832581.0;
--    if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
--        return 0;
--    else
--        return 1;
--}
--]])],
--[ac_cv_big_endian_double=yes],
--[ac_cv_big_endian_double=no],
--[ac_cv_big_endian_double=no])])
--AC_MSG_RESULT($ac_cv_big_endian_double)
--if test "$ac_cv_big_endian_double" = yes
-+AX_C_FLOAT_WORDS_BIGENDIAN
-+if test "$ax_cv_c_float_words_bigendian" = "yes"
- then
-   AC_DEFINE(DOUBLE_IS_BIG_ENDIAN_IEEE754, 1,
-   [Define if C doubles are 64-bit IEEE 754 binary format, stored
-    with the most significant byte first])
--fi
--
--# Some ARM platforms use a mixed-endian representation for doubles.
--# While Python doesn't currently have full support for these platforms
--# (see e.g., issue 1762561), we can at least make sure that float <-> string
--# conversions work.
--AC_MSG_CHECKING(whether C doubles are ARM mixed-endian IEEE 754 binary64)
--AC_CACHE_VAL(ac_cv_mixed_endian_double, [
--AC_RUN_IFELSE([AC_LANG_SOURCE([[
--#include <string.h>
--int main() {
--    double x = 9006104071832581.0;
--    if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
--        return 0;
--    else
--        return 1;
--}
--]])],
--[ac_cv_mixed_endian_double=yes],
--[ac_cv_mixed_endian_double=no],
--[ac_cv_mixed_endian_double=no])])
--AC_MSG_RESULT($ac_cv_mixed_endian_double)
--if test "$ac_cv_mixed_endian_double" = yes
-+elif test "$ax_cv_c_float_words_bigendian" = "no"
- then
-+  AC_DEFINE(DOUBLE_IS_LITTLE_ENDIAN_IEEE754, 1,
-+  [Define if C doubles are 64-bit IEEE 754 binary format, stored
-+   with the least significant byte first])
-+else
-+  # Some ARM platforms use a mixed-endian representation for doubles.
-+  # While Python doesn't currently have full support for these platforms
-+  # (see e.g., issue 1762561), we can at least make sure that float <-> string
-+  # conversions work.
-+  # FLOAT_WORDS_BIGENDIAN doesnt actually detect this case, but if it's not big
-+  # or little, then it must be this?
-   AC_DEFINE(DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754, 1,
-   [Define if C doubles are 64-bit IEEE 754 binary format, stored
-    in ARM mixed-endian order (byte order 45670123)])
-diff --git a/m4/ax_c_float_words_bigendian.m4 b/m4/ax_c_float_words_bigendian.m4
-new file mode 100644
-index 0000000000..216b90d803
---- /dev/null
-+++ b/m4/ax_c_float_words_bigendian.m4
-@@ -0,0 +1,83 @@
-+# ===============================================================================
-+#  https://www.gnu.org/software/autoconf-archive/ax_c_float_words_bigendian.html
-+# ===============================================================================
-+#
-+# SYNOPSIS
-+#
-+#   AX_C_FLOAT_WORDS_BIGENDIAN([ACTION-IF-TRUE], [ACTION-IF-FALSE], [ACTION-IF-UNKNOWN])
-+#
-+# DESCRIPTION
-+#
-+#   Checks the ordering of words within a multi-word float. This check is
-+#   necessary because on some systems (e.g. certain ARM systems), the float
-+#   word ordering can be different from the byte ordering. In a multi-word
-+#   float context, "big-endian" implies that the word containing the sign
-+#   bit is found in the memory location with the lowest address. This
-+#   implementation was inspired by the AC_C_BIGENDIAN macro in autoconf.
-+#
-+#   The endianness is detected by first compiling C code that contains a
-+#   special double float value, then grepping the resulting object file for
-+#   certain strings of ASCII values. The double is specially crafted to have
-+#   a binary representation that corresponds with a simple string. In this
-+#   implementation, the string "noonsees" was selected because the
-+#   individual word values ("noon" and "sees") are palindromes, thus making
-+#   this test byte-order agnostic. If grep finds the string "noonsees" in
-+#   the object file, the target platform stores float words in big-endian
-+#   order. If grep finds "seesnoon", float words are in little-endian order.
-+#   If neither value is found, the user is instructed to specify the
-+#   ordering.
-+#
-+# LICENSE
-+#
-+#   Copyright (c) 2008 Daniel Amelang <dan@amelang.net>
-+#
-+#   Copying and distribution of this file, with or without modification, are
-+#   permitted in any medium without royalty provided the copyright notice
-+#   and this notice are preserved. This file is offered as-is, without any
-+#   warranty.
-+
-+#serial 11
-+
-+AC_DEFUN([AX_C_FLOAT_WORDS_BIGENDIAN],
-+  [AC_CACHE_CHECK(whether float word ordering is bigendian,
-+                  ax_cv_c_float_words_bigendian, [
-+
-+ax_cv_c_float_words_bigendian=unknown
-+AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
-+
-+double d = 90904234967036810337470478905505011476211692735615632014797120844053488865816695273723469097858056257517020191247487429516932130503560650002327564517570778480236724525140520121371739201496540132640109977779420565776568942592.0;
-+
-+]])], [
-+
-+if grep noonsees conftest.$ac_objext >/dev/null ; then
-+  ax_cv_c_float_words_bigendian=yes
-+fi
-+if grep seesnoon conftest.$ac_objext >/dev/null ; then
-+  if test "$ax_cv_c_float_words_bigendian" = unknown; then
-+    ax_cv_c_float_words_bigendian=no
-+  else
-+    ax_cv_c_float_words_bigendian=unknown
-+  fi
-+fi
-+
-+])])
-+
-+case $ax_cv_c_float_words_bigendian in
-+  yes)
-+    m4_default([$1],
-+      [AC_DEFINE([FLOAT_WORDS_BIGENDIAN], 1,
-+                 [Define to 1 if your system stores words within floats
-+                  with the most significant word first])]) ;;
-+  no)
-+    $2 ;;
-+  *)
-+    m4_default([$3],
-+      [AC_MSG_ERROR([
-+
-+Unknown float word ordering. You need to manually preset
-+ax_cv_c_float_words_bigendian=no (or yes) according to your system.
-+
-+    ])]) ;;
-+esac
-+
-+])# AX_C_FLOAT_WORDS_BIGENDIAN
--- 
-2.11.0
-
diff --git a/poky/meta/recipes-devtools/python/python/get_module_deps2.py b/poky/meta/recipes-devtools/python/python/get_module_deps2.py
deleted file mode 100644
index 73e7c6f..0000000
--- a/poky/meta/recipes-devtools/python/python/get_module_deps2.py
+++ /dev/null
@@ -1,112 +0,0 @@
-# This script is launched on separate task for each python module
-# It checks for dependencies for that specific module and prints 
-# them out, the output of this execution will have all dependencies
-# for a specific module, which will be parsed an dealt on create_manifest.py
-#
-# Author: Alejandro Enedino Hernandez Samaniego "aehs29" <aehs29@gmail.com>
-
-
-# We can get a log per module, for all the dependencies that were found, but its messy.
-debug=False
-
-import sys
-
-# 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
-# and check what modules are currently running, if we substract them from the
-# modules we had initially, we get the dependencies for the module we imported.
-
-# We use importlib to achieve this, so we also need to know what modules importlib needs
-import importlib
-
-core_deps=set(sys.modules)
-
-def fix_path(dep_path):
-    import os
-    # We DONT want the path on our HOST system
-    pivot='recipe-sysroot-native'
-    dep_path=dep_path[dep_path.find(pivot)+len(pivot):]
-
-    if '/usr/bin' in dep_path:
-        dep_path = dep_path.replace('/usr/bin''${bindir}')
-
-    # Handle multilib, is there a better way?
-    if '/usr/lib32' in dep_path:
-        dep_path = dep_path.replace('/usr/lib32','${libdir}')
-    if '/usr/lib64' in dep_path:
-        dep_path = dep_path.replace('/usr/lib64','${libdir}')
-    if '/usr/lib' in dep_path:
-        dep_path = dep_path.replace('/usr/lib','${libdir}')
-    if '/usr/include' in dep_path:
-        dep_path = dep_path.replace('/usr/include','${includedir}')
-    if '__init__.' in dep_path:
-        dep_path =  os.path.split(dep_path)[0]
-
-    # If a *.pyc file was imported, we replace it with *.py (since we deal with PYCs on create_manifest)
-    if '.pyc' in dep_path:
-        dep_path = dep_path.replace('.pyc','.py')
-
-    return dep_path
-
-# Module to import was passed as an argument
-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)
-except ImportError as e:
-    if (debug==True):
-        log.write('Module was not found')
-    pass
-
-
-# Get current module dependencies, dif will contain a list of specific deps for this module
-module_deps=set(sys.modules)
-
-# We handle the core package (1st pass on create_manifest.py) as a special case
-if current_module == 'python-core-package':
-    dif = core_deps
-else:
-    dif = module_deps-core_deps
-
-
-# Check where each dependency came from
-for item in dif:
-    dep_path=''
-    try:
-        if (debug==True):
-            log.write('Calling: sys.modules[' + '%s' % item + '].__file__\n')
-        dep_path = sys.modules['%s' % item].__file__
-    except AttributeError as e:
-        # Deals with thread (builtin module) not having __file__ attribute
-	if debug==True:
-            log.write(item + ' ')
-            log.write(str(e))
-	    log.write('\n')
-            pass
-    except NameError as e:
-        # Deals with NameError: name 'dep_path' is not defined
-        # because module is not found (wasn't compiled?), e.g. bddsm
-        if (debug==True):
-            log.write(item+' ') 
-            log.write(str(e))                                              
-        pass
-
-    # Site-customize is a special case since we (OpenEmbedded) put it there manually
-    if 'sitecustomize' in dep_path:
-        dep_path = '${libdir}/python2.7/sitecustomize.py'
-        # Prints out result, which is what will be used by create_manifest
-        print (dep_path)
-        continue
-
-    dep_path = fix_path(dep_path)
-
-    if (debug==True):
-        log.write(dep_path+'\n')
-
-    # Prints out result, which is what will be used by create_manifest
-    print (dep_path)
-
-if debug==True:
-    log.close()
diff --git a/poky/meta/recipes-devtools/python/python/host_include_contamination.patch b/poky/meta/recipes-devtools/python/python/host_include_contamination.patch
deleted file mode 100644
index e0aafb2..0000000
--- a/poky/meta/recipes-devtools/python/python/host_include_contamination.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-when building python for qemux86-64 on ubuntu 11.10/64bit
-it gropes into host includes and then mixes them with cross
-includes and as a result some modules fail to compile and link
-one of the modules is python-elementtree which is then not
-found during image creation
-
-Proble is that setup.py tries to add native includes that newer
-ubuntu has introduced for multiarch support. But that should
-only happen for native builds and not cross building python
-so we add a check here.
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-Upstream-Status: Pending
-
-
-diff --git a/setup.py b/setup.py
-index ba2d242..bf859be 100644
---- a/setup.py
-+++ b/setup.py
-@@ -393,6 +393,8 @@ class PyBuildExt(build_ext):
- 
-         if not find_executable('dpkg-architecture'):
-             return
-+        if os.environ.get('CROSS_COMPILE') is not None:
-+            return
-         opt = ''
-         if cross_compiling:
-             opt = '-t' + sysconfig.get_config_var('HOST_GNU_TYPE')
diff --git a/poky/meta/recipes-devtools/python/python/multilib.patch b/poky/meta/recipes-devtools/python/python/multilib.patch
deleted file mode 100644
index d24bc15..0000000
--- a/poky/meta/recipes-devtools/python/python/multilib.patch
+++ /dev/null
@@ -1,298 +0,0 @@
-Rebased for python-2.7.9
-Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com>
-Upstream-Status: Pending
-Index: Python-2.7.14/configure.ac
-===================================================================
---- Python-2.7.14.orig/configure.ac
-+++ Python-2.7.14/configure.ac
-@@ -758,6 +758,10 @@ SunOS*)
-     ;;
- esac
- 
-+AC_SUBST(LIB)
-+AC_MSG_CHECKING(LIB)
-+LIB="SEDMELIBLEAF"
-+AC_MSG_RESULT($LIB)
- 
- AC_SUBST(LIBRARY)
- AC_MSG_CHECKING(LIBRARY)
-Index: Python-2.7.14/Include/pythonrun.h
-===================================================================
---- Python-2.7.14.orig/Include/pythonrun.h
-+++ Python-2.7.14/Include/pythonrun.h
-@@ -108,6 +108,7 @@ PyAPI_FUNC(char *) Py_GetPath(void);
- /* In their own files */
- PyAPI_FUNC(const char *) Py_GetVersion(void);
- PyAPI_FUNC(const char *) Py_GetPlatform(void);
-+PyAPI_FUNC(const char *) Py_GetLib(void);
- PyAPI_FUNC(const char *) Py_GetCopyright(void);
- PyAPI_FUNC(const char *) Py_GetCompiler(void);
- PyAPI_FUNC(const char *) Py_GetBuildInfo(void);
-Index: Python-2.7.14/Lib/distutils/command/install.py
-===================================================================
---- Python-2.7.14.orig/Lib/distutils/command/install.py
-+++ Python-2.7.14/Lib/distutils/command/install.py
-@@ -22,6 +22,8 @@ from site import USER_BASE
- from site import USER_SITE
- 
- 
-+libname = sys.lib
-+
- if sys.version < "2.2":
-     WINDOWS_SCHEME = {
-         'purelib': '$base',
-@@ -41,8 +43,8 @@ else:
- 
- INSTALL_SCHEMES = {
-     'unix_prefix': {
--        'purelib': '$base/lib/python$py_version_short/site-packages',
--        'platlib': '$platbase/lib/python$py_version_short/site-packages',
-+        'purelib': '$platbase/'+libname+'/python$py_version_short/site-packages',
-+        'platlib': '$platbase/'+libname+'/python$py_version_short/site-packages',
-         'headers': '$base/include/python$py_version_short/$dist_name',
-         'scripts': '$base/bin',
-         'data'   : '$base',
-Index: Python-2.7.14/Lib/distutils/sysconfig.py
-===================================================================
---- Python-2.7.14.orig/Lib/distutils/sysconfig.py
-+++ Python-2.7.14/Lib/distutils/sysconfig.py
-@@ -119,8 +119,11 @@ def get_python_lib(plat_specific=0, stan
-         prefix = plat_specific and EXEC_PREFIX or PREFIX
- 
-     if os.name == "posix":
--        libpython = os.path.join(prefix,
--                                 "lib", "python" + get_python_version())
-+        if plat_specific or standard_lib:
-+            lib = sys.lib
-+        else:
-+            lib = "lib"
-+        libpython = os.path.join(prefix, lib, "python" + get_python_version())
-         if standard_lib:
-             return libpython
-         else:
-Index: Python-2.7.14/Lib/pydoc.py
-===================================================================
---- Python-2.7.14.orig/Lib/pydoc.py
-+++ Python-2.7.14/Lib/pydoc.py
-@@ -375,7 +375,7 @@ class Doc:
-     docmodule = docclass = docroutine = docother = docproperty = docdata = fail
- 
-     def getdocloc(self, object,
--                  basedir=os.path.join(sys.exec_prefix, "lib",
-+                  basedir=os.path.join(sys.exec_prefix, "sys.lib",
-                                        "python"+sys.version[0:3])):
-         """Return the location of module docs or None"""
- 
-Index: Python-2.7.14/Lib/site.py
-===================================================================
---- Python-2.7.14.orig/Lib/site.py
-+++ Python-2.7.14/Lib/site.py
-@@ -288,13 +288,18 @@ def getsitepackages():
-         if sys.platform in ('os2emx', 'riscos'):
-             sitepackages.append(os.path.join(prefix, "Lib", "site-packages"))
-         elif os.sep == '/':
--            sitepackages.append(os.path.join(prefix, "lib",
-+            sitepackages.append(os.path.join(prefix, sys.lib,
-                                         "python" + sys.version[:3],
-                                         "site-packages"))
--            sitepackages.append(os.path.join(prefix, "lib", "site-python"))
-+            sitepackages.append(os.path.join(prefix, sys.lib, "site-python"))
-+            if sys.lib != "lib":
-+                sitepackages.append(os.path.join(prefix, "lib",
-+                                            "python" + sys.version[:3],
-+                                            "site-packages"))
-+                sitepackages.append(os.path.join(prefix, "lib", "site-python"))
-         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):
-Index: Python-2.7.14/Lib/sysconfig.py
-===================================================================
---- Python-2.7.14.orig/Lib/sysconfig.py
-+++ Python-2.7.14/Lib/sysconfig.py
-@@ -7,10 +7,10 @@ from os.path import pardir, realpath
- 
- _INSTALL_SCHEMES = {
-     'posix_prefix': {
--        'stdlib': '{base}/lib/python{py_version_short}',
--        'platstdlib': '{platbase}/lib/python{py_version_short}',
-+        'stdlib': '{base}/'+sys.lib+'/python{py_version_short}',
-+        'platstdlib': '{platbase}/'+sys.lib+'/python{py_version_short}',
-         'purelib': '{base}/lib/python{py_version_short}/site-packages',
--        'platlib': '{platbase}/lib/python{py_version_short}/site-packages',
-+        'platlib': '{platbase}/'+sys.lib+'/python{py_version_short}/site-packages',
-         'include': '{base}/include/python{py_version_short}',
-         'platinclude': '{platbase}/include/python{py_version_short}',
-         'scripts': '{base}/bin',
-@@ -65,10 +65,10 @@ _INSTALL_SCHEMES = {
-         'data'   : '{userbase}',
-         },
-     'posix_user': {
--        'stdlib': '{userbase}/lib/python{py_version_short}',
--        'platstdlib': '{userbase}/lib/python{py_version_short}',
-+        'stdlib': '{userbase}/'+sys.lib+'/python{py_version_short}',
-+        'platstdlib': '{userbase}/'+sys.lib+'/python{py_version_short}',
-         'purelib': '{userbase}/lib/python{py_version_short}/site-packages',
--        'platlib': '{userbase}/lib/python{py_version_short}/site-packages',
-+        'platlib': '{userbase}/'+sys.lib+'/python{py_version_short}/site-packages',
-         'include': '{userbase}/include/python{py_version_short}',
-         'scripts': '{userbase}/bin',
-         'data'   : '{userbase}',
-Index: Python-2.7.14/Lib/test/test_dl.py
-===================================================================
---- Python-2.7.14.orig/Lib/test/test_dl.py
-+++ Python-2.7.14/Lib/test/test_dl.py
-@@ -4,10 +4,11 @@
- import unittest
- from test.test_support import verbose, import_module
- dl = import_module('dl', deprecated=True)
-+import sys
- 
- sharedlibs = [
--    ('/usr/lib/libc.so', 'getpid'),
--    ('/lib/libc.so.6', 'getpid'),
-+    ('/usr/'+sys.lib+'/libc.so', 'getpid'),
-+    ('/'+sys.lib+'/libc.so.6', 'getpid'),
-     ('/usr/bin/cygwin1.dll', 'getpid'),
-     ('/usr/lib/libc.dylib', 'getpid'),
-     ]
-Index: Python-2.7.14/Lib/test/test_site.py
-===================================================================
---- Python-2.7.14.orig/Lib/test/test_site.py
-+++ Python-2.7.14/Lib/test/test_site.py
-@@ -252,12 +252,16 @@ class HelperFunctionsTests(unittest.Test
-             self.assertEqual(dirs[0], wanted)
-         elif os.sep == '/':
-             # OS X, Linux, FreeBSD, etc
--            self.assertEqual(len(dirs), 2)
-             wanted = os.path.join('xoxo', 'lib', 'python' + sys.version[:3],
-                                   'site-packages')
--            self.assertEqual(dirs[0], wanted)
-+            self.assertTrue(wanted in dirs)
-             wanted = os.path.join('xoxo', 'lib', 'site-python')
--            self.assertEqual(dirs[1], wanted)
-+            self.assertTrue(wanted in dirs)
-+            wanted = os.path.join('xoxo', sys.lib, 'python' + sys.version[:3],
-+                                  'site-packages')
-+            self.assertTrue(wanted in dirs)
-+            wanted = os.path.join('xoxo', sys.lib, 'site-python')
-+            self.assertTrue(wanted in dirs)
-         else:
-             # other platforms
-             self.assertEqual(len(dirs), 2)
-Index: Python-2.7.14/Lib/trace.py
-===================================================================
---- Python-2.7.14.orig/Lib/trace.py
-+++ Python-2.7.14/Lib/trace.py
-@@ -754,10 +754,10 @@ def main(argv=None):
-                 # should I also call expanduser? (after all, could use $HOME)
- 
-                 s = s.replace("$prefix",
--                              os.path.join(sys.prefix, "lib",
-+                              os.path.join(sys.prefix, sys.lib,
-                                            "python" + sys.version[:3]))
-                 s = s.replace("$exec_prefix",
--                              os.path.join(sys.exec_prefix, "lib",
-+                              os.path.join(sys.exec_prefix, sys.lib,
-                                            "python" + sys.version[:3]))
-                 s = os.path.normpath(s)
-                 ignore_dirs.append(s)
-Index: Python-2.7.14/Makefile.pre.in
-===================================================================
---- Python-2.7.14.orig/Makefile.pre.in
-+++ Python-2.7.14/Makefile.pre.in
-@@ -91,6 +91,7 @@ PY_CFLAGS=	$(CFLAGS) $(CPPFLAGS) $(CFLAG
- 
- # Machine-dependent subdirectories
- MACHDEP=	@MACHDEP@
-+LIB=		@LIB@
- 
- # Multiarch directory (may be empty)
- MULTIARCH=	@MULTIARCH@
-@@ -110,7 +111,7 @@ LIBDIR=		@libdir@
- MANDIR=		@mandir@
- INCLUDEDIR=	@includedir@
- CONFINCLUDEDIR=	$(exec_prefix)/include
--SCRIPTDIR=	$(prefix)/lib
-+SCRIPTDIR=	$(prefix)/@LIB@
- 
- # Detailed destination directories
- BINLIBDEST=	$(LIBDIR)/python$(VERSION)
-@@ -645,6 +646,7 @@ Modules/getpath.o: $(srcdir)/Modules/get
- 		-DEXEC_PREFIX='"$(exec_prefix)"' \
- 		-DVERSION='"$(VERSION)"' \
- 		-DVPATH='"$(VPATH)"' \
-+		-DLIB='"$(LIB)"' \
- 		-o $@ $(srcdir)/Modules/getpath.c
- 
- Modules/python.o: $(srcdir)/Modules/python.c
-@@ -693,7 +695,7 @@ regen-ast:
- Python/compile.o Python/symtable.o Python/ast.o: $(srcdir)/Include/graminit.h $(srcdir)/Include/Python-ast.h
- 
- Python/getplatform.o: $(srcdir)/Python/getplatform.c
--		$(CC) -c $(PY_CFLAGS) -DPLATFORM='"$(MACHDEP)"' -o $@ $(srcdir)/Python/getplatform.c
-+		$(CC) -c $(PY_CFLAGS) -DPLATFORM='"$(MACHDEP)"' -DLIB='"$(LIB)"' -o $@ $(srcdir)/Python/getplatform.c
- 
- Python/importdl.o: $(srcdir)/Python/importdl.c
- 		$(CC) -c $(PY_CFLAGS) -I$(DLINCLDIR) -o $@ $(srcdir)/Python/importdl.c
-Index: Python-2.7.14/Modules/getpath.c
-===================================================================
---- Python-2.7.14.orig/Modules/getpath.c
-+++ Python-2.7.14/Modules/getpath.c
-@@ -100,6 +100,13 @@
- #error "PREFIX, EXEC_PREFIX, VERSION, and VPATH must be constant defined"
- #endif
- 
-+#define LIB_PYTHON LIB "/python" VERSION
-+
-+#ifndef PYTHONPATH
-+#define PYTHONPATH PREFIX "/" LIB_PYTHON ":" \
-+              EXEC_PREFIX "/" LIB_PYTHON "/lib-dynload"
-+#endif
-+
- #ifndef LANDMARK
- #define LANDMARK "os.py"
- #endif
-@@ -108,7 +115,7 @@ static char prefix[MAXPATHLEN+1];
- static char exec_prefix[MAXPATHLEN+1];
- static char progpath[MAXPATHLEN+1];
- static char *module_search_path = NULL;
--static char lib_python[] = "lib/python" VERSION;
-+static char lib_python[] = LIB_PYTHON;
- 
- static void
- reduce(char *dir)
-Index: Python-2.7.14/Python/getplatform.c
-===================================================================
---- Python-2.7.14.orig/Python/getplatform.c
-+++ Python-2.7.14/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;
-+}
-Index: Python-2.7.14/Python/sysmodule.c
-===================================================================
---- Python-2.7.14.orig/Python/sysmodule.c
-+++ Python-2.7.14/Python/sysmodule.c
-@@ -1437,6 +1437,8 @@ _PySys_Init(void)
-                         PyString_FromString(Py_GetCopyright()));
-     SET_SYS_FROM_STRING("platform",
-                         PyString_FromString(Py_GetPlatform()));
-+    SET_SYS_FROM_STRING("lib",
-+                        PyString_FromString(Py_GetLib()));
-     SET_SYS_FROM_STRING("executable",
-                         PyString_FromString(Py_GetProgramFullPath()));
-     SET_SYS_FROM_STRING("prefix",
diff --git a/poky/meta/recipes-devtools/python/python/parallel-makeinst-create-bindir.patch b/poky/meta/recipes-devtools/python/python/parallel-makeinst-create-bindir.patch
deleted file mode 100644
index abab41e..0000000
--- a/poky/meta/recipes-devtools/python/python/parallel-makeinst-create-bindir.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-When using make -j with the 'install' target, it's possible for altbininstall
-(which normally creates BINDIR) and libainstall (which doesn't, though it
-installs python-config there) to race, resulting in a failure due to
-attempting to install python-config into a nonexistent BINDIR. Ensure it also
-exists in the libainstall target.
-
-Upstream-Status: Pending
-
---- Python-2.7.3.orig/Makefile.pre.in
-+++ Python-2.7.3/Makefile.pre.in
-@@ -1187,7 +1187,7 @@
- LIBPC=		$(LIBDIR)/pkgconfig
- 
- libainstall:	@DEF_MAKE_RULE@ python-config
--	@for i in $(LIBDIR) $(LIBP) $(LIBPL) $(LIBPC); \
-+	@for i in $(LIBDIR) $(LIBP) $(LIBPL) $(LIBPC) $(BINDIR); \
- 	do \
- 		if test ! -d $(DESTDIR)$$i; then \
- 			echo "Creating directory $$i"; \
diff --git a/poky/meta/recipes-devtools/python/python/pass-missing-libraries-to-Extension-for-mul.patch b/poky/meta/recipes-devtools/python/python/pass-missing-libraries-to-Extension-for-mul.patch
deleted file mode 100644
index 44fcaac..0000000
--- a/poky/meta/recipes-devtools/python/python/pass-missing-libraries-to-Extension-for-mul.patch
+++ /dev/null
@@ -1,82 +0,0 @@
-From 71447f04979b267f8866573b67a4340b2719d799 Mon Sep 17 00:00:00 2001
-From: Hongxu Jia <hongxu.jia@windriver.com>
-Date: Fri, 4 Aug 2017 14:10:43 +0800
-Subject: [PATCH] setup.py: pass missing libraries to Extension for multiprocessing module
-
-In the following commit:
-...
-commit e711cafab13efc9c1fe6c5cd75826401445eb585
-Author: Benjamin Peterson <benjamin@python.org>
-Date:   Wed Jun 11 16:44:04 2008 +0000
-
-    Merged revisions 64104,64117 via svnmerge from
-    svn+ssh://pythondev@svn.python.org/python/trunk
-...
-(see diff in setup.py)
-It assigned libraries for multiprocessing module according
-the host_platform, but not pass it to Extension.
-
-In glibc, the following commit caused two definition of
-sem_getvalue are different.
-https://sourceware.org/git/?p=glibc.git;a=commit;h=042e1521c794a945edc43b5bfa7e69ad70420524
-(see diff in nptl/sem_getvalue.c for detail)
-`__new_sem_getvalue' is the latest sem_getvalue@@GLIBC_2.1
-and `__old_sem_getvalue' is to compat the old version
-sem_getvalue@GLIBC_2.0.
-
-To build python for embedded Linux systems:
-http://www.yoctoproject.org/docs/2.3.1/yocto-project-qs/yocto-project-qs.html
-If not explicitly link to library pthread (-lpthread), it will
-load glibc's sem_getvalue randomly at runtime.
-
-Such as build python on linux x86_64 host and run the python
-on linux x86_32 target. If not link library pthread, it caused
-multiprocessing bounded semaphore could not work correctly.
-...
->>> import multiprocessing
->>> pool_sema = multiprocessing.BoundedSemaphore(value=1)
->>> pool_sema.acquire()
-True
->>> pool_sema.release()
-Traceback (most recent call last):
-  File "<stdin>", line 1, in <module>
-ValueError: semaphore or lock released too many times
-...
-
-And the semaphore issue also caused multiprocessing.Queue().put() hung.
-
-Upstream-Status: Submitted [https://github.com/python/cpython/pull/2999]
-
-Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
----
- setup.py | 7 +++++--
- 1 file changed, 5 insertions(+), 2 deletions(-)
-
-diff --git a/setup.py b/setup.py
-index 54054c2..9646bfc 100644
---- a/setup.py
-+++ b/setup.py
-@@ -1586,8 +1586,10 @@ class PyBuildExt(build_ext):
-         elif host_platform.startswith('netbsd'):
-             macros = dict()
-             libraries = []
--
--        else:                                   # Linux and other unices
-+        elif host_platform.startswith(('linux')):
-+            macros = dict()
-+            libraries = ['pthread']
-+        else:                                   # Other unices
-             macros = dict()
-             libraries = ['rt']
- 
-@@ -1610,6 +1612,7 @@ class PyBuildExt(build_ext):
-         if sysconfig.get_config_var('WITH_THREAD'):
-             exts.append ( Extension('_multiprocessing', multiprocessing_srcs,
-                                     define_macros=macros.items(),
-+                                    libraries=libraries,
-                                     include_dirs=["Modules/_multiprocessing"]))
-         else:
-             missing.append('_multiprocessing')
--- 
-2.7.4
-
diff --git a/poky/meta/recipes-devtools/python/python/python-2.7.3-remove-bsdb-rpath.patch b/poky/meta/recipes-devtools/python/python/python-2.7.3-remove-bsdb-rpath.patch
deleted file mode 100644
index 216be0a..0000000
--- a/poky/meta/recipes-devtools/python/python/python-2.7.3-remove-bsdb-rpath.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-Upstream-Status: Inappropriate [embedded specific]
-
-Remove the RPATH to avoid QA issue warning.
-
-RP: Added secondary unnecessary rpath to the list 2012/8/7
-Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
-
-
-Index: Python-2.7.3/setup.py
-===================================================================
---- Python-2.7.3.orig/setup.py	2012-08-07 10:41:58.560132529 +0000
-+++ Python-2.7.3/setup.py	2012-08-07 11:09:47.852094515 +0000
-@@ -1042,7 +1042,6 @@
-             exts.append(Extension('_bsddb', ['_bsddb.c'],
-                                   depends = ['bsddb.h'],
-                                   library_dirs=dblib_dir,
--                                  runtime_library_dirs=dblib_dir,
-                                   include_dirs=db_incs,
-                                   libraries=dblibs))
-         else:
-@@ -1252,7 +1251,6 @@
-                         print "building dbm using bdb"
-                         dbmext = Extension('dbm', ['dbmmodule.c'],
-                                            library_dirs=dblib_dir,
--                                           runtime_library_dirs=dblib_dir,
-                                            include_dirs=db_incs,
-                                            define_macros=[
-                                                ('HAVE_BERKDB_H', None),
diff --git a/poky/meta/recipes-devtools/python/python/python2-manifest.json b/poky/meta/recipes-devtools/python/python/python2-manifest.json
deleted file mode 100644
index eb52e86..0000000
--- a/poky/meta/recipes-devtools/python/python/python2-manifest.json
+++ /dev/null
@@ -1,1138 +0,0 @@
-# DO NOT (entirely) modify this file manually, please read.
-#
-# IMPORTANT NOTE:
-# Please keep in mind that the create_manifest task relies on the fact the the
-# target and native Python packages are the same, and it also needs to be executed
-# with a fully working native package (with all the PACKAGECONFIGs enabled and all
-# and all the modules should be working, check log.do_compile), otherwise the script
-# will fail to find dependencies correctly, this note is valid either if you are
-# upgrading to a new Python version or adding a new package.
-#
-#
-# If you are adding a new package please follow the next steps:
-#     How to add a new package:
-#     - If a user wants to add a new package all that has to be done is:
-#     Modify the python2-manifest.json file, and add the required file(s) to the FILES list,
-#     fill up the SUMMARY section as well, the script should handle all the rest.
-#
-#     Real example:
-#     We want to add a web browser package, including the file webbrowser.py
-#     which at the moment is on python-misc.
-#     "webbrowser": {
-#         "files": ["${libdir}/python2.7/lib-dynload/webbrowser.py"],
-#         "rdepends": [],
-#         "summary": "Python Web Browser support"}
-#
-#     * Note that the rdepends field was left empty
-#
-#     We run $ bitbake python -c create_manifest and the resulting manifest
-#     should be completed after a few seconds, showing something like:
-#     "webbrowser": {
-#         "files": ["${libdir}/python2.7/webbrowser.py"],
-#         "rdepends": ["core","fcntl","io","pickle","shell","subprocess"],
-#         "summary": "Python Web Browser support"}
-#
-#
-# If you are upgrading Python to a new version please follow the next steps:
-#     After each Python upgrade, the create_manifest task should be executed, because we
-#     don't control what changes on upstream Python, so, some module dependency
-#     might have changed without us realizing it, a certain module can either have
-#     more or less dependencies, or could be depending on a new file that was just
-#     created on the new release and for obvious reasons we wouldn't have it on our
-#     old manifest, all of these issues would cause runtime errors on our system.
-#
-#     - Upgrade both the native and target Python packages to a new version
-#     - Run the create_manifest task for the target Python package as its shown below:
-#
-#     $ bitbake python -c create_manifest
-#
-#     This will automatically replace your manifest file located under the Python directory
-#     with an new one, which contains the new dependencies (if any).
-#
-#     Several things could have gone wrong here, I will try to explain a few:
-#
-#     a) A new file was introduced on this release, e.g. sha3*.so:
-#        The task will check what its needed to import every module, more than one module would
-#        would probably depend on sha3*.so, although only one module should contain it.
-#
-#        After running the task, the new manifest will have the sha3*.so file on more than one
-#        module, you need to manually decide which one of them should get it and delete it from
-#        the others, for example sha3*.so should likely be on ${PN}-crypt.
-#        Once you have deleted from the others you need to run the create_manifest task again,
-#        this will populate the other module's rdepends fields, with ${PN}-crypt and you should be
-#        good to go.
-#
-#     b) The native package wasn't built correctly and its missing a certain module:
-#        As mentioned before, you need to make sure the native package was built with all the modules
-#        because it is used as base to build the manifest file, you need to manually check log.do_compile
-#        since it won't error out the compile function if its only missing a couple of modules.
-#
-#        e.g. missing the _uuid module, log.do_compile would show the following:
-#        Python build finished successfully!
-#        The necessary bits to build these optional modules were not found:
-#        _uuid
-#
-#        What will happen here is that the new manifest would not be aware that the _uuid module exists, so
-#        not only we won't know of any dependencies to it, but also, the _uuid* files will be packaged on
-#        the misc package (which is where any file that doesn't belong anywhere else ends up).
-#
-#        This will eventually cause runtime errors on our system if we don't include the misc package on
-#        on our image, because the _uuid files will be missing.
-#        If we build the _uuid module correctly and run the create_manifest task the _uuid files will be
-#        detected correctly along with its dependencies, and we will get a working manifest.
-#
-#        This is the reason why it is important to make sure we have a fully working native build,
-#        so we can avoid these errors.
-#
-#
-#
-# DO NOT MODIFY THE NEXT LINE!, IT IS USED AS A MARKER FOR THE ACTUAL JSON MANIFEST
-# EOC
-{
-    "tests": {
-        "summary": "Python test suite", 
-        "rdepends": [
-            "core", 
-            "modules"
-        ], 
-        "files": [
-            "${libdir}/python2.7/*/test", 
-            "${libdir}/python2.7/*/tests", 
-            "${libdir}/python2.7/idlelib/idle_test/", 
-            "${libdir}/python2.7/test"
-        ], 
-        "cached": []
-    }, 
-    "2to3": {
-        "summary": "Python automated Python 2 to 3 code translator", 
-        "rdepends": [
-            "core"
-        ], 
-        "files": [
-            "${bindir}/2to3*",
-            "${libdir}/python2.7/lib2to3"
-        ]
-    }, 
-    "argparse": {
-        "summary": "Python command line argument parser", 
-        "rdepends": [
-            "codecs", 
-            "core", 
-            "lang", 
-            "textutils"
-        ], 
-        "files": [
-            "${libdir}/python2.7/argparse.py"
-        ]
-    }, 
-    "audio": {
-        "summary": "Python Audio Handling", 
-        "rdepends": [
-            "core", 
-            "crypt", 
-            "fcntl", 
-            "io", 
-            "math"
-        ], 
-        "files": [
-            "${libdir}/python2.7/audiodev.py", 
-            "${libdir}/python2.7/chunk.py", 
-            "${libdir}/python2.7/lib-dynload/audioop.so", 
-            "${libdir}/python2.7/lib-dynload/ossaudiodev.so", 
-            "${libdir}/python2.7/sndhdr.py", 
-            "${libdir}/python2.7/sunau.py", 
-            "${libdir}/python2.7/sunaudio.py", 
-            "${libdir}/python2.7/toaiff.py", 
-            "${libdir}/python2.7/wave.py"
-        ]
-    }, 
-    "bsddb": {
-        "summary": "Python bindings for the Berkeley Database", 
-        "rdepends": [
-            "core"
-        ], 
-        "files": [
-            "${libdir}/python2.7/bsddb", 
-            "${libdir}/python2.7/lib-dynload/_bsddb.so"
-        ]
-    }, 
-    "codecs": {
-        "summary": "Python codec", 
-        "rdepends": [
-            "core", 
-            "io", 
-            "lang"
-        ], 
-        "files": [
-            "${libdir}/python2.7/gettext.py", 
-            "${libdir}/python2.7/lib-dynload/_codecs_cn.so", 
-            "${libdir}/python2.7/lib-dynload/_codecs_hk.so", 
-            "${libdir}/python2.7/lib-dynload/_codecs_iso2022.so", 
-            "${libdir}/python2.7/lib-dynload/_codecs_jp.so", 
-            "${libdir}/python2.7/lib-dynload/_codecs_kr.so", 
-            "${libdir}/python2.7/lib-dynload/_codecs_tw.so", 
-            "${libdir}/python2.7/lib-dynload/_multibytecodec.so", 
-            "${libdir}/python2.7/lib-dynload/unicodedata.so", 
-            "${libdir}/python2.7/locale.py", 
-            "${libdir}/python2.7/stringprep.py", 
-            "${libdir}/python2.7/xdrlib.py"
-        ]
-    }, 
-    "compile": {
-        "summary": "Python bytecode compilation support", 
-        "rdepends": [
-            "core"
-        ], 
-        "files": [
-            "${libdir}/python2.7/compileall.py", 
-            "${libdir}/python2.7/py_compile.py"
-        ]
-    }, 
-    "compiler": {
-        "summary": "Python compiler support", 
-        "rdepends": [
-            "core", 
-            "io", 
-            "lang"
-        ], 
-        "files": [
-            "${libdir}/python2.7/compiler"
-        ]
-    }, 
-    "compression": {
-        "summary": "Python high-level compression support", 
-        "rdepends": [
-            "core", 
-            "io", 
-            "shell", 
-            "unixadmin", 
-            "zlib"
-        ], 
-        "files": [
-            "${libdir}/python2.7/gzip.py", 
-            "${libdir}/python2.7/lib-dynload/bz2.so", 
-            "${libdir}/python2.7/tarfile.py", 
-            "${libdir}/python2.7/zipfile.py"
-        ]
-    }, 
-    "contextlib": {
-        "summary": "Python utilities for with-statementcontexts.", 
-        "rdepends": [
-            "core", 
-            "lang"
-        ], 
-        "files": [
-            "${libdir}/python2.7/contextlib.py"
-        ]
-    }, 
-    "core": {
-        "summary": "Python interpreter and core modules", 
-        "rdepends": [], 
-        "files": [
-            "${bindir}/python*", 
-            "${includedir}/python2.7/pyconfig*.h", 
-            "${libdir}/python2.7/ConfigParser.py", 
-            "${libdir}/python2.7/UserDict.py", 
-            "${libdir}/python2.7/UserList.py", 
-            "${libdir}/python2.7/UserString.py", 
-            "${libdir}/python2.7/__future__.py", 
-            "${libdir}/python2.7/_abcoll.py", 
-            "${libdir}/python2.7/_sysconfigdata.py", 
-            "${libdir}/python2.7/_weakrefset.py", 
-            "${libdir}/python2.7/abc.py", 
-            "${libdir}/python2.7/ast.py", 
-            "${libdir}/python2.7/atexit.py", 
-            "${libdir}/python2.7/codecs.py", 
-            "${libdir}/python2.7/collections.py", 
-            "${libdir}/python2.7/copy.py", 
-            "${libdir}/python2.7/copy_reg.py", 
-            "${libdir}/python2.7/encodings", 
-            "${libdir}/python2.7/encodings/aliases.py", 
-            "${libdir}/python2.7/encodings/utf_8.py", 
-            "${libdir}/python2.7/genericpath.py", 
-            "${libdir}/python2.7/getopt.py", 
-            "${libdir}/python2.7/heapq.py", 
-            "${libdir}/python2.7/importlib", 
-            "${libdir}/python2.7/keyword.py", 
-            "${libdir}/python2.7/lib-dynload/_collections.so", 
-            "${libdir}/python2.7/lib-dynload/_heapq.so", 
-            "${libdir}/python2.7/lib-dynload/_locale.so", 
-            "${libdir}/python2.7/lib-dynload/_struct.so", 
-            "${libdir}/python2.7/lib-dynload/binascii.so", 
-            "${libdir}/python2.7/lib-dynload/itertools.so", 
-            "${libdir}/python2.7/lib-dynload/operator.so", 
-            "${libdir}/python2.7/lib-dynload/readline.so", 
-            "${libdir}/python2.7/lib-dynload/strop.so", 
-            "${libdir}/python2.7/lib-dynload/time.so", 
-            "${libdir}/python2.7/lib-dynload/xreadlines.so", 
-            "${libdir}/python2.7/linecache.py", 
-            "${libdir}/python2.7/new.py", 
-            "${libdir}/python2.7/os.py", 
-            "${libdir}/python2.7/platform.py", 
-            "${libdir}/python2.7/posixpath.py", 
-            "${libdir}/python2.7/re.py", 
-            "${libdir}/python2.7/rlcompleter.py", 
-            "${libdir}/python2.7/site.py", 
-            "${libdir}/python2.7/sitecustomize.py", 
-            "${libdir}/python2.7/sre_compile.py", 
-            "${libdir}/python2.7/sre_constants.py", 
-            "${libdir}/python2.7/sre_parse.py", 
-            "${libdir}/python2.7/stat.py", 
-            "${libdir}/python2.7/string.py", 
-            "${libdir}/python2.7/struct.py", 
-            "${libdir}/python2.7/sysconfig.py", 
-            "${libdir}/python2.7/traceback.py", 
-            "${libdir}/python2.7/types.py", 
-            "${libdir}/python2.7/warnings.py", 
-            "${libdir}/python2.7/weakref.py"
-        ]
-    }, 
-    "crypt": {
-        "summary": "Python basic cryptographic and hashing support", 
-        "rdepends": [
-            "core"
-        ], 
-        "files": [
-            "${libdir}/python2.7/hashlib.py", 
-            "${libdir}/python2.7/lib-dynload/_hashlib.so", 
-            "${libdir}/python2.7/lib-dynload/crypt.so", 
-            "${libdir}/python2.7/md5.py", 
-            "${libdir}/python2.7/sha.py"
-        ]
-    }, 
-    "ctypes": {
-        "summary": "Python C types support", 
-        "rdepends": [
-            "core"
-        ], 
-        "files": [
-            "${libdir}/python2.7/ctypes", 
-            "${libdir}/python2.7/lib-dynload/_ctypes.so", 
-            "${libdir}/python2.7/lib-dynload/_ctypes_test.so"
-        ]
-    }, 
-    "curses": {
-        "summary": "Python curses support", 
-        "rdepends": [
-            "core"
-        ], 
-        "files": [
-            "${libdir}/python2.7/curses", 
-            "${libdir}/python2.7/lib-dynload/_curses.so", 
-            "${libdir}/python2.7/lib-dynload/_curses_panel.so"
-        ]
-    }, 
-    "datetime": {
-        "summary": "Python calendar and time support", 
-        "rdepends": [
-            "codecs", 
-            "core", 
-            "lang"
-        ], 
-        "files": [
-            "${libdir}/python2.7/_strptime.py", 
-            "${libdir}/python2.7/calendar.py", 
-            "${libdir}/python2.7/lib-dynload/datetime.so"
-        ]
-    }, 
-    "db": {
-        "summary": "Python file-based database support", 
-        "rdepends": [
-            "bsddb", 
-            "core", 
-            "gdbm"
-        ], 
-        "files": [
-            "${libdir}/python2.7/anydbm.py", 
-            "${libdir}/python2.7/dbhash.py", 
-            "${libdir}/python2.7/dumbdbm.py", 
-            "${libdir}/python2.7/lib-dynload/dbm.so", 
-            "${libdir}/python2.7/whichdb.py"
-        ]
-    }, 
-    "debugger": {
-        "summary": "Python debugger", 
-        "rdepends": [
-            "core", 
-            "io", 
-            "lang", 
-            "pprint", 
-            "shell"
-        ], 
-        "files": [
-            "${libdir}/python2.7/bdb.py", 
-            "${libdir}/python2.7/pdb.py"
-        ]
-    }, 
-    "dev": {
-        "files": [
-            "${base_libdir}/*.a", 
-            "${base_libdir}/*.o", 
-            "${datadir}/aclocal", 
-            "${datadir}/pkgconfig", 
-            "${includedir}", 
-            "${libdir}/*.a", 
-            "${libdir}/*.la", 
-            "${libdir}/*.o", 
-            "${libdir}/lib*${SOLIBSDEV}", 
-            "${libdir}/pkgconfig", 
-            "${libdir}/python2.7/config/Makefile"
-        ], 
-        "rdepends": [
-            "core"
-        ], 
-        "summary": "Python development package"
-    }, 
-    "difflib": {
-        "summary": "Python helpers for computing deltas between objects", 
-        "rdepends": [
-            "core", 
-            "lang"
-        ], 
-        "files": [
-            "${libdir}/python2.7/difflib.py"
-        ]
-    }, 
-    "distutils-staticdev": {
-        "files": [
-            "${libdir}/python2.7/config/lib*.a"
-        ], 
-        "rdepends": [
-            "distutils"
-        ], 
-        "summary": "Python distribution utilities (static libraries)"
-    }, 
-    "distutils": {
-        "summary": "Python Distribution Utilities", 
-        "rdepends": [
-            "core"
-        ], 
-        "files": [
-            "${libdir}/python2.7/config", 
-            "${libdir}/python2.7/distutils"
-        ]
-    }, 
-    "doctest": {
-        "summary": "Python framework for running examples in docstrings", 
-        "rdepends": [
-            "core", 
-            "crypt", 
-            "debugger", 
-            "difflib", 
-            "fcntl", 
-            "io", 
-            "lang", 
-            "math", 
-            "pprint", 
-            "shell", 
-            "unittest"
-        ], 
-        "files": [
-            "${libdir}/python2.7/doctest.py"
-        ]
-    }, 
-    "email": {
-        "summary": "Python email support", 
-        "rdepends": [
-            "contextlib", 
-            "core", 
-            "crypt", 
-            "fcntl", 
-            "io", 
-            "lang", 
-            "math", 
-            "netclient", 
-            "pickle", 
-            "subprocess", 
-            "textutils", 
-            "threading"
-        ], 
-        "files": [
-            "${libdir}/python2.7/email", 
-            "${libdir}/python2.7/imaplib.py"
-        ]
-    }, 
-    "fcntl": {
-        "summary": "Python's fcntl interface", 
-        "rdepends": [
-            "core"
-        ], 
-        "files": [
-            "${libdir}/python2.7/lib-dynload/fcntl.so"
-        ]
-    }, 
-    "gdbm": {
-        "summary": "Python GNU database support", 
-        "rdepends": [
-            "core"
-        ], 
-        "files": [
-            "${libdir}/python2.7/lib-dynload/gdbm.so"
-        ]
-    }, 
-    "hotshot": {
-        "summary": "Python hotshot performance profiler", 
-        "rdepends": [
-            "core"
-        ], 
-        "files": [
-            "${libdir}/python2.7/hotshot", 
-            "${libdir}/python2.7/lib-dynload/_hotshot.so"
-        ]
-    }, 
-    "html": {
-        "summary": "Python HTML processing support", 
-        "rdepends": [
-            "core"
-        ], 
-        "files": [
-            "${libdir}/python2.7/HTMLParser.py", 
-            "${libdir}/python2.7/formatter.py", 
-            "${libdir}/python2.7/htmlentitydefs.py", 
-            "${libdir}/python2.7/htmllib.py", 
-            "${libdir}/python2.7/markupbase.py", 
-            "${libdir}/python2.7/sgmllib.py"
-        ]
-    }, 
-    "idle": {
-        "summary": "Python Integrated Development Environment", 
-        "rdepends": [
-            "core"
-        ], 
-        "files": [
-            "${bindir}/idle", 
-            "${libdir}/python2.7/idlelib"
-        ]
-    }, 
-    "image": {
-        "summary": "Python graphical image handling", 
-        "rdepends": [
-            "core"
-        ], 
-        "files": [
-            "${libdir}/python2.7/colorsys.py", 
-            "${libdir}/python2.7/imghdr.py"
-        ]
-    }, 
-    "io": {
-        "summary": "Python low-level I/O", 
-        "rdepends": [
-            "contextlib", 
-            "core", 
-            "crypt", 
-            "fcntl", 
-            "lang", 
-            "math", 
-            "netclient", 
-            "textutils"
-        ], 
-        "files": [
-            "${libdir}/python2.7/StringIO.py", 
-            "${libdir}/python2.7/_pyio.py", 
-            "${libdir}/python2.7/io.py", 
-            "${libdir}/python2.7/lib-dynload/_io.so", 
-            "${libdir}/python2.7/lib-dynload/_socket.so", 
-            "${libdir}/python2.7/lib-dynload/_ssl.so", 
-            "${libdir}/python2.7/lib-dynload/cStringIO.so", 
-            "${libdir}/python2.7/lib-dynload/select.so", 
-            "${libdir}/python2.7/lib-dynload/termios.so", 
-            "${libdir}/python2.7/pipes.py", 
-            "${libdir}/python2.7/socket.py", 
-            "${libdir}/python2.7/ssl.py", 
-            "${libdir}/python2.7/tempfile.py"
-        ]
-    }, 
-    "json": {
-        "summary": "Python JSON support", 
-        "rdepends": [
-            "core"
-        ], 
-        "files": [
-            "${libdir}/python2.7/json", 
-            "${libdir}/python2.7/lib-dynload/_json.so"
-        ]
-    }, 
-    "lang": {
-        "summary": "Python low-level language support", 
-        "rdepends": [
-            "core"
-        ], 
-        "files": [
-            "${libdir}/python2.7/bisect.py", 
-            "${libdir}/python2.7/code.py", 
-            "${libdir}/python2.7/codeop.py", 
-            "${libdir}/python2.7/dis.py", 
-            "${libdir}/python2.7/functools.py", 
-            "${libdir}/python2.7/inspect.py", 
-            "${libdir}/python2.7/lib-dynload/_bisect.so", 
-            "${libdir}/python2.7/lib-dynload/_functools.so", 
-            "${libdir}/python2.7/lib-dynload/array.so", 
-            "${libdir}/python2.7/lib-dynload/parser.so", 
-            "${libdir}/python2.7/opcode.py", 
-            "${libdir}/python2.7/repr.py", 
-            "${libdir}/python2.7/symbol.py", 
-            "${libdir}/python2.7/token.py", 
-            "${libdir}/python2.7/tokenize.py"
-        ]
-    }, 
-    "logging": {
-        "summary": "Python logging support", 
-        "rdepends": [
-            "core", 
-            "io", 
-            "threading"
-        ], 
-        "files": [
-            "${libdir}/python2.7/logging"
-        ]
-    }, 
-    "mailbox": {
-        "summary": "Python mailbox format support", 
-        "rdepends": [
-            "codecs", 
-            "contextlib", 
-            "core", 
-            "crypt", 
-            "datetime", 
-            "email", 
-            "fcntl", 
-            "io", 
-            "lang", 
-            "math", 
-            "mime", 
-            "netclient", 
-            "textutils"
-        ], 
-        "files": [
-            "${libdir}/python2.7/mailbox.py"
-        ]
-    }, 
-    "math": {
-        "summary": "Python math support", 
-        "rdepends": [
-            "core", 
-            "crypt"
-        ], 
-        "files": [
-            "${libdir}/python2.7/lib-dynload/_random.so", 
-            "${libdir}/python2.7/lib-dynload/cmath.so", 
-            "${libdir}/python2.7/lib-dynload/math.so", 
-            "${libdir}/python2.7/random.py", 
-            "${libdir}/python2.7/sets.py"
-        ]
-    }, 
-    "mime": {
-        "summary": "Python MIME handling APIs", 
-        "rdepends": [
-            "contextlib", 
-            "core", 
-            "crypt", 
-            "fcntl", 
-            "io", 
-            "lang", 
-            "math", 
-            "netclient", 
-            "textutils"
-        ], 
-        "files": [
-            "${libdir}/python2.7/MimeWriter.py", 
-            "${libdir}/python2.7/mimetools.py", 
-            "${libdir}/python2.7/mimetypes.py", 
-            "${libdir}/python2.7/quopri.py", 
-            "${libdir}/python2.7/rfc822.py", 
-            "${libdir}/python2.7/uu.py"
-        ]
-    }, 
-    "mmap": {
-        "summary": "Python memory-mapped file support", 
-        "rdepends": [
-            "core"
-        ], 
-        "files": [
-            "${libdir}/python2.7/lib-dynload/mmap.so"
-        ]
-    }, 
-    "modules": {
-        "files": [], 
-        "rdepends": [
-            "2to3", 
-            "argparse", 
-            "audio", 
-            "bsddb", 
-            "codecs", 
-            "compile", 
-            "compiler", 
-            "compression", 
-            "contextlib", 
-            "core", 
-            "crypt", 
-            "ctypes", 
-            "curses", 
-            "datetime", 
-            "db", 
-            "debugger", 
-            "difflib", 
-            "distutils", 
-            "doctest", 
-            "email", 
-            "fcntl", 
-            "gdbm", 
-            "hotshot", 
-            "html", 
-            "idle", 
-            "image", 
-            "io", 
-            "json", 
-            "lang", 
-            "logging", 
-            "mailbox", 
-            "math", 
-            "mime", 
-            "mmap", 
-            "multiprocessing", 
-            "netclient", 
-            "netserver", 
-            "numbers", 
-            "pickle", 
-            "pkgutil", 
-            "plistlib", 
-            "pprint", 
-            "profile", 
-            "pydoc", 
-            "re", 
-            "resource", 
-            "robotparser", 
-            "runpy", 
-            "shell", 
-            "smtpd", 
-            "sqlite3", 
-            "sqlite3", 
-            "stringold", 
-            "subprocess", 
-            "syslog", 
-            "terminal", 
-            "textutils", 
-            "threading", 
-            "tkinter", 
-            "unittest", 
-            "unixadmin", 
-            "xml", 
-            "xmlrpc", 
-            "zlib"
-        ], 
-        "summary": "All Python modules"
-    }, 
-    "multiprocessing": {
-        "summary": "Python multiprocessing support", 
-        "rdepends": [
-            "core", 
-            "fcntl", 
-            "io", 
-            "pickle", 
-            "subprocess", 
-            "threading"
-        ], 
-        "files": [
-            "${libdir}/python2.7/lib-dynload/_multiprocessing.so", 
-            "${libdir}/python2.7/multiprocessing"
-        ]
-    }, 
-    "netclient": {
-        "summary": "Python Internet Protocol clients", 
-        "rdepends": [
-            "codecs", 
-            "contextlib", 
-            "core", 
-            "crypt", 
-            "ctypes", 
-            "datetime", 
-            "email", 
-            "fcntl", 
-            "io", 
-            "lang", 
-            "math", 
-            "mime", 
-            "pickle", 
-            "subprocess", 
-            "textutils", 
-            "threading"
-        ], 
-        "files": [
-            "${libdir}/python2.7/Cookie.py", 
-            "${libdir}/python2.7/_LWPCookieJar.py", 
-            "${libdir}/python2.7/_MozillaCookieJar.py", 
-            "${libdir}/python2.7/base64.py", 
-            "${libdir}/python2.7/cookielib.py", 
-            "${libdir}/python2.7/ftplib.py", 
-            "${libdir}/python2.7/hmac.py", 
-            "${libdir}/python2.7/httplib.py", 
-            "${libdir}/python2.7/nntplib.py", 
-            "${libdir}/python2.7/poplib.py", 
-            "${libdir}/python2.7/smtplib.py", 
-            "${libdir}/python2.7/telnetlib.py", 
-            "${libdir}/python2.7/urllib.py", 
-            "${libdir}/python2.7/urllib2.py", 
-            "${libdir}/python2.7/urlparse.py", 
-            "${libdir}/python2.7/uuid.py"
-        ]
-    }, 
-    "netserver": {
-        "summary": "Python Internet Protocol servers", 
-        "rdepends": [
-            "compression", 
-            "contextlib", 
-            "core", 
-            "crypt", 
-            "fcntl", 
-            "io", 
-            "lang", 
-            "math", 
-            "mime", 
-            "netclient", 
-            "shell", 
-            "textutils", 
-            "threading", 
-            "unixadmin", 
-            "zlib"
-        ], 
-        "files": [
-            "${libdir}/python2.7/BaseHTTPServer.py", 
-            "${libdir}/python2.7/CGIHTTPServer.py", 
-            "${libdir}/python2.7/SimpleHTTPServer.py", 
-            "${libdir}/python2.7/SocketServer.py", 
-            "${libdir}/python2.7/cgi.py"
-        ]
-    }, 
-    "numbers": {
-        "summary": "Python number APIs", 
-        "rdepends": [
-            "codecs", 
-            "core", 
-            "lang", 
-            "math", 
-            "threading"
-        ], 
-        "files": [
-            "${libdir}/python2.7/decimal.py", 
-            "${libdir}/python2.7/fractions.py", 
-            "${libdir}/python2.7/numbers.py"
-        ]
-    }, 
-    "pickle": {
-        "summary": "Python serialisation/persistence support", 
-        "rdepends": [
-            "core", 
-            "io"
-        ], 
-        "files": [
-            "${libdir}/python2.7/lib-dynload/cPickle.so", 
-            "${libdir}/python2.7/pickle.py", 
-            "${libdir}/python2.7/pickletools.py", 
-            "${libdir}/python2.7/shelve.py"
-        ]
-    }, 
-    "pkgutil": {
-        "summary": "Python package extension utility support", 
-        "rdepends": [
-            "core"
-        ], 
-        "files": [
-            "${libdir}/python2.7/pkgutil.py"
-        ]
-    }, 
-    "plistlib": {
-        "summary": "Generate and parse Mac OS X .plist files", 
-        "rdepends": [
-            "core", 
-            "datetime", 
-            "io"
-        ], 
-        "files": [
-            "${libdir}/python2.7/plistlib.py"
-        ]
-    }, 
-    "pprint": {
-        "summary": "Python pretty-print support", 
-        "rdepends": [
-            "core", 
-            "io"
-        ], 
-        "files": [
-            "${libdir}/python2.7/pprint.py"
-        ]
-    }, 
-    "profile": {
-        "summary": "Python basic performance profiling support", 
-        "rdepends": [
-            "codecs", 
-            "core", 
-            "lang", 
-            "resource", 
-            "textutils"
-        ], 
-        "files": [
-            "${libdir}/python2.7/cProfile.py", 
-            "${libdir}/python2.7/lib-dynload/_lsprof.so", 
-            "${libdir}/python2.7/profile.py", 
-            "${libdir}/python2.7/pstats.py"
-        ]
-    }, 
-    "pydoc": {
-        "summary": "Python interactive help support", 
-        "rdepends": [
-            "codecs", 
-            "core", 
-            "lang", 
-            "pkgutil"
-        ], 
-        "files": [
-            "${bindir}/pydoc", 
-            "${libdir}/python2.7/pydoc.py", 
-            "${libdir}/python2.7/pydoc_data"
-        ]
-    }, 
-    "re": {
-        "summary": "Python Regular Expression APIs", 
-        "rdepends": [
-            "core"
-        ], 
-        "files": [
-            "${libdir}/python2.7/sre.py"
-        ]
-    }, 
-    "resource": {
-        "summary": "Python resource control interface", 
-        "rdepends": [
-            "core"
-        ], 
-        "files": [
-            "${libdir}/python2.7/lib-dynload/resource.so"
-        ]
-    }, 
-    "robotparser": {
-        "summary": "Python robots.txt parser", 
-        "rdepends": [
-            "contextlib", 
-            "core", 
-            "io", 
-            "lang", 
-            "netclient", 
-            "textutils"
-        ], 
-        "files": [
-            "${libdir}/python2.7/robotparser.py"
-        ]
-    }, 
-    "runpy": {
-        "summary": "Python helper for locating/executing scripts in module namespace", 
-        "rdepends": [
-            "core", 
-            "pkgutil"
-        ], 
-        "files": [
-            "${libdir}/python2.7/runpy.py"
-        ]
-    }, 
-    "shell": {
-        "summary": "Python shell-like functionality", 
-        "rdepends": [
-            "compression", 
-            "core", 
-            "io", 
-            "unixadmin", 
-            "zlib"
-        ], 
-        "files": [
-            "${libdir}/python2.7/cmd.py", 
-            "${libdir}/python2.7/commands.py", 
-            "${libdir}/python2.7/dircache.py", 
-            "${libdir}/python2.7/fnmatch.py", 
-            "${libdir}/python2.7/glob.py", 
-            "${libdir}/python2.7/popen2.py", 
-            "${libdir}/python2.7/shlex.py", 
-            "${libdir}/python2.7/shutil.py"
-        ]
-    }, 
-    "smtpd": {
-        "summary": "Python Simple Mail Transport Daemon", 
-        "rdepends": [
-            "core", 
-            "fcntl", 
-            "io", 
-            "lang"
-        ], 
-        "files": [
-            "${bindir}/smtpd.py", 
-            "${libdir}/python2.7/asynchat.py", 
-            "${libdir}/python2.7/asyncore.py", 
-            "${libdir}/python2.7/smtpd.py"
-        ]
-    }, 
-    "sqlite3": {
-        "summary": "Python Sqlite3 database support", 
-        "rdepends": [
-            "core", 
-            "datetime"
-        ], 
-        "files": [
-            "${libdir}/python2.7/lib-dynload/_sqlite3.so", 
-            "${libdir}/python2.7/sqlite3"
-        ]
-    }, 
-    "stringold": {
-        "summary": "Python string APIs [deprecated]", 
-        "rdepends": [
-            "core"
-        ], 
-        "files": [
-            "${libdir}/python2.7/stringold.py"
-        ]
-    }, 
-    "subprocess": {
-        "summary": "Python subprocess support", 
-        "rdepends": [
-            "core", 
-            "fcntl", 
-            "io", 
-            "pickle", 
-            "threading"
-        ], 
-        "files": [
-            "${libdir}/python2.7/subprocess.py"
-        ]
-    }, 
-    "syslog": {
-        "summary": "Python syslog interface", 
-        "rdepends": [
-            "core"
-        ], 
-        "files": [
-            "${libdir}/python2.7/lib-dynload/syslog.so"
-        ]
-    }, 
-    "terminal": {
-        "summary": "Python terminal controlling support", 
-        "rdepends": [
-            "core", 
-            "io"
-        ], 
-        "files": [
-            "${libdir}/python2.7/pty.py", 
-            "${libdir}/python2.7/tty.py"
-        ]
-    }, 
-    "textutils": {
-        "summary": "Python option parsin", 
-        "rdepends": [
-            "codecs", 
-            "core", 
-            "io", 
-            "lang"
-        ], 
-        "files": [
-            "${libdir}/python2.7/csv.py", 
-            "${libdir}/python2.7/lib-dynload/_csv.so", 
-            "${libdir}/python2.7/optparse.py", 
-            "${libdir}/python2.7/textwrap.py"
-        ]
-    }, 
-    "threading": {
-        "summary": "Python threading & synchronization support", 
-        "rdepends": [
-            "core"
-        ], 
-        "files": [
-            "${libdir}/python2.7/Queue.py", 
-            "${libdir}/python2.7/_threading_local.py", 
-            "${libdir}/python2.7/dummy_thread.py", 
-            "${libdir}/python2.7/dummy_threading.py", 
-            "${libdir}/python2.7/mutex.py", 
-            "${libdir}/python2.7/threading.py"
-        ]
-    }, 
-    "tkinter": {
-        "summary": "Python Tcl/Tk bindings", 
-        "rdepends": [
-            "core"
-        ], 
-        "files": [
-            "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_tkinter.so",
-            "${libdir}/python2.7/lib-tk"
-        ]
-    }, 
-    "unittest": {
-        "summary": "Python unit testing framework", 
-        "rdepends": [
-            "core", 
-            "difflib", 
-            "io", 
-            "lang", 
-            "pprint", 
-            "shell"
-        ], 
-        "files": [
-            "${libdir}/python2.7/unittest"
-        ]
-    }, 
-    "unixadmin": {
-        "summary": "Python Unix administration support", 
-        "rdepends": [
-            "core", 
-            "io"
-        ], 
-        "files": [
-            "${libdir}/python2.7/getpass.py", 
-            "${libdir}/python2.7/lib-dynload/grp.so", 
-            "${libdir}/python2.7/lib-dynload/nis.so"
-        ]
-    }, 
-    "xml": {
-        "summary": "Python basic XML support", 
-        "rdepends": [
-            "core"
-        ], 
-        "files": [
-            "${libdir}/python2.7/lib-dynload/_elementtree.so", 
-            "${libdir}/python2.7/lib-dynload/pyexpat.so", 
-            "${libdir}/python2.7/xml"
-        ]
-    }, 
-    "xmlrpc": {
-        "summary": "Python XML-RPC support", 
-        "rdepends": [
-            "codecs", 
-            "compression", 
-            "contextlib", 
-            "core", 
-            "crypt", 
-            "datetime", 
-            "fcntl", 
-            "io", 
-            "lang", 
-            "math", 
-            "mime", 
-            "netclient", 
-            "netserver", 
-            "pkgutil", 
-            "pydoc", 
-            "textutils", 
-            "threading", 
-            "xml", 
-            "zlib"
-        ], 
-        "files": [
-            "${libdir}/python2.7/DocXMLRPCServer.py", 
-            "${libdir}/python2.7/SimpleXMLRPCServer.py", 
-            "${libdir}/python2.7/xmlrpclib.py"
-        ]
-    }, 
-    "zlib": {
-        "summary": "Python zlib compression support", 
-        "rdepends": [
-            "core"
-        ], 
-        "files": [
-            "${libdir}/python2.7/lib-dynload/zlib.so"
-        ]
-    }
-}
diff --git a/poky/meta/recipes-devtools/python/python/run-ptest b/poky/meta/recipes-devtools/python/python/run-ptest
deleted file mode 100644
index c7002a4..0000000
--- a/poky/meta/recipes-devtools/python/python/run-ptest
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/bin/sh
-
-python -mtest -W | sed -u -e '/\.\.\. ok/ s/^/PASS: /g' -e '/\.\.\. [ERROR|FAIL]/ s/^/FAIL: /g' -e '/\.\.\. skipped/ s/^/SKIP: /g' -e 's/ \.\.\. ok//g' -e 's/ \.\.\. ERROR//g' -e 's/ \.\.\. FAIL//g' -e 's/ \.\.\. skipped//g'
diff --git a/poky/meta/recipes-devtools/python/python/search_db_h_in_inc_dirs_and_avoid_warning.patch b/poky/meta/recipes-devtools/python/python/search_db_h_in_inc_dirs_and_avoid_warning.patch
deleted file mode 100644
index dacb552..0000000
--- a/poky/meta/recipes-devtools/python/python/search_db_h_in_inc_dirs_and_avoid_warning.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-python should search for db.h in inc_dirs and not in a hardcoded path.
-If db.h is found but HASHVERSION is not 2 we avoid a warning by not 
-adding this module to missing variable.
-
-Upstream-Status: Inappropriate [distribution]
-
-Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
-
-
-diff --git a/setup.py b/setup.py
-index b887808..ae51607 100644
---- a/setup.py
-+++ b/setup.py
-@@ -1237,6 +1237,8 @@ class PyBuildExt(build_ext):
-         # the more recent berkeleydb's db.h file first in the include path
-         # when attempting to compile and it will fail.
-         f = "/usr/include/db.h"
-+        if len(inc_dirs) != 0:
-+            f = os.path.join(inc_dirs[0], "db.h")
- 
-         if host_platform == 'darwin':
-             if is_macosx_sdk_path(f):
-@@ -1257,8 +1259,10 @@ class PyBuildExt(build_ext):
-                                           libraries=libraries))
-                 else:
-                     exts.append(Extension('bsddb185', ['bsddbmodule.c']))
--            else:
--                missing.append('bsddb185')
-+            # If a newer version is detected don't report an useless
-+            # warning
-+            #else:
-+            #    missing.append('bsddb185')
-         else:
-             missing.append('bsddb185')
- 
diff --git a/poky/meta/recipes-devtools/python/python/setup_py_skip_cross_import_check.patch b/poky/meta/recipes-devtools/python/python/setup_py_skip_cross_import_check.patch
deleted file mode 100644
index 6ccdb94..0000000
--- a/poky/meta/recipes-devtools/python/python/setup_py_skip_cross_import_check.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-This patch skips over the 'import check' setup.py does when building
-extensions.  This generally won't work when cross-compiling.
-
-Upstream-Status: Inappropriate [embedded-specific]
-
-Signed-off-by: Tom Zanussi <tom.zanussi@intel.com>
-
-Index: Python-2.7.2/setup.py
-===================================================================
---- Python-2.7.2.orig/setup.py	2011-11-04 16:46:34.553796410 -0500
-+++ Python-2.7.2/setup.py	2011-11-04 16:59:49.692802313 -0500
-@@ -287,6 +287,15 @@
-                           (ext.name, sys.exc_info()[1]))
-             self.failed.append(ext.name)
-             return
-+
-+        # If we're cross-compiling, we want to skip the import check
-+        # i.e. we shouldn't be dynamically loading target shared libs
-+        if os.environ.get('CROSS_COMPILE') is not None:
-+            self.announce(
-+                'WARNING: skipping import check for cross-compiled "%s"' %
-+                ext.name)
-+            return
-+
-         # Workaround for Mac OS X: The Carbon-based modules cannot be
-         # reliably imported into a command-line Python
-         if 'Carbon' in ext.extra_link_args:
diff --git a/poky/meta/recipes-devtools/python/python/setuptweaks.patch b/poky/meta/recipes-devtools/python/python/setuptweaks.patch
deleted file mode 100644
index 3a91b19..0000000
--- a/poky/meta/recipes-devtools/python/python/setuptweaks.patch
+++ /dev/null
@@ -1,57 +0,0 @@
-This patch removes various ways native system options can pass into the python 
-compilation and somehow break C modules.
-
-Upstream-Status: Inappropriate [OE Specific]
-
-RP 2012/04/23
-
-Index: Python-2.7.2/setup.py
-===================================================================
---- Python-2.7.2.orig/setup.py	2012-04-23 20:03:47.295582553 +0000
-+++ Python-2.7.2/setup.py	2012-04-23 20:03:15.000000000 +0000
-@@ -231,7 +231,13 @@
-         # compilers
-         if compiler is not None:
-             (ccshared,cflags) = sysconfig.get_config_vars('CCSHARED','CFLAGS')
--            args['compiler_so'] = compiler + ' ' + ccshared + ' ' + cflags
-+            # Need to filter out -isysroot from the flags. Ideally should 
-+            # figure out target flags here.
-+            flags = []
-+            for f in cflags.split():
-+                if not f.startswith("-isystem"):
-+                    flags.append(f)
-+            args['compiler_so'] = compiler + ' ' + ccshared + ' ' + ' '.join(flags)
-         self.compiler.set_executables(**args)
- 
-         build_ext.build_extensions(self)
-@@ -393,7 +399,6 @@
-         # into configure and stored in the Makefile (issue found on OS X 10.3).
-         for env_var, arg_name, dir_list in (
-                 ('LDFLAGS', '-R', self.compiler.runtime_library_dirs),
--                ('LDFLAGS', '-L', self.compiler.library_dirs),
-                 ('CPPFLAGS', '-I', self.compiler.include_dirs)):
-             env_val = sysconfig.get_config_var(env_var)
-             if env_val:
-@@ -419,16 +424,16 @@
-                     for directory in reversed(options.dirs):
-                         add_dir_to_list(dir_list, directory)
- 
--        if os.path.normpath(sys.prefix) != '/usr' \
--                and not sysconfig.get_config_var('PYTHONFRAMEWORK'):
-+#        if os.path.normpath(sys.prefix) != '/usr' \
-+#                and not sysconfig.get_config_var('PYTHONFRAMEWORK'):
-             # OSX note: Don't add LIBDIR and INCLUDEDIR to building a framework
-             # (PYTHONFRAMEWORK is set) to avoid # linking problems when
-             # building a framework with different architectures than
-             # the one that is currently installed (issue #7473)
--            add_dir_to_list(self.compiler.library_dirs,
--                            sysconfig.get_config_var("LIBDIR"))
--            add_dir_to_list(self.compiler.include_dirs,
--                            sysconfig.get_config_var("INCLUDEDIR"))
-+#            add_dir_to_list(self.compiler.library_dirs,
-+#                            sysconfig.get_config_var("LIBDIR"))
-+#            add_dir_to_list(self.compiler.include_dirs,
-+#                            sysconfig.get_config_var("INCLUDEDIR"))
- 
-         try:
-             have_unicode = unicode
diff --git a/poky/meta/recipes-devtools/python/python/sitecustomize.py b/poky/meta/recipes-devtools/python/python/sitecustomize.py
deleted file mode 100644
index 4c8b5e2..0000000
--- a/poky/meta/recipes-devtools/python/python/sitecustomize.py
+++ /dev/null
@@ -1,37 +0,0 @@
-# OpenEmbedded sitecustomize.py (C) 2002-2008 Michael 'Mickey' Lauer <mlauer@vanille-media.de>
-# GPLv2 or later
-# Version: 20081123
-# Features:
-# * set proper default encoding
-# * enable readline completion in the interactive interpreter
-# * load command line history on startup
-# * save command line history on exit 
-
-import os
-
-def __exithandler():
-    try:
-        readline.write_history_file( "%s/.python-history" % os.getenv( "HOME", "/tmp" ) )
-    except IOError:
-        pass
-
-def __registerExitHandler():
-    import atexit
-    atexit.register( __exithandler )
-
-def __enableReadlineSupport():
-    readline.set_history_length( 1000 )
-    readline.parse_and_bind( "tab: complete" )
-    try:
-        readline.read_history_file( "%s/.python-history" % os.getenv( "HOME", "/tmp" ) )
-    except IOError:
-        pass
-
-import sys
-try:
-    import rlcompleter, readline
-except ImportError:
-    pass
-else:
-    __registerExitHandler()
-    __enableReadlineSupport()
diff --git a/poky/meta/recipes-devtools/python/python/support_SOURCE_DATE_EPOCH_in_py_compile_2.7.patch b/poky/meta/recipes-devtools/python/python/support_SOURCE_DATE_EPOCH_in_py_compile_2.7.patch
deleted file mode 100644
index 1265179..0000000
--- a/poky/meta/recipes-devtools/python/python/support_SOURCE_DATE_EPOCH_in_py_compile_2.7.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-The compiled .pyc files contain time stamp corresponding to the compile time.
-This prevents binary reproducibility. This patch allows to achieve binary
-reproducibility by overriding the build time stamp by the value 
-exported via SOURCE_DATE_EPOCH. 
-
-Patch by Bernhard M. Wiedemann
-
-Upstream-Status: Backport
-
-Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
-
-Fri Feb 24 17:08:25 UTC 2017 - bwiedemann@suse.com
-
-- Add reproducible.patch to allow reproducible builds of various
-  python packages like python-amqp
-  Upstream: https://github.com/python/cpython/pull/296
-
-
-@@ -0,0 +1,15 @@
-Index: Python-2.7.13/Lib/py_compile.py
-===================================================================
---- Python-2.7.13.orig/Lib/py_compile.py
-+++ Python-2.7.13/Lib/py_compile.py
-@@ -108,6 +108,10 @@ def compile(file, cfile=None, dfile=None
-             timestamp = long(os.fstat(f.fileno()).st_mtime)
-         except AttributeError:
-             timestamp = long(os.stat(file).st_mtime)
-+        sde = os.environ.get('SOURCE_DATE_EPOCH')
-+        if sde and timestamp > int(sde):
-+            timestamp = int(sde)
-+            os.utime(file, (timestamp, timestamp))
-         codestring = f.read()
-     try:
-         codeobject = __builtin__.compile(codestring, dfile or file,'exec')
diff --git a/poky/meta/recipes-devtools/python/python/use_sysroot_ncurses_instead_of_host.patch b/poky/meta/recipes-devtools/python/python/use_sysroot_ncurses_instead_of_host.patch
deleted file mode 100644
index fb4a3bc..0000000
--- a/poky/meta/recipes-devtools/python/python/use_sysroot_ncurses_instead_of_host.patch
+++ /dev/null
@@ -1,21 +0,0 @@
-Python tries to use ncursesw from the host,
-if it is not found causes an error on configure,
-we should use ncursesw from sysroot instead
-
-Upstream-Status: Pending
-
-Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com>
-
-Index: Python-2.7.9/configure.ac
-===================================================================
---- Python-2.7.9.orig/configure.ac
-+++ Python-2.7.9/configure.ac
-@@ -4311,7 +4311,7 @@ fi
- 
- # first curses configure check
- ac_save_cppflags="$CPPFLAGS"
--CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
-+CPPFLAGS="$CPPFLAGS -I=/usr/include/ncursesw"
- 
- AC_CHECK_HEADERS(curses.h ncurses.h)
- 
diff --git a/poky/meta/recipes-devtools/python/python3-cython_0.29.16.bb b/poky/meta/recipes-devtools/python/python3-cython_0.29.16.bb
new file mode 100644
index 0000000..2ce6bdb
--- /dev/null
+++ b/poky/meta/recipes-devtools/python/python3-cython_0.29.16.bb
@@ -0,0 +1,18 @@
+inherit setuptools3
+require python-cython.inc
+
+RDEPENDS_${PN} += "\
+    python3-setuptools \
+"
+
+# running build_ext a second time during install fails, because Python
+# would then attempt to import cythonized modules built for the target
+# architecture.
+DISTUTILS_INSTALL_ARGS += "--skip-build"
+
+do_install_append() {
+    # rename scripts that would conflict with the Python 2 build of Cython
+    mv ${D}${bindir}/cython ${D}${bindir}/cython3
+    mv ${D}${bindir}/cythonize ${D}${bindir}/cythonize3
+    mv ${D}${bindir}/cygdb ${D}${bindir}/cygdb3
+}
diff --git a/poky/meta/recipes-devtools/python/python3-dbus_1.2.12.bb b/poky/meta/recipes-devtools/python/python3-dbus_1.2.16.bb
similarity index 85%
rename from poky/meta/recipes-devtools/python/python3-dbus_1.2.12.bb
rename to poky/meta/recipes-devtools/python/python3-dbus_1.2.16.bb
index d005dc4..e1700fa 100644
--- a/poky/meta/recipes-devtools/python/python3-dbus_1.2.12.bb
+++ b/poky/meta/recipes-devtools/python/python3-dbus_1.2.16.bb
@@ -7,8 +7,8 @@
 
 SRC_URI = "http://dbus.freedesktop.org/releases/dbus-python/dbus-python-${PV}.tar.gz"
 
-SRC_URI[md5sum] = "428b7a9e7e2d154a7ceb3e13536283e4"
-SRC_URI[sha256sum] = "cdd4de2c4f5e58f287b12013ed7b41dee81d503c8d0d2397c5bd2fb01badf260"
+SRC_URI[md5sum] = "51a45c973d82bedff033a4b57d69d5d8"
+SRC_URI[sha256sum] = "11238f1d86c995d8aed2e22f04a1e3779f0d70e587caffeab4857f3c662ed5a4"
 
 S = "${WORKDIR}/dbus-python-${PV}"
 
diff --git a/poky/meta/recipes-devtools/python/python3-docutils_0.15.bb b/poky/meta/recipes-devtools/python/python3-docutils_0.16.bb
similarity index 60%
rename from poky/meta/recipes-devtools/python/python3-docutils_0.15.bb
rename to poky/meta/recipes-devtools/python/python3-docutils_0.16.bb
index f5c3f5d..50547a1 100644
--- a/poky/meta/recipes-devtools/python/python3-docutils_0.15.bb
+++ b/poky/meta/recipes-devtools/python/python3-docutils_0.16.bb
@@ -2,13 +2,13 @@
 HOMEPAGE = "http://docutils.sourceforge.net"
 SECTION = "devel/python"
 LICENSE = "PSF & BSD-2-Clause & GPLv3"
-LIC_FILES_CHKSUM = "file://COPYING.txt;md5=35a23d42b615470583563132872c97d6"
+LIC_FILES_CHKSUM = "file://COPYING.txt;md5=7a4646907ab9083c826280b19e103106"
 
 DEPENDS = "python3"
 
 SRC_URI = "${SOURCEFORGE_MIRROR}/docutils/docutils-${PV}.tar.gz"
-SRC_URI[md5sum] = "f51729f19e70a9dc4837433193a5e798"
-SRC_URI[sha256sum] = "c35e87e985f70106f6f97e050f3bed990641e0e104566134b9cd23849a460e96"
+SRC_URI[md5sum] = "9ccb6f332e23360f964de72c8ea5f0ed"
+SRC_URI[sha256sum] = "7d4e999cca74a52611773a42912088078363a30912e8822f7a3d38043b767573"
 
 S = "${WORKDIR}/docutils-${PV}"
 
diff --git a/poky/meta/recipes-devtools/python/python3-git_3.0.2.bb b/poky/meta/recipes-devtools/python/python3-git_3.0.5.bb
similarity index 87%
rename from poky/meta/recipes-devtools/python/python3-git_3.0.2.bb
rename to poky/meta/recipes-devtools/python/python3-git_3.0.5.bb
index 9dd753d..36313ef 100644
--- a/poky/meta/recipes-devtools/python/python3-git_3.0.2.bb
+++ b/poky/meta/recipes-devtools/python/python3-git_3.0.5.bb
@@ -12,8 +12,8 @@
 
 inherit pypi setuptools3
 
-SRC_URI[md5sum] = "ccec14a5c9f18702406122983d80032c"
-SRC_URI[sha256sum] = "d2f4945f8260f6981d724f5957bc076398ada55cb5d25aaee10108bcdc894100"
+SRC_URI[md5sum] = "7555ad89a22f663c25cced5f623bdef0"
+SRC_URI[sha256sum] = "9c2398ffc3dcb3c40b27324b316f08a4f93ad646d5a6328cafbb871aa79f5e42"
 
 DEPENDS += " ${PYTHON_PN}-gitdb"
 
diff --git a/poky/meta/recipes-devtools/python/python3-gitdb_2.0.5.bb b/poky/meta/recipes-devtools/python/python3-gitdb_2.0.6.bb
similarity index 97%
rename from poky/meta/recipes-devtools/python/python3-gitdb_2.0.5.bb
rename to poky/meta/recipes-devtools/python/python3-gitdb_2.0.6.bb
index fe15832..2dcd9c8 100644
--- a/poky/meta/recipes-devtools/python/python3-gitdb_2.0.5.bb
+++ b/poky/meta/recipes-devtools/python/python3-gitdb_2.0.6.bb
@@ -1,2 +1,3 @@
 inherit setuptools3
 require python-gitdb.inc
+
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
new file mode 100644
index 0000000..4983ae5
--- /dev/null
+++ b/poky/meta/recipes-devtools/python/python3-libarchive-c_2.9.bb
@@ -0,0 +1,17 @@
+SUMMARY = "Python interface to libarchive"
+DESCRIPTION = "A Python interface to libarchive. It uses the standard ctypes module to \
+    dynamically load and access the C library."
+HOMEPAGE = "https://github.com/Changaco/python-libarchive-c"
+LICENSE = "CC0-1.0"
+LIC_FILES_CHKSUM = "file://LICENSE.md;md5=bcab380227a83bc147350b40a81e6ffc"
+
+PYPI_PACKAGE = "libarchive-c"
+
+inherit pypi setuptools3
+
+SRC_URI[md5sum] = "083bd2cb0043c1e22a52cb9a05e31532"
+SRC_URI[sha256sum] = "9919344cec203f5db6596a29b5bc26b07ba9662925a05e24980b84709232ef60"
+
+RDEPENDS_${PN} += "libarchive"
+
+BBCLASSEXTEND = "native"
diff --git a/poky/meta/recipes-devtools/python/python3-magic_0.4.15.bb b/poky/meta/recipes-devtools/python/python3-magic_0.4.15.bb
new file mode 100644
index 0000000..698016b
--- /dev/null
+++ b/poky/meta/recipes-devtools/python/python3-magic_0.4.15.bb
@@ -0,0 +1,19 @@
+SUMMARY = "File type identification using libmagic"
+DESCRIPTION = "This module uses ctypes to access the libmagic file type \
+    identification library. It makes use of the local magic database and supports \
+    both textual and MIME-type output."
+HOMEPAGE = "http://github.com/ahupp/python-magic"
+
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=16a934f165e8c3245f241e77d401bb88"
+
+PYPI_PACKAGE = "python-magic"
+
+inherit pypi setuptools3
+
+SRC_URI[md5sum] = "e384c95a47218f66c6501cd6dd45ff59"
+SRC_URI[sha256sum] = "f3765c0f582d2dfc72c15f3b5a82aecfae9498bd29ca840d72f37d7bd38bfcd5"
+
+RDEPENDS_${PN} += "file"
+
+BBCLASSEXTEND = "native"
diff --git a/poky/meta/recipes-devtools/python/python3-mako_1.1.0.bb b/poky/meta/recipes-devtools/python/python3-mako_1.1.1.bb
similarity index 63%
rename from poky/meta/recipes-devtools/python/python3-mako_1.1.0.bb
rename to poky/meta/recipes-devtools/python/python3-mako_1.1.1.bb
index b139e5a..bc38009 100644
--- a/poky/meta/recipes-devtools/python/python3-mako_1.1.0.bb
+++ b/poky/meta/recipes-devtools/python/python3-mako_1.1.1.bb
@@ -2,14 +2,14 @@
 HOMEPAGE = "http://www.makotemplates.org/"
 SECTION = "devel/python"
 LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=df7e6c7c82990acf0228a55e00d29bc9"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=943eb67718222db21d44a4ef1836675f"
 
 PYPI_PACKAGE = "Mako"
 
 inherit pypi setuptools3
 
-SRC_URI[md5sum] = "6c3f2da0b74af529a4c4a537d0848bf2"
-SRC_URI[sha256sum] = "a36919599a9b7dc5d86a7a8988f23a9a3a3d083070023bab23d64f7f1d1e0a4b"
+SRC_URI[md5sum] = "2660a4916f2f63456e6885c727b7cd2f"
+SRC_URI[sha256sum] = "2984a6733e1d472796ceef37ad48c26f4a984bb18119bb2dbc37a44d8f6e75a4"
 
 RDEPENDS_${PN} = "${PYTHON_PN}-html \
                   ${PYTHON_PN}-netclient \
diff --git a/poky/meta/recipes-devtools/python/python3-pbr/0001-change-shebang-to-python3.patch b/poky/meta/recipes-devtools/python/python3-pbr/0001-change-shebang-to-python3.patch
new file mode 100644
index 0000000..688da6b
--- /dev/null
+++ b/poky/meta/recipes-devtools/python/python3-pbr/0001-change-shebang-to-python3.patch
@@ -0,0 +1,42 @@
+From 09bd8368bf0d5385663a10eeb890131481681bdd Mon Sep 17 00:00:00 2001
+From: Changqing Li <changqing.li@windriver.com>
+Date: Thu, 23 Apr 2020 09:28:58 +0000
+Subject: [PATCH] change shebang to python3
+
+Upstream-Status: Pending
+
+Signed-off-by: Changqing Li <changqing.li@windriver.com>
+---
+ pbr/tests/test_integration.py | 2 +-
+ pbr/tests/test_packaging.py   | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/pbr/tests/test_integration.py b/pbr/tests/test_integration.py
+index 8e96f21..b07cbe3 100644
+--- a/pbr/tests/test_integration.py
++++ b/pbr/tests/test_integration.py
+@@ -150,7 +150,7 @@ class TestInstallWithoutPbr(base.BaseTestCase):
+         pkgs = {
+             'pkgTest': {
+                 'setup.py': textwrap.dedent("""\
+-                    #!/usr/bin/env python
++                    #!/usr/bin/env python3
+                     import setuptools
+                     setuptools.setup(
+                         name = 'pkgTest',
+diff --git a/pbr/tests/test_packaging.py b/pbr/tests/test_packaging.py
+index 07be547..f6a9412 100644
+--- a/pbr/tests/test_packaging.py
++++ b/pbr/tests/test_packaging.py
+@@ -206,7 +206,7 @@ class CreatePackages(fixtures.Fixture):
+ 
+     defaults = {
+         'setup.py': textwrap.dedent(six.u("""\
+-            #!/usr/bin/env python
++            #!/usr/bin/env python3
+             import setuptools
+             setuptools.setup(
+                 setup_requires=['pbr'],
+-- 
+2.24.1
+
diff --git a/poky/meta/recipes-devtools/python/python3-pbr_5.4.3.bb b/poky/meta/recipes-devtools/python/python3-pbr_5.4.3.bb
deleted file mode 100644
index e7835e7..0000000
--- a/poky/meta/recipes-devtools/python/python3-pbr_5.4.3.bb
+++ /dev/null
@@ -1,5 +0,0 @@
-inherit setuptools3
-require python-pbr.inc
-
-SRC_URI[md5sum] = "477d2aa285ad97250a172b199f4060b7"
-SRC_URI[sha256sum] = "2c8e420cd4ed4cec4e7999ee47409e876af575d4c35a45840d59e8b5f3155ab8"
diff --git a/poky/meta/recipes-devtools/python/python3-pbr_5.4.4.bb b/poky/meta/recipes-devtools/python/python3-pbr_5.4.4.bb
new file mode 100644
index 0000000..6f335ea
--- /dev/null
+++ b/poky/meta/recipes-devtools/python/python3-pbr_5.4.4.bb
@@ -0,0 +1,5 @@
+inherit setuptools3
+require python-pbr.inc
+
+SRC_URI[md5sum] = "65cdc32e1a1ff56d481fc15aa8caf988"
+SRC_URI[sha256sum] = "139d2625547dbfa5fb0b81daebb39601c478c21956dc57e2e07b74450a8c506b"
diff --git a/poky/meta/recipes-devtools/python/python3-pip/0001-change-shebang-to-python3.patch b/poky/meta/recipes-devtools/python/python3-pip/0001-change-shebang-to-python3.patch
new file mode 100644
index 0000000..00cffe1
--- /dev/null
+++ b/poky/meta/recipes-devtools/python/python3-pip/0001-change-shebang-to-python3.patch
@@ -0,0 +1,60 @@
+From e7a00e9b5104ae2fbcea32a35c85760b77fae7e5 Mon Sep 17 00:00:00 2001
+From: Changqing Li <changqing.li@windriver.com>
+Date: Thu, 23 Apr 2020 09:42:10 +0000
+Subject: [PATCH] change shebang to python3
+
+Upstream-Status: Pending
+
+pip will drop support of python2 from 21.0
+
+Signed-off-by: Changqing Li <changqing.li@windriver.com>
+---
+ src/pip/_internal/__init__.py             | 2 +-
+ src/pip/_vendor/appdirs.py                | 2 +-
+ src/pip/_vendor/chardet/cli/chardetect.py | 2 +-
+ src/pip/_vendor/requests/certs.py         | 2 +-
+ 4 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/src/pip/_internal/__init__.py b/src/pip/_internal/__init__.py
+index 3aa8a46..e1ad179 100755
+--- a/src/pip/_internal/__init__.py
++++ b/src/pip/_internal/__init__.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ import pip._internal.utils.inject_securetransport  # noqa
+ from pip._internal.utils.typing import MYPY_CHECK_RUNNING
+ 
+diff --git a/src/pip/_vendor/appdirs.py b/src/pip/_vendor/appdirs.py
+index 3a52b75..ad3f81d 100644
+--- a/src/pip/_vendor/appdirs.py
++++ b/src/pip/_vendor/appdirs.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ # -*- coding: utf-8 -*-
+ # Copyright (c) 2005-2010 ActiveState Software Inc.
+ # Copyright (c) 2013 Eddy Petrișor
+diff --git a/src/pip/_vendor/chardet/cli/chardetect.py b/src/pip/_vendor/chardet/cli/chardetect.py
+index c61136b..a497e98 100644
+--- a/src/pip/_vendor/chardet/cli/chardetect.py
++++ b/src/pip/_vendor/chardet/cli/chardetect.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ """
+ Script which takes one or more file paths and reports on their detected
+ encodings
+diff --git a/src/pip/_vendor/requests/certs.py b/src/pip/_vendor/requests/certs.py
+index 06a594e..bfa7839 100644
+--- a/src/pip/_vendor/requests/certs.py
++++ b/src/pip/_vendor/requests/certs.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ # -*- coding: utf-8 -*-
+ 
+ """
+-- 
+2.24.1
+
diff --git a/poky/meta/recipes-devtools/python/python3-pip_19.3.1.bb b/poky/meta/recipes-devtools/python/python3-pip_20.0.2.bb
similarity index 76%
rename from poky/meta/recipes-devtools/python/python3-pip_19.3.1.bb
rename to poky/meta/recipes-devtools/python/python3-pip_20.0.2.bb
index d27e6fc..96973db 100644
--- a/poky/meta/recipes-devtools/python/python3-pip_19.3.1.bb
+++ b/poky/meta/recipes-devtools/python/python3-pip_20.0.2.bb
@@ -6,8 +6,10 @@
 
 DEPENDS += "python3 python3-setuptools-native"
 
-SRC_URI[md5sum] = "1aaaf90fbafc50e7ba1e66ffceb00960"
-SRC_URI[sha256sum] = "21207d76c1031e517668898a6b46a9fb1501c7a4710ef5dfd6a40ad9e6757ea7"
+SRC_URI += "file://0001-change-shebang-to-python3.patch"
+
+SRC_URI[md5sum] = "7d42ba49b809604f0df3d55df1c3fd86"
+SRC_URI[sha256sum] = "7db0c8ea4c7ea51c8049640e8e6e7fde949de672bfa4949920675563a5a6967f"
 
 inherit pypi distutils3
 
diff --git a/poky/meta/recipes-devtools/python/python3-pycairo_1.18.1.bb b/poky/meta/recipes-devtools/python/python3-pycairo_1.19.0.bb
similarity index 76%
rename from poky/meta/recipes-devtools/python/python3-pycairo_1.18.1.bb
rename to poky/meta/recipes-devtools/python/python3-pycairo_1.19.0.bb
index 5aaa01a..8f60834 100644
--- a/poky/meta/recipes-devtools/python/python3-pycairo_1.18.1.bb
+++ b/poky/meta/recipes-devtools/python/python3-pycairo_1.19.0.bb
@@ -3,7 +3,7 @@
 BUGTRACKER = "http://bugs.freedesktop.org"
 SECTION = "python-devel"
 LICENSE = "LGPLv2.1 & MPLv1.1"
-LIC_FILES_CHKSUM = "file://COPYING;md5=f2e071ab72978431b294a0d696327421 \
+LIC_FILES_CHKSUM = "file://COPYING;md5=f3713ca2c28d9312ad718520b6dc3eee \
                     file://COPYING-LGPL-2.1;md5=fad9b3332be894bab9bc501572864b29 \
                     file://COPYING-MPL-1.1;md5=bfe1f75d606912a4111c90743d6c7325"
 
@@ -13,8 +13,8 @@
 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] = "7610da8a40a7bed548991aa3416431d1"
-SRC_URI[sha256sum] = "70172e58b6bad7572a3518c26729b074acdde15e6fee6cbab6d3528ad552b786"
+SRC_URI[md5sum] = "38b84416021640b01250c8f8ec4c52d4"
+SRC_URI[sha256sum] = "4f5ba9374a46c98729dd3727d993f5e17ed0286fd6738ed464fe4efa0612d19c"
 
 S = "${WORKDIR}/pycairo-${PV}"
 
diff --git a/poky/meta/recipes-devtools/python/python3-pygments_2.4.2.bb b/poky/meta/recipes-devtools/python/python3-pygments_2.5.2.bb
similarity index 75%
rename from poky/meta/recipes-devtools/python/python3-pygments_2.4.2.bb
rename to poky/meta/recipes-devtools/python/python3-pygments_2.5.2.bb
index 35c0ac6..474b954 100644
--- a/poky/meta/recipes-devtools/python/python3-pygments_2.4.2.bb
+++ b/poky/meta/recipes-devtools/python/python3-pygments_2.5.2.bb
@@ -5,8 +5,8 @@
 LIC_FILES_CHKSUM = "file://LICENSE;md5=e1d7b7bffbfeaa14083fd2bd3236aea8"
 
 inherit setuptools3
-SRC_URI[md5sum] = "5ecc3fbb2a783e917b369271fc0e6cd1"
-SRC_URI[sha256sum] = "881c4c157e45f30af185c1ffe8d549d48ac9127433f2c380c24b84572ad66297"
+SRC_URI[md5sum] = "465a35559863089d959d783a69f79b9f"
+SRC_URI[sha256sum] = "98c8aa5a9f778fcd1026a17361ddaf7330d1b7c62ae97c3bb0ae73e0b9b6b0fe"
 
 DEPENDS += "\
             ${PYTHON_PN} \
diff --git a/poky/meta/recipes-devtools/python/python3-pyparsing_2.4.7.bb b/poky/meta/recipes-devtools/python/python3-pyparsing_2.4.7.bb
new file mode 100644
index 0000000..d0c3d0b
--- /dev/null
+++ b/poky/meta/recipes-devtools/python/python3-pyparsing_2.4.7.bb
@@ -0,0 +1,3 @@
+inherit setuptools3
+require python-pyparsing.inc
+
diff --git a/poky/meta/recipes-devtools/python/python3-scons-native_3.1.1.bb b/poky/meta/recipes-devtools/python/python3-scons-native_3.1.2.bb
similarity index 79%
rename from poky/meta/recipes-devtools/python/python3-scons-native_3.1.1.bb
rename to poky/meta/recipes-devtools/python/python3-scons-native_3.1.2.bb
index 5cd5956..9e12730 100644
--- a/poky/meta/recipes-devtools/python/python3-scons-native_3.1.1.bb
+++ b/poky/meta/recipes-devtools/python/python3-scons-native_3.1.2.bb
@@ -1,7 +1,6 @@
 require python3-scons_${PV}.bb
 inherit native python3native
-DEPENDS = "python3-native"
-RDEPENDS_${PN} = ""
+DEPENDS = "python3-native python3-setuptools-native"
 
 do_install_append() {
     create_wrapper ${D}${bindir}/scons SCONS_LIB_DIR='${STAGING_DIR_HOST}/${PYTHON_SITEPACKAGES_DIR}' PYTHONNOUSERSITE='1'
diff --git a/poky/meta/recipes-devtools/python/python3-scons_3.1.1.bb b/poky/meta/recipes-devtools/python/python3-scons_3.1.1.bb
deleted file mode 100644
index 0c7aaea..0000000
--- a/poky/meta/recipes-devtools/python/python3-scons_3.1.1.bb
+++ /dev/null
@@ -1,29 +0,0 @@
-SUMMARY = "Software Construction tool (make/autotools replacement)"
-SECTION = "devel/python"
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=37bb53a08e6beaea0c90e7821d731284"
-
-SRC_URI = "${SOURCEFORGE_MIRROR}/scons/scons-${PV}.tar.gz"
-SRC_URI[md5sum] = "35b2a3993313bbedd221d4d5758fd2fd"
-SRC_URI[sha256sum] = "4cea417fdd7499a36f407923d03b4b7000b0f9e8fd7b31b316b9ce7eba9143a5"
-
-S = "${WORKDIR}/scons-${PV}"
-
-UPSTREAM_CHECK_URI = "http://scons.org/pages/download.html"
-UPSTREAM_CHECK_REGEX = "(?P<pver>\d+(\.\d+)+)\.tar"
-
-inherit setuptools3
-
-do_install_prepend() {
-    sed -i -e "1s,#!.*python.*,#!${USRBINPATH}/env python3," ${S}/script/*
-}
-
-RDEPENDS_${PN} = "\
-  python3-core \
-  python3-fcntl \
-  python3-io \
-  python3-json \
-  python3-shell \
-  python3-pickle \
-  python3-pprint \
-  "
diff --git a/poky/meta/recipes-devtools/python/python3-scons_3.1.2.bb b/poky/meta/recipes-devtools/python/python3-scons_3.1.2.bb
new file mode 100644
index 0000000..ce117a9
--- /dev/null
+++ b/poky/meta/recipes-devtools/python/python3-scons_3.1.2.bb
@@ -0,0 +1,33 @@
+SUMMARY = "Software Construction tool (make/autotools replacement)"
+SECTION = "devel/python"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://${WORKDIR}/LICENSE-python3-scons-${PV};md5=e14e1b33428df24a40a782ae142785d0"
+
+# pypi package does not have a valid license file
+SRC_URI += "https://raw.githubusercontent.com/SCons/scons/${PV}/LICENSE;downloadfilename=LICENSE-python3-scons-${PV};name=license"
+
+SRC_URI[md5sum] = "f9c4ad06dcf1427be95472eaf380c81a"
+SRC_URI[sha256sum] = "8aaa483c303efeb678e6f7c776c8444a482f8ddc3ad891f8b6cdd35264da9a1f"
+SRC_URI[license.md5sum] = "e14e1b33428df24a40a782ae142785d0"
+SRC_URI[license.sha256sum] = "72ed889165fb28378cadac14552be4a959f1ebab6b148abb5dd2b49712c3c6f6"
+
+S = "${WORKDIR}/scons-${PV}"
+
+UPSTREAM_CHECK_URI = "http://scons.org/pages/download.html"
+UPSTREAM_CHECK_REGEX = "(?P<pver>\d+(\.\d+)+)\.tar"
+
+inherit pypi setuptools3
+
+do_install_prepend() {
+    sed -i -e "1s,#!.*python.*,#!${USRBINPATH}/env python3," ${S}/script/*
+}
+
+RDEPENDS_${PN}_class-target = "\
+  python3-core \
+  python3-fcntl \
+  python3-io \
+  python3-json \
+  python3-shell \
+  python3-pickle \
+  python3-pprint \
+  "
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
new file mode 100644
index 0000000..33af8da
--- /dev/null
+++ b/poky/meta/recipes-devtools/python/python3-setuptools/0001-change-shebang-to-python3.patch
@@ -0,0 +1,36 @@
+From c39d0896930e25c224cc897660fc8511ccae30c8 Mon Sep 17 00:00:00 2001
+From: Changqing Li <changqing.li@windriver.com>
+Date: Thu, 23 Apr 2020 10:01:12 +0000
+Subject: [PATCH] change shebang to python3
+
+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(-)
+
+diff --git a/pkg_resources/_vendor/appdirs.py b/pkg_resources/_vendor/appdirs.py
+index ae67001..933e398 100644
+--- a/pkg_resources/_vendor/appdirs.py
++++ b/pkg_resources/_vendor/appdirs.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ # -*- 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_41.4.0.bb b/poky/meta/recipes-devtools/python/python3-setuptools_45.2.0.bb
similarity index 100%
rename from poky/meta/recipes-devtools/python/python3-setuptools_41.4.0.bb
rename to poky/meta/recipes-devtools/python/python3-setuptools_45.2.0.bb
diff --git a/poky/meta/recipes-devtools/python/python3-six_1.13.0.bb b/poky/meta/recipes-devtools/python/python3-six_1.13.0.bb
deleted file mode 100644
index 8795313..0000000
--- a/poky/meta/recipes-devtools/python/python3-six_1.13.0.bb
+++ /dev/null
@@ -1,2 +0,0 @@
-inherit setuptools3
-require python-six.inc
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
new file mode 100644
index 0000000..151c366
--- /dev/null
+++ b/poky/meta/recipes-devtools/python/python3-six_1.14.0.bb
@@ -0,0 +1,5 @@
+inherit setuptools3
+require python-six.inc
+
+SRC_URI[md5sum] = "21674588a57e649d1a6d977ec3122140"
+SRC_URI[sha256sum] = "236bdbdce46e6e6a3d61a337c0f8b763ca1e8717c03b369e87a7ec7ce1319c0a"
diff --git a/poky/meta/recipes-devtools/python/python3-testtools/no_traceback2.patch b/poky/meta/recipes-devtools/python/python3-testtools/no_traceback2.patch
new file mode 100644
index 0000000..5945103
--- /dev/null
+++ b/poky/meta/recipes-devtools/python/python3-testtools/no_traceback2.patch
@@ -0,0 +1,23 @@
+traceback2 adds traceback for python2. Rather than depend on traceback2, we're
+python3 only so just use traceback.
+This caused breakage in oe-selftest -j which uses testtools on the autobuilder
+using buildtools-tarball.
+
+Upstream-Status: Inappropriate [Our recipe is python3 specific]
+(Once py2 is EOL upstream probably could/should take this)
+Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
+
+Index: testtools-2.3.0/testtools/content.py
+===================================================================
+--- testtools-2.3.0.orig/testtools/content.py
++++ testtools-2.3.0/testtools/content.py
+@@ -19,8 +19,7 @@ import os
+ import sys
+ 
+ from extras import try_import
+-# To let setup.py work, make this a conditional import.
+-traceback = try_import('traceback2')
++import traceback
+ 
+ from testtools.compat import (
+     _b,
diff --git a/poky/meta/recipes-devtools/python/python3-testtools_2.3.0.bb b/poky/meta/recipes-devtools/python/python3-testtools_2.3.0.bb
index 896ecee..a254b90 100644
--- a/poky/meta/recipes-devtools/python/python3-testtools_2.3.0.bb
+++ b/poky/meta/recipes-devtools/python/python3-testtools_2.3.0.bb
@@ -1,2 +1,4 @@
 inherit setuptools3
 require python-testtools.inc
+
+SRC_URI += "file://no_traceback2.patch"
diff --git a/poky/meta/recipes-devtools/python/python3/0001-Do-not-add-usr-lib-termcap-to-linker-flags-to-avoid-.patch b/poky/meta/recipes-devtools/python/python3/0001-Do-not-add-usr-lib-termcap-to-linker-flags-to-avoid-.patch
index 09f279ba..5959282 100644
--- a/poky/meta/recipes-devtools/python/python3/0001-Do-not-add-usr-lib-termcap-to-linker-flags-to-avoid-.patch
+++ b/poky/meta/recipes-devtools/python/python3/0001-Do-not-add-usr-lib-termcap-to-linker-flags-to-avoid-.patch
@@ -1,4 +1,4 @@
-From 23294c6ba6896115828293fdb7e67b47b38ba675 Mon Sep 17 00:00:00 2001
+From 039c53dd5baddec3359a05be0bff46a3b32bbb84 Mon Sep 17 00:00:00 2001
 From: Alexander Kanavin <alex.kanavin@gmail.com>
 Date: Fri, 25 Jan 2019 19:04:13 +0100
 Subject: [PATCH] Do not add /usr/lib/termcap to linker flags to avoid host
@@ -12,14 +12,14 @@
  1 file changed, 1 deletion(-)
 
 diff --git a/setup.py b/setup.py
-index b4357e3..fbec00d 100644
+index 20d7f35..ab18ff0 100644
 --- a/setup.py
 +++ b/setup.py
-@@ -856,7 +856,6 @@ class PyBuildExt(build_ext):
+@@ -957,7 +957,6 @@ class PyBuildExt(build_ext):
                                                       'termcap'):
                  readline_libs.append('termcap')
-             exts.append( Extension('readline', ['readline.c'],
--                                   library_dirs=['/usr/lib/termcap'],
-                                    extra_link_args=readline_extra_link_args,
-                                    libraries=readline_libs) )
+             self.add(Extension('readline', ['readline.c'],
+-                               library_dirs=['/usr/lib/termcap'],
+                                extra_link_args=readline_extra_link_args,
+                                libraries=readline_libs))
          else:
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
index ea75262..112c979 100644
--- 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
@@ -1,4 +1,4 @@
-From 0fbdad1eaf541a8e92be81f39514cd249b3b0801 Mon Sep 17 00:00:00 2001
+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
@@ -11,13 +11,13 @@
  Include/pythonrun.h  |  2 ++
  Lib/site.py          |  4 ++--
  Makefile.pre.in      |  5 +++--
- Modules/getpath.c    | 18 ++++++++++++------
+ Modules/getpath.c    | 22 ++++++++++++++--------
  Python/getplatform.c | 10 ++++++++++
  Python/sysmodule.c   |  2 ++
- 6 files changed, 31 insertions(+), 10 deletions(-)
+ 6 files changed, 33 insertions(+), 12 deletions(-)
 
 diff --git a/Include/pythonrun.h b/Include/pythonrun.h
-index 6f0c6fc..0a17edd 100644
+index 46091e0..61b2e15 100644
 --- a/Include/pythonrun.h
 +++ b/Include/pythonrun.h
 @@ -7,6 +7,8 @@
@@ -28,12 +28,12 @@
 +
  #ifndef Py_LIMITED_API
  PyAPI_FUNC(int) PyRun_SimpleStringFlags(const char *, PyCompilerFlags *);
- PyAPI_FUNC(int) PyRun_AnyFileFlags(FILE *, const char *, PyCompilerFlags *);
+ PyAPI_FUNC(int) PyRun_AnyFileExFlags(
 diff --git a/Lib/site.py b/Lib/site.py
-index ffd132b..b55f6d8 100644
+index a065ab0..1d720ef 100644
 --- a/Lib/site.py
 +++ b/Lib/site.py
-@@ -334,12 +334,12 @@ def getsitepackages(prefixes=None):
+@@ -335,12 +335,12 @@ def getsitepackages(prefixes=None):
          seen.add(prefix)
  
          if os.sep == '/':
@@ -49,10 +49,10 @@
  
  def addsitepackages(known_paths, prefixes=None):
 diff --git a/Makefile.pre.in b/Makefile.pre.in
-index 6e81b2f..671a20e 100644
+index 65665df..be49140 100644
 --- a/Makefile.pre.in
 +++ b/Makefile.pre.in
-@@ -142,7 +142,7 @@ LIBDIR=		@libdir@
+@@ -143,7 +143,7 @@ LIBDIR=		@libdir@
  MANDIR=		@mandir@
  INCLUDEDIR=	@includedir@
  CONFINCLUDEDIR=	$(exec_prefix)/include
@@ -61,7 +61,7 @@
  ABIFLAGS=	@ABIFLAGS@
  
  # Detailed destination directories
-@@ -768,6 +768,7 @@ Modules/getpath.o: $(srcdir)/Modules/getpath.c Makefile
+@@ -753,6 +753,7 @@ Modules/getpath.o: $(srcdir)/Modules/getpath.c Makefile
  		-DEXEC_PREFIX='"$(exec_prefix)"' \
  		-DVERSION='"$(VERSION)"' \
  		-DVPATH='"$(VPATH)"' \
@@ -69,7 +69,7 @@
  		-o $@ $(srcdir)/Modules/getpath.c
  
  Programs/python.o: $(srcdir)/Programs/python.c
-@@ -856,7 +857,7 @@ regen-opcode:
+@@ -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
@@ -79,72 +79,90 @@
  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 e6a3e8e..0c62af6 100644
+index b727f66..c003e46 100644
 --- a/Modules/getpath.c
 +++ b/Modules/getpath.c
-@@ -123,6 +123,7 @@ typedef struct {
-     wchar_t *exec_prefix;              /* EXEC_PREFIX define */
+@@ -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" */
-     wchar_t argv0_path[MAXPATHLEN+1];
-     wchar_t zip_path[MAXPATHLEN+1];    /* ".../lib/pythonXY.zip" */
  
-@@ -314,7 +315,7 @@ search_for_prefix(const _PyCoreConfig *core_config,
+     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';
          }
--        joinpath(prefix, calculate->lib_python);
-+        joinpath(prefix, calculate->multilib_python);
-         joinpath(prefix, LANDMARK);
-         return 1;
-     }
-@@ -343,7 +344,7 @@ search_for_prefix(const _PyCoreConfig *core_config,
-     copy_absolute(prefix, calculate->argv0_path, MAXPATHLEN+1);
-     do {
-         n = wcslen(prefix);
--        joinpath(prefix, calculate->lib_python);
-+        joinpath(prefix, calculate->multilib_python);
-         joinpath(prefix, LANDMARK);
-         if (ismodule(prefix)) {
-             return 1;
-@@ -355,7 +356,7 @@ search_for_prefix(const _PyCoreConfig *core_config,
-     /* Look at configure's PREFIX */
-     wcsncpy(prefix, calculate->prefix, MAXPATHLEN);
-     prefix[MAXPATHLEN] = L'\0';
--    joinpath(prefix, calculate->lib_python);
-+    joinpath(prefix, calculate->multilib_python);
-     joinpath(prefix, LANDMARK);
-     if (ismodule(prefix)) {
-         return 1;
-@@ -427,7 +428,7 @@ search_for_exec_prefix(const _PyCoreConfig *core_config,
-             wcsncpy(exec_prefix, core_config->home, MAXPATHLEN);
+-        status = joinpath(prefix, calculate->lib_python, prefix_len);
++        status = joinpath(prefix, calculate->multilib_python, prefix_len);
+         if (_PyStatus_EXCEPTION(status)) {
+             return status;
          }
-         exec_prefix[MAXPATHLEN] = L'\0';
--        joinpath(exec_prefix, calculate->lib_python);
-+        joinpath(exec_prefix, calculate->multilib_python);
-         joinpath(exec_prefix, L"lib-dynload");
-         return 1;
-     }
-@@ -464,7 +465,7 @@ search_for_exec_prefix(const _PyCoreConfig *core_config,
-     copy_absolute(exec_prefix, calculate->argv0_path, MAXPATHLEN+1);
+@@ -444,7 +445,7 @@ search_for_prefix(PyCalculatePath *calculate, _PyPathConfig *pathconfig,
      do {
-         n = wcslen(exec_prefix);
--        joinpath(exec_prefix, calculate->lib_python);
-+        joinpath(exec_prefix, calculate->multilib_python);
-         joinpath(exec_prefix, L"lib-dynload");
-         if (isdir(exec_prefix)) {
-             return 1;
-@@ -476,7 +477,7 @@ search_for_exec_prefix(const _PyCoreConfig *core_config,
-     /* Look at configure's EXEC_PREFIX */
-     wcsncpy(exec_prefix, calculate->exec_prefix, MAXPATHLEN);
-     exec_prefix[MAXPATHLEN] = L'\0';
--    joinpath(exec_prefix, calculate->lib_python);
-+    joinpath(exec_prefix, calculate->multilib_python);
-     joinpath(exec_prefix, L"lib-dynload");
-     if (isdir(exec_prefix)) {
-         return 1;
-@@ -871,6 +872,10 @@ calculate_init(PyCalculatePath *calculate,
+         /* 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);
      }
@@ -152,10 +170,10 @@
 +    if (!calculate->multilib_python) {
 +        return DECODE_LOCALE_ERR("EXEC_PREFIX define", len);
 +    }
-     return _Py_INIT_OK();
- }
  
-@@ -882,6 +887,7 @@ calculate_free(PyCalculatePath *calculate)
+     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);
@@ -182,10 +200,10 @@
 +	return LIB;
 +}
 diff --git a/Python/sysmodule.c b/Python/sysmodule.c
-index efe5b29..de77b17 100644
+index 5b0fb81..0dce754 100644
 --- a/Python/sysmodule.c
 +++ b/Python/sysmodule.c
-@@ -2319,6 +2319,8 @@ _PySys_BeginInit(PyObject **sysmod)
+@@ -2668,6 +2668,8 @@ _PySys_InitCore(_PyRuntimeState *runtime, PyInterpreterState *interp,
                          PyUnicode_FromString(Py_GetCopyright()));
      SET_SYS_FROM_STRING("platform",
                          PyUnicode_FromString(Py_GetPlatform()));
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
new file mode 100644
index 0000000..acf8e1e
--- /dev/null
+++ b/poky/meta/recipes-devtools/python/python3/0001-Don-t-search-system-for-headers-libraries.patch
@@ -0,0 +1,29 @@
+From 85e8f86ad2b7dec0848cd55b8e810a5e2722b20a 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
+--- a/setup.py
++++ b/setup.py
+@@ -674,8 +674,8 @@ class PyBuildExt(build_ext):
+             add_dir_to_list(self.compiler.include_dirs,
+                             sysconfig.get_config_var("INCLUDEDIR"))
+ 
+-        system_lib_dirs = ['/lib64', '/usr/lib64', '/lib', '/usr/lib']
+-        system_include_dirs = ['/usr/include']
++        system_lib_dirs = []
++        system_include_dirs = []
+         # 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-Makefile-do-not-compile-.pyc-in-parallel.patch b/poky/meta/recipes-devtools/python/python3/0001-Makefile-do-not-compile-.pyc-in-parallel.patch
new file mode 100644
index 0000000..b1bceac
--- /dev/null
+++ b/poky/meta/recipes-devtools/python/python3/0001-Makefile-do-not-compile-.pyc-in-parallel.patch
@@ -0,0 +1,58 @@
+From c501e121a872cbcef8ffe626c1de173a125be9f8 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Thu, 16 Jan 2020 12:34:20 +0100
+Subject: [PATCH] Makefile: do not compile .pyc in parallel
+
+This was found to break reproducibility, and produce strange file ownership
+races.
+
+The upstream commit introducing the change was:
+https://github.com/python/cpython/commit/1a2dd82f56bd813aacc570e172cefe55a8a41504
+
+Upstream-Status: Pending
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ Makefile.pre.in | 12 ++++++------
+ 1 file changed, 6 insertions(+), 6 deletions(-)
+
+diff --git a/Makefile.pre.in b/Makefile.pre.in
+index 1241112..5dfdf44 100644
+--- a/Makefile.pre.in
++++ b/Makefile.pre.in
+@@ -1457,30 +1457,30 @@ libinstall:	build_all $(srcdir)/Modules/xxmodule.c
+ 	fi
+ 	-PYTHONPATH=$(DESTDIR)$(LIBDEST)  $(RUNSHARED) \
+ 		$(PYTHON_FOR_BUILD) -Wi $(DESTDIR)$(LIBDEST)/compileall.py \
+-		-j0 -d $(LIBDEST) -f \
++		-d $(LIBDEST) -f \
+ 		-x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \
+ 		$(DESTDIR)$(LIBDEST)
+ 	-PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
+ 		$(PYTHON_FOR_BUILD) -Wi -O $(DESTDIR)$(LIBDEST)/compileall.py \
+-		-j0 -d $(LIBDEST) -f \
++		-d $(LIBDEST) -f \
+ 		-x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \
+ 		$(DESTDIR)$(LIBDEST)
+ 	-PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
+ 		$(PYTHON_FOR_BUILD) -Wi -OO $(DESTDIR)$(LIBDEST)/compileall.py \
+-		-j0 -d $(LIBDEST) -f \
++		-d $(LIBDEST) -f \
+ 		-x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \
+ 		$(DESTDIR)$(LIBDEST)
+ 	-PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
+ 		$(PYTHON_FOR_BUILD) -Wi $(DESTDIR)$(LIBDEST)/compileall.py \
+-		-j0 -d $(LIBDEST)/site-packages -f \
++		-d $(LIBDEST)/site-packages -f \
+ 		-x badsyntax $(DESTDIR)$(LIBDEST)/site-packages
+ 	-PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
+ 		$(PYTHON_FOR_BUILD) -Wi -O $(DESTDIR)$(LIBDEST)/compileall.py \
+-		-j0 -d $(LIBDEST)/site-packages -f \
++		-d $(LIBDEST)/site-packages -f \
+ 		-x badsyntax $(DESTDIR)$(LIBDEST)/site-packages
+ 	-PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
+ 		$(PYTHON_FOR_BUILD) -Wi -OO $(DESTDIR)$(LIBDEST)/compileall.py \
+-		-j0 -d $(LIBDEST)/site-packages -f \
++		-d $(LIBDEST)/site-packages -f \
+ 		-x badsyntax $(DESTDIR)$(LIBDEST)/site-packages
+ 	-PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
+ 		$(PYTHON_FOR_BUILD) -m lib2to3.pgen2.driver $(DESTDIR)$(LIBDEST)/lib2to3/Grammar.txt
diff --git a/poky/meta/recipes-devtools/python/python3/0001-bpo-36852-proper-detection-of-mips-architecture-for-.patch b/poky/meta/recipes-devtools/python/python3/0001-bpo-36852-proper-detection-of-mips-architecture-for-.patch
index e7af886..c4fae09 100644
--- a/poky/meta/recipes-devtools/python/python3/0001-bpo-36852-proper-detection-of-mips-architecture-for-.patch
+++ b/poky/meta/recipes-devtools/python/python3/0001-bpo-36852-proper-detection-of-mips-architecture-for-.patch
@@ -1,4 +1,4 @@
-From 7535c39951b9d15dd64c4669092a8582ba555466 Mon Sep 17 00:00:00 2001
+From 1ad771d86728ee2ed30e202e9768d8d825f96467 Mon Sep 17 00:00:00 2001
 From: Matthias Schoepfer <matthias.schoepfer@ithinx.io>
 Date: Fri, 31 May 2019 15:34:34 +0200
 Subject: [PATCH] bpo-36852: proper detection of mips architecture for soft
@@ -12,15 +12,17 @@
 
 Upstream-Status: Submitted [https://github.com/python/cpython/pull/13196]
 Signed-off-by: Matthias Schoepfer <matthias.schoepfer@ithinx.io>
+
+%% original patch: 0001-bpo-36852-proper-detection-of-mips-architecture-for-.patch
 ---
- configure.ac | 169 ++++++---------------------------------------------
- 1 file changed, 17 insertions(+), 152 deletions(-)
+ configure.ac | 175 +++++++--------------------------------------------
+ 1 file changed, 21 insertions(+), 154 deletions(-)
 
 diff --git a/configure.ac b/configure.ac
-index a7de901e08..a73e2de51b 100644
+index ede710e..bc81b0b 100644
 --- a/configure.ac
 +++ b/configure.ac
-@@ -727,158 +727,23 @@ fi
+@@ -710,160 +710,27 @@ fi
  MULTIARCH=$($CC --print-multiarch 2>/dev/null)
  AC_SUBST(MULTIARCH)
  
@@ -163,6 +165,8 @@
 -        i386-gnu
 -#elif defined(__APPLE__)
 -        darwin
+-#elif defined(__VXWORKS__)
+-        vxworks
 -#else
 -# error unknown platform triplet
 -#endif
@@ -190,12 +194,16 @@
 +     	PLATFORM_TRIPLET=vxworks
 +	;;
 +     *)
-+	PLATFORM_TRIPLET=${target_cpu}-${target_os}
++        if test "${target_cpu}" != "i686"; then
++		PLATFORM_TRIPLET=${target_cpu}-${target_os}
++	else
++		PLATFORM_TRIPLET=i386-${target_os}
++	fi
 +	;;
 +esac	
  
  if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then
    if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
 -- 
-2.21.0
+2.24.1
 
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
new file mode 100644
index 0000000..123ce3a
--- /dev/null
+++ b/poky/meta/recipes-devtools/python/python3/0001-configure.ac-fix-LIBPL.patch
@@ -0,0 +1,35 @@
+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 1709011..e7af3c6 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 eff903c600f4c40f5753e95ab1557126fc6e0c9c Mon Sep 17 00:00:00 2001
+From 7ada9c749f6beb51c13a3debc850755e911548a6 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
@@ -15,10 +15,10 @@
  2 files changed, 4 insertions(+)
 
 diff --git a/Lib/distutils/sysconfig.py b/Lib/distutils/sysconfig.py
-index 0a034ee..3dfd0a3 100644
+index b51629e..2df348c 100644
 --- a/Lib/distutils/sysconfig.py
 +++ b/Lib/distutils/sysconfig.py
-@@ -439,6 +439,8 @@ def _init_posix():
+@@ -438,6 +438,8 @@ def _init_posix():
          platform=sys.platform,
          multiarch=getattr(sys.implementation, '_multiarch', ''),
      ))
@@ -28,7 +28,7 @@
      build_time_vars = _temp.build_time_vars
      global _config_vars
 diff --git a/Lib/sysconfig.py b/Lib/sysconfig.py
-index 87fa5e6..756a41c 100644
+index b2d790b..405273c 100644
 --- a/Lib/sysconfig.py
 +++ b/Lib/sysconfig.py
 @@ -419,6 +419,8 @@ def _init_posix(vars):
diff --git a/poky/meta/recipes-devtools/python/python3/0001-main.c-if-OEPYTHON3HOME-is-set-use-instead-of-PYTHON.patch b/poky/meta/recipes-devtools/python/python3/0001-main.c-if-OEPYTHON3HOME-is-set-use-instead-of-PYTHON.patch
deleted file mode 100644
index a146c74..0000000
--- a/poky/meta/recipes-devtools/python/python3/0001-main.c-if-OEPYTHON3HOME-is-set-use-instead-of-PYTHON.patch
+++ /dev/null
@@ -1,47 +0,0 @@
-From 5ce3ac59531828ff682646fbba59b2126b28a8aa Mon Sep 17 00:00:00 2001
-From: Jaewon Lee <jaewon.lee@xilinx.com>
-Date: Thu, 25 Apr 2019 15:34:26 -0700
-Subject: [PATCH] main.c: if OEPYTHON3HOME is set use instead of PYTHONHOME
-
-There is one variable PYTHONHOME to determine where libraries are coming
-from for both python2 and python3. This becomes an issue if only one has
-libraries in the specified PYTHONHOME path, but they are using the same
-PYTHONHOME. Creating another variable OEPYTHON3HOME to allow for a way
-to set a different path for python3
-
-Signed-off-by: Jaewon Lee <jaewon.lee@xilinx.com>
-
-Upstream-Status: Inappropriate [OE specific configuration]
-
----
- Modules/main.c | 17 +++++++++++++----
- 1 file changed, 13 insertions(+), 4 deletions(-)
-
-diff --git a/Modules/main.c b/Modules/main.c
-index acc59c6..407085a 100644
---- a/Modules/main.c
-+++ b/Modules/main.c
-@@ -1834,10 +1834,19 @@ config_init_home(_PyCoreConfig *config)
-         }
-         return _Py_INIT_OK();
-     }
--
--    int res = config_get_env_var_dup(&home, L"PYTHONHOME", "PYTHONHOME");
--    if (res < 0) {
--        return DECODE_LOCALE_ERR("PYTHONHOME", res);
-+    int res;
-+    const char *oepython3home = config_get_env_var("OEPYTHON3HOME");
-+    if (oepython3home) {
-+        res = config_get_env_var_dup(&home, L"OEPYTHON3HOME", "OEPYTHON3HOME");
-+        if (res < 0) {
-+            return DECODE_LOCALE_ERR("OEPYTHON3HOME", res);
-+        }
-+    }
-+    else {
-+        res = config_get_env_var_dup(&home, L"PYTHONHOME", "PYTHONHOME");
-+        if (res < 0) {
-+            return DECODE_LOCALE_ERR("PYTHONHOME", res);
-+        }
-     }
-     config->home = home;
-     return _Py_INIT_OK();
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
new file mode 100644
index 0000000..fe031b9
--- /dev/null
+++ b/poky/meta/recipes-devtools/python/python3/0001-python3-Do-not-hardcode-lib-for-distutils.patch
@@ -0,0 +1,43 @@
+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 a0ea897..fb10ca9 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 2645317fef09afe31b01bb2c1d4fe5b9afdbb11a Mon Sep 17 00:00:00 2001
+From 994783da5c21cab81b6589ed2d4275e665a946f9 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
@@ -21,12 +21,13 @@
 patch originally from Li Zhou, I just rework it to new version
 
 Signed-off-by: Changqing Li <changqing.li@windriver.com>
+
 ---
  configure.ac | 19 ++++++++++---------
  1 file changed, 10 insertions(+), 9 deletions(-)
 
 diff --git a/configure.ac b/configure.ac
-index a7de901..4a3681f 100644
+index a189d42..0f85486 100644
 --- a/configure.ac
 +++ b/configure.ac
 @@ -54,6 +54,7 @@ AC_CONFIG_HEADER(pyconfig.h)
@@ -37,7 +38,7 @@
  
  # pybuilddir.txt will be created by --generate-posix-vars in the Makefile
  rm -f pybuilddir.txt
-@@ -695,7 +696,7 @@ AC_MSG_RESULT($with_cxx_main)
+@@ -671,7 +672,7 @@ AC_MSG_RESULT($with_cxx_main)
  preset_cxx="$CXX"
  if test -z "$CXX"
  then
@@ -46,7 +47,7 @@
          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]) ;;
-@@ -979,7 +980,7 @@ rmdir CaseSensitiveTestDir
+@@ -957,7 +958,7 @@ rmdir CaseSensitiveTestDir
  
  case $ac_sys_system in
  hp*|HP*)
@@ -55,7 +56,7 @@
      cc|*/cc) CC="$CC -Ae";;
      esac;;
  esac
-@@ -1336,7 +1337,7 @@ else
+@@ -1335,7 +1336,7 @@ else
  fi],
  [AC_MSG_RESULT(no)])
  if test "$Py_LTO" = 'true' ; then
@@ -64,7 +65,7 @@
      *clang*)
        AC_SUBST(LLVM_AR)
        AC_PATH_TOOL(LLVM_AR, llvm-ar, '', ${llvm_path})
-@@ -1426,7 +1427,7 @@ then
+@@ -1425,7 +1426,7 @@ then
    fi
  fi
  LLVM_PROF_ERR=no
@@ -73,16 +74,16 @@
    *clang*)
      # Any changes made here should be reflected in the GCC+Darwin case below
      PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
-@@ -1500,7 +1501,7 @@ then
-            WRAP="-fwrapv"
-         fi
+@@ -1486,7 +1487,7 @@ esac
+ # compiler and platform.  BASECFLAGS tweaks need to be made even if the
+ # user set OPT.
  
--        case $CC in
-+        case $cc_basename in
-             *clang*)
-                 cc_is_clang=1
-                 ;;
-@@ -1623,7 +1624,7 @@ yes)
+-case $CC in
++case $cc_basename in
+     *clang*)
+         cc_is_clang=1
+         ;;
+@@ -1622,7 +1623,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?
@@ -91,7 +92,7 @@
      *icc*)
      ac_cv_disable_unused_result_warning=no
      ;;
-@@ -1965,7 +1966,7 @@ yes)
+@@ -1943,7 +1944,7 @@ yes)
  esac
  
  # ICC needs -fp-model strict or floats behave badly
@@ -100,7 +101,7 @@
  *icc*)
      CFLAGS_NODIST="$CFLAGS_NODIST -fp-model strict"
      ;;
-@@ -2727,7 +2728,7 @@ then
+@@ -2711,7 +2712,7 @@ then
  		then
  			LINKFORSHARED="-Wl,--export-dynamic"
  		fi;;
@@ -109,7 +110,7 @@
  		  *gcc*)
  		    if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
  		    then
-@@ -5429,7 +5430,7 @@ if test "$have_gcc_asm_for_x87" = yes; then
+@@ -5362,7 +5363,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/0003-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
similarity index 60%
rename from poky/meta/recipes-devtools/python/python3/0003-setup.py-pass-missing-libraries-to-Extension-for-mul.patch
rename to poky/meta/recipes-devtools/python/python3/0001-setup.py-pass-missing-libraries-to-Extension-for-mul.patch
index b9d5bc9..d38ed61 100644
--- a/poky/meta/recipes-devtools/python/python3/0003-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
@@ -1,6 +1,6 @@
-From b881a79adcd4ae5ac8fe4f49d0fc77c47f777919 Mon Sep 17 00:00:00 2001
-From: Hongxu Jia <hongxu.jia@windriver.com>
-Date: Fri, 4 Aug 2017 11:16:14 +0800
+From 7019ba184b828ed7253750cf409fc5760ef90a54 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Thu, 9 Jan 2020 17:44:05 +0100
 Subject: [PATCH] setup.py: pass missing libraries to Extension for
  multiprocessing module
 
@@ -46,35 +46,24 @@
 
 And the semaphore issue also caused multiprocessing.Queue().put() hung.
 
-Upstream-Status: Submitted [https://github.com/python/cpython/pull/2999]
+Upstream-Status: Pensing
 
 Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
 ---
- setup.py | 7 +++++--
- 1 file changed, 5 insertions(+), 2 deletions(-)
+ setup.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/setup.py b/setup.py
-index b7a36a6..658ead3 100644
+index ec3f2a4..b0f1541 100644
 --- a/setup.py
 +++ b/setup.py
-@@ -1584,8 +1584,10 @@ class PyBuildExt(build_ext):
-         elif host_platform.startswith('netbsd'):
-             macros = dict()
-             libraries = []
--
--        else:                                   # Linux and other unices
-+        elif host_platform.startswith(('linux')):
-+            macros = dict()
-+            libraries = ['pthread']
-+        else:                                   # Other unices
-             macros = dict()
-             libraries = ['rt']
+@@ -1671,7 +1671,7 @@ class PyBuildExt(build_ext):
+                                    libraries=libs,
+                                    include_dirs=["Modules/_multiprocessing"]))
  
-@@ -1603,6 +1605,7 @@ class PyBuildExt(build_ext):
+-        self.add(Extension('_multiprocessing', multiprocessing_srcs,
++        self.add(Extension('_multiprocessing', multiprocessing_srcs, libraries=['pthread'],
+                            include_dirs=["Modules/_multiprocessing"]))
  
-         exts.append ( Extension('_multiprocessing', multiprocessing_srcs,
-                                 define_macros=list(macros.items()),
-+                                libraries=libraries,
-                                 include_dirs=["Modules/_multiprocessing"]))
-         # End multiprocessing
- 
+     def detect_uuid(self):
diff --git a/poky/meta/recipes-devtools/python/python3/0002-Don-t-do-runtime-test-to-get-float-byte-order.patch b/poky/meta/recipes-devtools/python/python3/0002-Don-t-do-runtime-test-to-get-float-byte-order.patch
deleted file mode 100644
index 3721e7c..0000000
--- a/poky/meta/recipes-devtools/python/python3/0002-Don-t-do-runtime-test-to-get-float-byte-order.patch
+++ /dev/null
@@ -1,199 +0,0 @@
-From fa96a7fd19e17b9c6b4dd01c3c3774fb382dddc6 Mon Sep 17 00:00:00 2001
-From: Ross Burton <ross.burton@intel.com>
-Date: Wed, 5 Sep 2018 11:45:52 +0100
-Subject: [PATCH] Don't do runtime test to get float byte order
-
-Python uses AC_RUN_IFELSE to determine the byte order for floats and doubles,
-and falls back onto "I don't know" if it can't run code.  This results in
-crippled floating point numbers in Python, and the regression tests fail.
-
-Instead of running code, take a macro from autoconf-archive which compiles C
-with a special double in which has an ASCII representation, and then greps the
-binary to identify the format.
-
-Upstream-Status: Submitted [https://bugs.python.org/issue34585]
-Signed-off-by: Ross Burton <ross.burton@intel.com>
----
- configure.ac                     | 72 +++------------------------
- m4/ax_c_float_words_bigendian.m4 | 83 ++++++++++++++++++++++++++++++++
- 2 files changed, 90 insertions(+), 65 deletions(-)
- create mode 100644 m4/ax_c_float_words_bigendian.m4
-
-diff --git a/configure.ac b/configure.ac
-index 4a3681f..4ab19a6 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -4328,77 +4328,19 @@ fi
- # * Check for various properties of floating point *
- # **************************************************
- 
--AC_MSG_CHECKING(whether C doubles are little-endian IEEE 754 binary64)
--AC_CACHE_VAL(ac_cv_little_endian_double, [
--AC_RUN_IFELSE([AC_LANG_SOURCE([[
--#include <string.h>
--int main() {
--    double x = 9006104071832581.0;
--    if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
--        return 0;
--    else
--        return 1;
--}
--]])],
--[ac_cv_little_endian_double=yes],
--[ac_cv_little_endian_double=no],
--[ac_cv_little_endian_double=no])])
--AC_MSG_RESULT($ac_cv_little_endian_double)
--if test "$ac_cv_little_endian_double" = yes
--then
--  AC_DEFINE(DOUBLE_IS_LITTLE_ENDIAN_IEEE754, 1,
--  [Define if C doubles are 64-bit IEEE 754 binary format, stored
--   with the least significant byte first])
--fi
--
--AC_MSG_CHECKING(whether C doubles are big-endian IEEE 754 binary64)
--AC_CACHE_VAL(ac_cv_big_endian_double, [
--AC_RUN_IFELSE([AC_LANG_SOURCE([[
--#include <string.h>
--int main() {
--    double x = 9006104071832581.0;
--    if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
--        return 0;
--    else
--        return 1;
--}
--]])],
--[ac_cv_big_endian_double=yes],
--[ac_cv_big_endian_double=no],
--[ac_cv_big_endian_double=no])])
--AC_MSG_RESULT($ac_cv_big_endian_double)
--if test "$ac_cv_big_endian_double" = yes
-+AX_C_FLOAT_WORDS_BIGENDIAN
-+if test "$ax_cv_c_float_words_bigendian" = "yes"
- then
-   AC_DEFINE(DOUBLE_IS_BIG_ENDIAN_IEEE754, 1,
-   [Define if C doubles are 64-bit IEEE 754 binary format, stored
-    with the most significant byte first])
--fi
--
--# Some ARM platforms use a mixed-endian representation for doubles.
--# While Python doesn't currently have full support for these platforms
--# (see e.g., issue 1762561), we can at least make sure that float <-> string
--# conversions work.
--AC_MSG_CHECKING(whether C doubles are ARM mixed-endian IEEE 754 binary64)
--AC_CACHE_VAL(ac_cv_mixed_endian_double, [
--AC_RUN_IFELSE([AC_LANG_SOURCE([[
--#include <string.h>
--int main() {
--    double x = 9006104071832581.0;
--    if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
--        return 0;
--    else
--        return 1;
--}
--]])],
--[ac_cv_mixed_endian_double=yes],
--[ac_cv_mixed_endian_double=no],
--[ac_cv_mixed_endian_double=no])])
--AC_MSG_RESULT($ac_cv_mixed_endian_double)
--if test "$ac_cv_mixed_endian_double" = yes
-+elif test "$ax_cv_c_float_words_bigendian" = "no"
- then
--  AC_DEFINE(DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754, 1,
-+  AC_DEFINE(DOUBLE_IS_LITTLE_ENDIAN_IEEE754, 1,
-   [Define if C doubles are 64-bit IEEE 754 binary format, stored
--   in ARM mixed-endian order (byte order 45670123)])
-+   with the least significant byte first])
-+else
-+  AC_MSG_ERROR([Cannot identify floating point byte order])
- fi
- 
- # The short float repr introduced in Python 3.1 requires the
-diff --git a/m4/ax_c_float_words_bigendian.m4 b/m4/ax_c_float_words_bigendian.m4
-new file mode 100644
-index 0000000..216b90d
---- /dev/null
-+++ b/m4/ax_c_float_words_bigendian.m4
-@@ -0,0 +1,83 @@
-+# ===============================================================================
-+#  https://www.gnu.org/software/autoconf-archive/ax_c_float_words_bigendian.html
-+# ===============================================================================
-+#
-+# SYNOPSIS
-+#
-+#   AX_C_FLOAT_WORDS_BIGENDIAN([ACTION-IF-TRUE], [ACTION-IF-FALSE], [ACTION-IF-UNKNOWN])
-+#
-+# DESCRIPTION
-+#
-+#   Checks the ordering of words within a multi-word float. This check is
-+#   necessary because on some systems (e.g. certain ARM systems), the float
-+#   word ordering can be different from the byte ordering. In a multi-word
-+#   float context, "big-endian" implies that the word containing the sign
-+#   bit is found in the memory location with the lowest address. This
-+#   implementation was inspired by the AC_C_BIGENDIAN macro in autoconf.
-+#
-+#   The endianness is detected by first compiling C code that contains a
-+#   special double float value, then grepping the resulting object file for
-+#   certain strings of ASCII values. The double is specially crafted to have
-+#   a binary representation that corresponds with a simple string. In this
-+#   implementation, the string "noonsees" was selected because the
-+#   individual word values ("noon" and "sees") are palindromes, thus making
-+#   this test byte-order agnostic. If grep finds the string "noonsees" in
-+#   the object file, the target platform stores float words in big-endian
-+#   order. If grep finds "seesnoon", float words are in little-endian order.
-+#   If neither value is found, the user is instructed to specify the
-+#   ordering.
-+#
-+# LICENSE
-+#
-+#   Copyright (c) 2008 Daniel Amelang <dan@amelang.net>
-+#
-+#   Copying and distribution of this file, with or without modification, are
-+#   permitted in any medium without royalty provided the copyright notice
-+#   and this notice are preserved. This file is offered as-is, without any
-+#   warranty.
-+
-+#serial 11
-+
-+AC_DEFUN([AX_C_FLOAT_WORDS_BIGENDIAN],
-+  [AC_CACHE_CHECK(whether float word ordering is bigendian,
-+                  ax_cv_c_float_words_bigendian, [
-+
-+ax_cv_c_float_words_bigendian=unknown
-+AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
-+
-+double d = 90904234967036810337470478905505011476211692735615632014797120844053488865816695273723469097858056257517020191247487429516932130503560650002327564517570778480236724525140520121371739201496540132640109977779420565776568942592.0;
-+
-+]])], [
-+
-+if grep noonsees conftest.$ac_objext >/dev/null ; then
-+  ax_cv_c_float_words_bigendian=yes
-+fi
-+if grep seesnoon conftest.$ac_objext >/dev/null ; then
-+  if test "$ax_cv_c_float_words_bigendian" = unknown; then
-+    ax_cv_c_float_words_bigendian=no
-+  else
-+    ax_cv_c_float_words_bigendian=unknown
-+  fi
-+fi
-+
-+])])
-+
-+case $ax_cv_c_float_words_bigendian in
-+  yes)
-+    m4_default([$1],
-+      [AC_DEFINE([FLOAT_WORDS_BIGENDIAN], 1,
-+                 [Define to 1 if your system stores words within floats
-+                  with the most significant word first])]) ;;
-+  no)
-+    $2 ;;
-+  *)
-+    m4_default([$3],
-+      [AC_MSG_ERROR([
-+
-+Unknown float word ordering. You need to manually preset
-+ax_cv_c_float_words_bigendian=no (or yes) according to your system.
-+
-+    ])]) ;;
-+esac
-+
-+])# AX_C_FLOAT_WORDS_BIGENDIAN
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 c15295c..4bd98f6 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
@@ -1,4 +1,4 @@
-From e3b59cb9658e1d3efa3535840939a0fa92a70a5a Mon Sep 17 00:00:00 2001
+From a2dd127b4163aff6cc35af0d0251321964232ad4 Mon Sep 17 00:00:00 2001
 From: Alexander Kanavin <alex.kanavin@gmail.com>
 Date: Mon, 7 Oct 2019 13:22:14 +0200
 Subject: [PATCH] setup.py: do not report missing dependencies for disabled
@@ -10,22 +10,23 @@
 
 Upstream-Status: Inappropriate [oe-core specific]
 Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+
 ---
  setup.py | 4 ++++
  1 file changed, 4 insertions(+)
 
 diff --git a/setup.py b/setup.py
-index 4b53668..0097643 100644
+index 7691258..ec3f2a4 100644
 --- a/setup.py
 +++ b/setup.py
-@@ -365,6 +365,10 @@ class PyBuildExt(build_ext):
+@@ -408,6 +408,10 @@ class PyBuildExt(build_ext):
                  print("%-*s   %-*s   %-*s" % (longest, e, longest, f,
                                                longest, g))
  
 +        # There is no need to report missing module dependencies,
 +        # if the modules have been disabled in the first place.
-+        missing = list(set(missing) - set(sysconf_dis))
++        self.missing = list(set(self.missing) - set(sysconf_dis))
 +
-         if missing:
+         if self.missing:
              print()
              print("Python build finished successfully!")
diff --git a/poky/meta/recipes-devtools/python/python3/0020-configure.ac-setup.py-do-not-add-a-curses-include-pa.patch b/poky/meta/recipes-devtools/python/python3/0020-configure.ac-setup.py-do-not-add-a-curses-include-pa.patch
new file mode 100644
index 0000000..e04a916
--- /dev/null
+++ b/poky/meta/recipes-devtools/python/python3/0020-configure.ac-setup.py-do-not-add-a-curses-include-pa.patch
@@ -0,0 +1,48 @@
+From 863c09f640a5dfd33ff22915b0d5fee7bc5df70a Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Sun, 16 Feb 2020 17:50:25 +0100
+Subject: [PATCH] configure.ac, setup.py: do not add a curses include path from
+ the host
+
+This leads to host contamination, and particularly can cause
+curses modules to fail at runtime if the host curses is configured
+differently to native curses (observed on current OpenSuse Tumbleweed
+as dnf failures).
+
+Upstream-Status: Inappropriate [oe-core specific]
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ configure.ac | 6 ------
+ setup.py     | 2 --
+ 2 files changed, 8 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 915f475..c911011 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -4828,12 +4828,6 @@ then
+   [Define if you have struct stat.st_mtimensec])
+ fi
+ 
+-# first curses header check
+-ac_save_cppflags="$CPPFLAGS"
+-if test "$cross_compiling" = no; then
+-  CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
+-fi
+-
+ AC_CHECK_HEADERS(curses.h ncurses.h)
+ 
+ # On Solaris, term.h requires curses.h
+diff --git a/setup.py b/setup.py
+index b0f1541..7208cd0 100644
+--- a/setup.py
++++ b/setup.py
+@@ -973,8 +973,6 @@ class PyBuildExt(build_ext):
+         panel_library = 'panel'
+         if curses_library == 'ncursesw':
+             curses_defines.append(('HAVE_NCURSESW', '1'))
+-            if not CROSS_COMPILING:
+-                curses_includes.append('/usr/include/ncursesw')
+             # Bug 1464056: If _curses.so links with ncursesw,
+             # _curses_panel.so must link with panelw.
+             panel_library = 'panelw'
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 d49604b..61ac3e7 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 a274ba778838824efcacaba57c415b7262f779ec Mon Sep 17 00:00:00 2001
+From 251347fc970a397a9cd63ed3f87c5e6c52e15187 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
@@ -18,10 +18,10 @@
  1 file changed, 11 insertions(+), 3 deletions(-)
 
 diff --git a/Lib/distutils/sysconfig.py b/Lib/distutils/sysconfig.py
-index 3dfd0a3..6c6b09a 100644
+index 2df348c..4f8db84 100644
 --- a/Lib/distutils/sysconfig.py
 +++ b/Lib/distutils/sysconfig.py
-@@ -97,7 +97,9 @@ def get_python_inc(plat_specific=0, prefix=None):
+@@ -96,7 +96,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 +32,7 @@
          prefix = plat_specific and BASE_EXEC_PREFIX or BASE_PREFIX
      if os.name == "posix":
          if python_build:
-@@ -140,7 +142,13 @@ def get_python_lib(plat_specific=0, standard_lib=0, prefix=None):
+@@ -139,7 +141,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,7 +47,7 @@
          if standard_lib:
              prefix = plat_specific and BASE_EXEC_PREFIX or BASE_PREFIX
          else:
-@@ -148,7 +156,7 @@ def get_python_lib(plat_specific=0, standard_lib=0, prefix=None):
+@@ -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,
diff --git a/poky/meta/recipes-devtools/python/python3/avoid_warning_about_tkinter.patch b/poky/meta/recipes-devtools/python/python3/avoid_warning_about_tkinter.patch
index 24e67b4..184540e 100644
--- a/poky/meta/recipes-devtools/python/python3/avoid_warning_about_tkinter.patch
+++ b/poky/meta/recipes-devtools/python/python3/avoid_warning_about_tkinter.patch
@@ -1,4 +1,4 @@
-From fead48c8b501a8d7c3db21df2e599f90f38f11d3 Mon Sep 17 00:00:00 2001
+From ba7202700578d435b07cfdfb7b57e83185752800 Mon Sep 17 00:00:00 2001
 From: Andrei Gherzan <andrei@gherzan.ro>
 Date: Mon, 28 Jan 2019 15:57:54 +0000
 Subject: [PATCH] _tkinter module needs tk module along with tcl. tk is not yet
@@ -11,26 +11,21 @@
 Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
 
 ---
- setup.py | 8 +++++---
- 1 file changed, 5 insertions(+), 3 deletions(-)
+ setup.py | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
 
 diff --git a/setup.py b/setup.py
-index fbec00d..b7a36a6 100644
+index ab18ff0..7691258 100644
 --- a/setup.py
 +++ b/setup.py
-@@ -1623,10 +1623,12 @@ class PyBuildExt(build_ext):
-         self.extensions.extend(exts)
+@@ -1706,8 +1706,8 @@ class PyBuildExt(build_ext):
+         self.detect_decimal()
+         self.detect_ctypes()
+         self.detect_multiprocessing()
+-        if not self.detect_tkinter():
+-            self.missing.append('_tkinter')
++#        if not self.detect_tkinter():
++#            self.missing.append('_tkinter')
+         self.detect_uuid()
  
-         # Call the method for detecting whether _tkinter can be compiled
--        self.detect_tkinter(inc_dirs, lib_dirs)
-+        # self.detect_tkinter(inc_dirs, lib_dirs)
- 
--        if '_tkinter' not in [e.name for e in self.extensions]:
--            missing.append('_tkinter')
-+        # tkinter module will not be avalaible as yocto
-+        # doesn't have tk integrated (yet)
-+        #if '_tkinter' not in [e.name for e in self.extensions]:
-+        #    missing.append('_tkinter')
- 
-         # Build the _uuid module if possible
-         uuid_incs = find_file("uuid.h", inc_dirs, ["/usr/include/uuid"])
+ ##         # Uncomment these lines if you want to play with xxmodule.c
diff --git a/poky/meta/recipes-devtools/python/python3/python-config.patch b/poky/meta/recipes-devtools/python/python3/python-config.patch
index f23b8b7..c8a8f3d 100644
--- a/poky/meta/recipes-devtools/python/python3/python-config.patch
+++ b/poky/meta/recipes-devtools/python/python3/python-config.patch
@@ -1,4 +1,7 @@
-python-config: Revert to using distutils.sysconfig
+From 07df0ae0d70cba6d1847fe1c24a71063930bec60 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
 
 The newer sysconfig module shares some code with distutils.sysconfig, but the same modifications as in
 
@@ -12,11 +15,16 @@
 
 Signed-off-by: Tyler Hall <tylerwhall@gmail.com>
 :
-Index: Python-3.3.3/Misc/python-config.in
-===================================================================
---- Python-3.3.3.orig/Misc/python-config.in
-+++ Python-3.3.3/Misc/python-config.in
-@@ -4,7 +4,7 @@
+
+---
+ Misc/python-config.in | 10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/Misc/python-config.in b/Misc/python-config.in
+index 727c4a8..c702829 100644
+--- a/Misc/python-config.in
++++ b/Misc/python-config.in
+@@ -6,7 +6,7 @@
  import getopt
  import os
  import sys
@@ -24,8 +32,8 @@
 +from distutils import sysconfig
  
  valid_opts = ['prefix', 'exec-prefix', 'includes', 'libs', 'cflags',
-               'ldflags', 'extension-suffix', 'help', 'abiflags', 'configdir']
-@@ -32,14 +32,14 @@ if '--help' in opt_flags:
+               'ldflags', 'extension-suffix', 'help', 'abiflags', 'configdir',
+@@ -35,14 +35,14 @@ if '--help' in opt_flags:
  
  for opt in opt_flags:
      if opt == '--prefix':
diff --git a/poky/meta/recipes-devtools/python/python3/python3-manifest.json b/poky/meta/recipes-devtools/python/python3/python3-manifest.json
index dba92b0..3bcc9b8 100644
--- a/poky/meta/recipes-devtools/python/python3/python3-manifest.json
+++ b/poky/meta/recipes-devtools/python/python3/python3-manifest.json
@@ -122,7 +122,8 @@
             "logging",
             "netclient",
             "numbers",
-            "stringold"
+            "stringold",
+            "typing"
         ],
         "files": [
             "${libdir}/python${PYTHON_MAJMIN}/asyncio",
@@ -182,26 +183,15 @@
     "compression": {
         "summary": "Python high-level compression support",
         "rdepends": [
-            "core",
-            "shell",
-            "unixadmin"
+            "core"
         ],
         "files": [
-            "${libdir}/python${PYTHON_MAJMIN}/_compression.py",
-            "${libdir}/python${PYTHON_MAJMIN}/bz2.py",
             "${libdir}/python${PYTHON_MAJMIN}/gzip.py",
-            "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_bz2.*.so",
-            "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_lzma.*.so",
-            "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/zlib.*.so",
-            "${libdir}/python${PYTHON_MAJMIN}/lzma.py",
             "${libdir}/python${PYTHON_MAJMIN}/tarfile.py",
             "${libdir}/python${PYTHON_MAJMIN}/zipfile.py"
         ],
         "cached": [
-            "${libdir}/python${PYTHON_MAJMIN}/__pycache__/_compression.*.pyc",
-            "${libdir}/python${PYTHON_MAJMIN}/__pycache__/bz2.*.pyc",
             "${libdir}/python${PYTHON_MAJMIN}/__pycache__/gzip.*.pyc",
-            "${libdir}/python${PYTHON_MAJMIN}/__pycache__/lzma.*.pyc",
             "${libdir}/python${PYTHON_MAJMIN}/__pycache__/tarfile.*.pyc",
             "${libdir}/python${PYTHON_MAJMIN}/__pycache__/zipfile.*.pyc"
         ]
@@ -210,12 +200,10 @@
         "summary": "Python interpreter and core modules",
         "rdepends": [],
         "files": [
-            "${bindir}/python3",
             "${bindir}/python${PYTHON_MAJMIN}",
             "${bindir}/python${PYTHON_MAJMIN}.real",
-            "${bindir}/python${PYTHON_BINABI}",
-            "${includedir}/python${PYTHON_BINABI}/pyconfig*.h",
-            "${prefix}/lib/python${PYTHON_MAJMIN}/config*/*[!.a]",
+            "${bindir}/python3",
+            "${includedir}/python${PYTHON_MAJMIN}/pyconfig*.h",
             "${libdir}/python${PYTHON_MAJMIN}/UserDict.py",
             "${libdir}/python${PYTHON_MAJMIN}/UserList.py",
             "${libdir}/python${PYTHON_MAJMIN}/UserString.py",
@@ -223,6 +211,7 @@
             "${libdir}/python${PYTHON_MAJMIN}/_abcoll.py",
             "${libdir}/python${PYTHON_MAJMIN}/_bootlocale.py",
             "${libdir}/python${PYTHON_MAJMIN}/_collections_abc.py",
+            "${libdir}/python${PYTHON_MAJMIN}/_compression.py",
             "${libdir}/python${PYTHON_MAJMIN}/_markupbase.py",
             "${libdir}/python${PYTHON_MAJMIN}/_sitebuiltins.py",
             "${libdir}/python${PYTHON_MAJMIN}/_sysconfigdata*.py",
@@ -231,6 +220,7 @@
             "${libdir}/python${PYTHON_MAJMIN}/argparse.py",
             "${libdir}/python${PYTHON_MAJMIN}/ast.py",
             "${libdir}/python${PYTHON_MAJMIN}/bisect.py",
+            "${libdir}/python${PYTHON_MAJMIN}/bz2.py",
             "${libdir}/python${PYTHON_MAJMIN}/code.py",
             "${libdir}/python${PYTHON_MAJMIN}/codecs.py",
             "${libdir}/python${PYTHON_MAJMIN}/codeop.py",
@@ -247,6 +237,7 @@
             "${libdir}/python${PYTHON_MAJMIN}/encodings/latin_1.py",
             "${libdir}/python${PYTHON_MAJMIN}/encodings/utf_8.py",
             "${libdir}/python${PYTHON_MAJMIN}/enum.py",
+            "${libdir}/python${PYTHON_MAJMIN}/fnmatch.py",
             "${libdir}/python${PYTHON_MAJMIN}/functools.py",
             "${libdir}/python${PYTHON_MAJMIN}/genericpath.py",
             "${libdir}/python${PYTHON_MAJMIN}/getopt.py",
@@ -267,13 +258,16 @@
             "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/__pycache__/time.*.so",
             "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/__pycache__/xreadlines.*.so",
             "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_bisect.*.so",
+            "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_bz2.*.so",
             "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_csv.*.so",
             "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_heapq.*.so",
+            "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_lzma.*.so",
             "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_opcode.*.so",
             "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_posixsubprocess.*.so",
             "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_struct.*.so",
             "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/array.*.so",
             "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/binascii.*.so",
+            "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/grp.*.so",
             "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/math.*.so",
             "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/parser.*.so",
             "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/readline.*.so",
@@ -281,14 +275,18 @@
             "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/time.*.so",
             "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/unicodedata.*.so",
             "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/xreadlines.*.so",
+            "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/zlib.*.so",
             "${libdir}/python${PYTHON_MAJMIN}/linecache.py",
             "${libdir}/python${PYTHON_MAJMIN}/locale.py",
+            "${libdir}/python${PYTHON_MAJMIN}/lzma.py",
             "${libdir}/python${PYTHON_MAJMIN}/new.py",
             "${libdir}/python${PYTHON_MAJMIN}/ntpath.py",
             "${libdir}/python${PYTHON_MAJMIN}/opcode.py",
             "${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}/pkgutil.py",
             "${libdir}/python${PYTHON_MAJMIN}/platform.py",
             "${libdir}/python${PYTHON_MAJMIN}/posixpath.py",
             "${libdir}/python${PYTHON_MAJMIN}/re.py",
@@ -296,6 +294,7 @@
             "${libdir}/python${PYTHON_MAJMIN}/rlcompleter.py",
             "${libdir}/python${PYTHON_MAJMIN}/runpy.py",
             "${libdir}/python${PYTHON_MAJMIN}/selectors.py",
+            "${libdir}/python${PYTHON_MAJMIN}/shutil.py",
             "${libdir}/python${PYTHON_MAJMIN}/signal.py",
             "${libdir}/python${PYTHON_MAJMIN}/site.py",
             "${libdir}/python${PYTHON_MAJMIN}/sitecustomize.py",
@@ -315,12 +314,14 @@
             "${libdir}/python${PYTHON_MAJMIN}/traceback.py",
             "${libdir}/python${PYTHON_MAJMIN}/types.py",
             "${libdir}/python${PYTHON_MAJMIN}/warnings.py",
-            "${libdir}/python${PYTHON_MAJMIN}/weakref.py"
+            "${libdir}/python${PYTHON_MAJMIN}/weakref.py",
+            "${prefix}/lib/python${PYTHON_MAJMIN}/config*/*[!.a]"
         ],
         "cached": [
             "${libdir}/python${PYTHON_MAJMIN}/__pycache__/__future__.*.pyc",
             "${libdir}/python${PYTHON_MAJMIN}/__pycache__/_bootlocale.*.pyc",
             "${libdir}/python${PYTHON_MAJMIN}/__pycache__/_collections_abc.*.pyc",
+            "${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",
@@ -329,6 +330,7 @@
             "${libdir}/python${PYTHON_MAJMIN}/__pycache__/argparse.*.pyc",
             "${libdir}/python${PYTHON_MAJMIN}/__pycache__/ast.*.pyc",
             "${libdir}/python${PYTHON_MAJMIN}/__pycache__/bisect.*.pyc",
+            "${libdir}/python${PYTHON_MAJMIN}/__pycache__/bz2.*.pyc",
             "${libdir}/python${PYTHON_MAJMIN}/__pycache__/code.*.pyc",
             "${libdir}/python${PYTHON_MAJMIN}/__pycache__/codecs.*.pyc",
             "${libdir}/python${PYTHON_MAJMIN}/__pycache__/codeop.*.pyc",
@@ -339,6 +341,7 @@
             "${libdir}/python${PYTHON_MAJMIN}/__pycache__/csv.*.pyc",
             "${libdir}/python${PYTHON_MAJMIN}/__pycache__/dis.*.pyc",
             "${libdir}/python${PYTHON_MAJMIN}/__pycache__/enum.*.pyc",
+            "${libdir}/python${PYTHON_MAJMIN}/__pycache__/fnmatch.*.pyc",
             "${libdir}/python${PYTHON_MAJMIN}/__pycache__/functools.*.pyc",
             "${libdir}/python${PYTHON_MAJMIN}/__pycache__/genericpath.*.pyc",
             "${libdir}/python${PYTHON_MAJMIN}/__pycache__/getopt.*.pyc",
@@ -350,10 +353,14 @@
             "${libdir}/python${PYTHON_MAJMIN}/__pycache__/keyword.*.pyc",
             "${libdir}/python${PYTHON_MAJMIN}/__pycache__/linecache.*.pyc",
             "${libdir}/python${PYTHON_MAJMIN}/__pycache__/locale.*.pyc",
+            "${libdir}/python${PYTHON_MAJMIN}/__pycache__/lzma.*.pyc",
+            "${libdir}/python${PYTHON_MAJMIN}/__pycache__/ntpath.*.pyc",
             "${libdir}/python${PYTHON_MAJMIN}/__pycache__/opcode.*.pyc",
             "${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__/pkgutil.*.pyc",
             "${libdir}/python${PYTHON_MAJMIN}/__pycache__/platform.*.pyc",
             "${libdir}/python${PYTHON_MAJMIN}/__pycache__/posixpath.*.pyc",
             "${libdir}/python${PYTHON_MAJMIN}/__pycache__/re.*.pyc",
@@ -361,6 +368,7 @@
             "${libdir}/python${PYTHON_MAJMIN}/__pycache__/rlcompleter.*.pyc",
             "${libdir}/python${PYTHON_MAJMIN}/__pycache__/runpy.*.pyc",
             "${libdir}/python${PYTHON_MAJMIN}/__pycache__/selectors.*.pyc",
+            "${libdir}/python${PYTHON_MAJMIN}/__pycache__/shutil.*.pyc",
             "${libdir}/python${PYTHON_MAJMIN}/__pycache__/signal.*.pyc",
             "${libdir}/python${PYTHON_MAJMIN}/__pycache__/site.*.pyc",
             "${libdir}/python${PYTHON_MAJMIN}/__pycache__/sre_compile.*.pyc",
@@ -405,10 +413,10 @@
             "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_blake2.*.so",
             "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_crypt.*.so",
             "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_hashlib.*.so",
+            "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_md5.*.so",
+            "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_sha1.*.so",
             "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_sha256.*.so",
             "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_sha3.*.so",
-            "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_sha1.*.so",
-            "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_md5.*.so",
             "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_sha512.*.so"
         ],
         "cached": [
@@ -519,14 +527,12 @@
         ]
     },
     "distutils-windows": {
-        "cached": [],
-        "files": [
-            "${libdir}/python${PYTHON_MAJMIN}/distutils/command/wininst-*.exe"
-        ],
+        "summary": "Python distribution utilities (Windows installer stubs)",
         "rdepends": [
-            "distutils"
+            "core"
         ],
-        "summary": "Python distribution utilities (Windows installer stubs)"
+        "files": [],
+        "cached": []
     },
     "distutils": {
         "summary": "Python Distribution Utilities",
@@ -541,13 +547,19 @@
     "doctest": {
         "summary": "Python framework for running examples in docstrings",
         "rdepends": [
+            "asyncio",
+            "compression",
             "core",
             "debugger",
             "difflib",
+            "io",
             "logging",
+            "netclient",
+            "numbers",
             "pprint",
             "shell",
             "stringold",
+            "typing",
             "unittest"
         ],
         "files": [
@@ -641,8 +653,7 @@
             "crypt",
             "math",
             "netclient",
-            "shell",
-            "unixadmin"
+            "shell"
         ],
         "files": [
             "${libdir}/python${PYTHON_MAJMIN}/_pyio.py",
@@ -875,9 +886,7 @@
             "math",
             "mime",
             "netclient",
-            "shell",
-            "stringold",
-            "unixadmin"
+            "stringold"
         ],
         "files": [
             "${libdir}/python${PYTHON_MAJMIN}/cgi.py",
@@ -934,12 +943,8 @@
         "rdepends": [
             "core"
         ],
-        "files": [
-            "${libdir}/python${PYTHON_MAJMIN}/pkgutil.py"
-        ],
-        "cached": [
-            "${libdir}/python${PYTHON_MAJMIN}/__pycache__/pkgutil.*.pyc"
-        ]
+        "files": [],
+        "cached": []
     },
     "plistlib": {
         "summary": "Generate and parse Mac OS X .plist files",
@@ -988,8 +993,7 @@
         "summary": "Python interactive help support",
         "rdepends": [
             "core",
-            "netclient",
-            "pkgutil"
+            "netclient"
         ],
         "files": [
             "${bindir}/pydoc*",
@@ -1015,22 +1019,17 @@
         "rdepends": [
             "compression",
             "core",
-            "stringold",
-            "unixadmin"
+            "stringold"
         ],
         "files": [
             "${libdir}/python${PYTHON_MAJMIN}/cmd.py",
-            "${libdir}/python${PYTHON_MAJMIN}/fnmatch.py",
             "${libdir}/python${PYTHON_MAJMIN}/glob.py",
-            "${libdir}/python${PYTHON_MAJMIN}/shlex.py",
-            "${libdir}/python${PYTHON_MAJMIN}/shutil.py"
+            "${libdir}/python${PYTHON_MAJMIN}/shlex.py"
         ],
         "cached": [
             "${libdir}/python${PYTHON_MAJMIN}/__pycache__/cmd.*.pyc",
-            "${libdir}/python${PYTHON_MAJMIN}/__pycache__/fnmatch.*.pyc",
             "${libdir}/python${PYTHON_MAJMIN}/__pycache__/glob.*.pyc",
-            "${libdir}/python${PYTHON_MAJMIN}/__pycache__/shlex.*.pyc",
-            "${libdir}/python${PYTHON_MAJMIN}/__pycache__/shutil.*.pyc"
+            "${libdir}/python${PYTHON_MAJMIN}/__pycache__/shlex.*.pyc"
         ]
     },
     "smtpd": {
@@ -1150,12 +1149,17 @@
     "unittest": {
         "summary": "Python unit testing framework",
         "rdepends": [
+            "asyncio",
+            "compression",
             "core",
             "difflib",
+            "io",
             "logging",
+            "netclient",
+            "numbers",
             "pprint",
-            "shell",
-            "stringold"
+            "stringold",
+            "typing"
         ],
         "files": [
             "${libdir}/python${PYTHON_MAJMIN}/unittest",
@@ -1172,7 +1176,6 @@
         ],
         "files": [
             "${libdir}/python${PYTHON_MAJMIN}/getpass.py",
-            "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/grp.*.so",
             "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/nis.*.so"
         ],
         "cached": [
@@ -1185,9 +1188,7 @@
             "compression",
             "core",
             "logging",
-            "shell",
-            "stringold",
-            "unixadmin"
+            "stringold"
         ],
         "files": [
             "${bindir}/pyvenv*",
diff --git a/poky/meta/recipes-devtools/python/python3/run-ptest b/poky/meta/recipes-devtools/python/python3/run-ptest
index 3e45d39..405b07f 100644
--- a/poky/meta/recipes-devtools/python/python3/run-ptest
+++ b/poky/meta/recipes-devtools/python/python3/run-ptest
@@ -1,3 +1,3 @@
 #!/bin/sh
 
-python3 -m test -v | sed -u -e '/\.\.\. ok/ s/^/PASS: /g' -e '/\.\.\. [ERROR|FAIL]/ s/^/FAIL: /g' -e '/\.\.\. skipped/ s/^/SKIP: /g' -e 's/ \.\.\. ok//g' -e 's/ \.\.\. ERROR//g' -e 's/ \.\.\. FAIL//g' -e 's/ \.\.\. skipped//g'
+python3 -m test -v | sed -u -e '/\.\.\. ok/ s/^/PASS: /g' -r -e '/\.\.\. (ERROR|FAIL)/ s/^/FAIL: /g' -e '/\.\.\. skipped/ s/^/SKIP: /g' -e 's/ \.\.\. ok//g' -e 's/ \.\.\. ERROR//g' -e 's/ \.\.\. FAIL//g' -e 's/ \.\.\. skipped//g'
diff --git a/poky/meta/recipes-devtools/python/python3_3.7.5.bb b/poky/meta/recipes-devtools/python/python3_3.8.2.bb
similarity index 86%
rename from poky/meta/recipes-devtools/python/python3_3.7.5.bb
rename to poky/meta/recipes-devtools/python/python3_3.8.2.bb
index 90914f9..a4a16fd 100644
--- a/poky/meta/recipes-devtools/python/python3_3.7.5.bb
+++ b/poky/meta/recipes-devtools/python/python3_3.8.2.bb
@@ -3,7 +3,7 @@
 LICENSE = "PSFv2"
 SECTION = "devel/python"
 
-LIC_FILES_CHKSUM = "file://LICENSE;md5=e466242989bd33c1bd2b6a526a742498"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=203a6dbc802ee896020a47161e759642"
 
 SRC_URI = "http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.xz \
            file://run-ptest \
@@ -19,8 +19,6 @@
            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://0002-Don-t-do-runtime-test-to-get-float-byte-order.patch \
-           file://0003-setup.py-pass-missing-libraries-to-Extension-for-mul.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 \
@@ -29,26 +27,32 @@
            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-bpo-39503-CVE-2020-8492-Fix-AbstractBasicAuthHandler.patch \
            "
 
 SRC_URI_append_class-native = " \
            file://0001-distutils-sysconfig-append-STAGING_LIBDIR-python-sys.patch \
            file://12-distutils-prefix-is-inside-staging-area.patch \
-           "
-SRC_URI_append_class-nativesdk = " \
-           file://0001-main.c-if-OEPYTHON3HOME-is-set-use-instead-of-PYTHON.patch \
+           file://0001-Don-t-search-system-for-headers-libraries.patch \
            "
 
-SRC_URI[md5sum] = "08ed8030b1183107c48f2092e79a87e2"
-SRC_URI[sha256sum] = "e85a76ea9f3d6c485ec1780fca4e500725a4a7bbc63c78ebc44170de9b619d94"
+SRC_URI[md5sum] = "e9d6ebc92183a177b8e8a58cad5b8d67"
+SRC_URI[sha256sum] = "2646e7dc233362f59714c6193017bb2d6f7b38d6ab4a0cb5fbac5c36c4d845df"
 
 # exclude pre-releases for both python 2.x and 3.x
 UPSTREAM_CHECK_REGEX = "[Pp]ython-(?P<pver>\d+(\.\d+)+).tar"
 
 CVE_PRODUCT = "python"
 
-PYTHON_MAJMIN = "3.7"
-PYTHON_BINABI = "${PYTHON_MAJMIN}m"
+# This is not exploitable when glibc has CVE-2016-10739 fixed.
+CVE_CHECK_WHITELIST += "CVE-2019-18348"
+
+PYTHON_MAJMIN = "3.8"
 
 S = "${WORKDIR}/Python-${PV}"
 
@@ -59,8 +63,8 @@
 MULTILIB_SUFFIX = "${@d.getVar('base_libdir',1).split('/')[-1]}"
 
 ALTERNATIVE_${PN}-dev = "python3-config"
-ALTERNATIVE_LINK_NAME[python3-config] = "${bindir}/python${PYTHON_BINABI}-config"
-ALTERNATIVE_TARGET[python3-config] = "${bindir}/python${PYTHON_BINABI}-config-${MULTILIB_SUFFIX}"
+ALTERNATIVE_LINK_NAME[python3-config] = "${bindir}/python${PYTHON_MAJMIN}-config"
+ALTERNATIVE_TARGET[python3-config] = "${bindir}/python${PYTHON_MAJMIN}-config-${MULTILIB_SUFFIX}"
 
 
 DEPENDS = "bzip2-replacement-native libffi bzip2 openssl sqlite3 zlib virtual/libintl xz virtual/crypt util-linux libtirpc libnsl2"
@@ -131,7 +135,7 @@
 }
 
 do_install_append_class-target() {
-        oe_multilib_header python${PYTHON_BINABI}/pyconfig.h
+        oe_multilib_header python${PYTHON_MAJMIN}/pyconfig.h
 }
 
 do_install_append_class-native() {
@@ -161,7 +165,7 @@
 }
 
 do_install_append_class-nativesdk () {
-    create_wrapper ${D}${bindir}/python${PYTHON_MAJMIN} OEPYTHON3HOME='${prefix}' TERMINFO_DIRS='${sysconfdir}/terminfo:/etc/terminfo:/usr/share/terminfo:/usr/share/misc/terminfo:/lib/terminfo' PYTHONNOUSERSITE='1'
+    create_wrapper ${D}${bindir}/python${PYTHON_MAJMIN} TERMINFO_DIRS='${sysconfdir}/terminfo:/etc/terminfo:/usr/share/terminfo:/usr/share/misc/terminfo:/lib/terminfo' PYTHONNOUSERSITE='1'
 }
 
 SSTATE_SCAN_FILES += "Makefile _sysconfigdata.py"
@@ -175,9 +179,9 @@
                 -e 's:${RECIPE_SYSROOT_NATIVE}::g' \
                 -e 's:${RECIPE_SYSROOT}::g' \
                 -e 's:${BASE_WORKDIR}/${MULTIMACH_TARGET_SYS}::g' \
-                ${PKGD}/${prefix}/lib/python${PYTHON_MAJMIN}/config-${PYTHON_MAJMIN}${PYTHON_ABI}*/Makefile \
+                ${PKGD}/${libdir}/python${PYTHON_MAJMIN}/config-${PYTHON_MAJMIN}${PYTHON_ABI}*/Makefile \
                 ${PKGD}/${libdir}/python${PYTHON_MAJMIN}/_sysconfigdata*.py \
-                ${PKGD}/${bindir}/python${PYTHON_BINABI}-config
+                ${PKGD}/${bindir}/python${PYTHON_MAJMIN}-config
 
         # Reformat _sysconfigdata after modifying it so that it remains
         # reproducible
@@ -196,7 +200,7 @@
              -c "from py_compile import compile; compile('$sysconfigfile', optimize=2)"
         cd -
 
-        mv ${PKGD}/${bindir}/python${PYTHON_BINABI}-config ${PKGD}/${bindir}/python${PYTHON_BINABI}-config-${MULTILIB_SUFFIX}
+        mv ${PKGD}/${bindir}/python${PYTHON_MAJMIN}-config ${PKGD}/${bindir}/python${PYTHON_MAJMIN}-config-${MULTILIB_SUFFIX}
         
         #Remove the unneeded copy of target sysconfig data
         rm -rf ${PKGD}/${libdir}/python-sysconfigdata
@@ -226,6 +230,9 @@
     pn = 'python3'
     rprovides = d.getVar('RPROVIDES').split()
 
+    # ${PN}-misc-native is not in the manifest
+    rprovides.append(pn + '-misc-native')
+
     for key in python_manifest:
         pypackage = pn + '-' + key + '-native'
         if pypackage not in rprovides:
@@ -275,6 +282,7 @@
     packages = newpackages + packages
     d.setVar('PACKAGES', ' '.join(packages))
     d.setVar('ALLOW_EMPTY_${PN}-modules', '1')
+    d.setVar('ALLOW_EMPTY_${PN}-pkgutil', '1')
 }
 
 # Files needed to create a new manifest
@@ -319,7 +327,7 @@
 # package libpython3
 PACKAGES =+ "libpython3 libpython3-staticdev"
 FILES_libpython3 = "${libdir}/libpython*.so.*"
-FILES_libpython3-staticdev += "${prefix}/lib/python${PYTHON_MAJMIN}/config-${PYTHON_BINABI}-*/libpython${PYTHON_BINABI}.a"
+FILES_libpython3-staticdev += "${libdir}/python${PYTHON_MAJMIN}/config-${PYTHON_MAJMIN}-*/libpython${PYTHON_MAJMIN}.a"
 INSANE_SKIP_${PN}-dev += "dev-elf"
 
 # catch all the rest (unsorted)
@@ -333,8 +341,12 @@
 PACKAGES += "${PN}-man"
 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}-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}-dev = ""
 
+RDEPENDS_${PN}-tests_append_class-target = " bash"
+RDEPENDS_${PN}-tests_append_class-nativesdk = " bash"
diff --git a/poky/meta/recipes-devtools/python/python_2.7.17.bb b/poky/meta/recipes-devtools/python/python_2.7.17.bb
deleted file mode 100644
index 5b856a5..0000000
--- a/poky/meta/recipes-devtools/python/python_2.7.17.bb
+++ /dev/null
@@ -1,267 +0,0 @@
-require python.inc
-
-DEPENDS = "python-native libffi bzip2 gdbm openssl \
-           readline sqlite3 zlib virtual/crypt"
-
-DISTRO_SRC_URI ?= "file://sitecustomize.py"
-DISTRO_SRC_URI_linuxstdbase = ""
-SRC_URI += " \
-           file://01-use-proper-tools-for-cross-build.patch \
-           file://03-fix-tkinter-detection.patch \
-           file://06-avoid_usr_lib_termcap_path_in_linking.patch \
-           ${DISTRO_SRC_URI} \
-           file://multilib.patch \
-           file://cgi_py.patch \
-           file://setup_py_skip_cross_import_check.patch \
-           file://add-md5module-support.patch \
-           file://host_include_contamination.patch \
-           file://fix_for_using_different_libdir.patch \
-           file://setuptweaks.patch \
-           file://check-if-target-is-64b-not-host.patch \
-           file://search_db_h_in_inc_dirs_and_avoid_warning.patch \
-           ${@bb.utils.contains('PACKAGECONFIG', 'tk', '', 'file://avoid_warning_about_tkinter.patch', d)} \
-           file://avoid_warning_for_sunos_specific_module.patch \
-           file://python-2.7.3-remove-bsdb-rpath.patch \
-           file://run-ptest \
-           file://parallel-makeinst-create-bindir.patch \
-           file://use_sysroot_ncurses_instead_of_host.patch \
-           file://add-CROSSPYTHONPATH-for-PYTHON_FOR_BUILD.patch \
-           file://pass-missing-libraries-to-Extension-for-mul.patch \
-           file://support_SOURCE_DATE_EPOCH_in_py_compile_2.7.patch \
-           file://float-endian.patch \
-           file://0001-python2-use-cc_basename-to-replace-CC-for-checking-c.patch \
-"
-
-S = "${WORKDIR}/Python-${PV}"
-
-inherit autotools multilib_header python-dir pythonnative ptest
-
-CONFIGUREOPTS += " --with-system-ffi "
-
-EXTRA_OECONF += "ac_cv_file__dev_ptmx=yes ac_cv_file__dev_ptc=no ac_cv_working_tzset=yes"
-
-PACKAGECONFIG ??= "bdb"
-PACKAGECONFIG[bdb] = ",,db"
-PACKAGECONFIG[tk] = ",,tk"
-
-do_configure_append() {
-	rm -f ${S}/Makefile.orig
-        autoreconf -Wcross --verbose --install --force --exclude=autopoint ../Python-${PV}/Modules/_ctypes/libffi
-}
-
-do_compile() {
-        # regenerate platform specific files, because they depend on system headers
-        cd ${S}/Lib/plat-linux2
-        include=${STAGING_INCDIR} ${STAGING_BINDIR_NATIVE}/python-native/python \
-                ${S}/Tools/scripts/h2py.py -i '(u_long)' \
-                ${STAGING_INCDIR}/dlfcn.h \
-                ${STAGING_INCDIR}/linux/cdrom.h \
-                ${STAGING_INCDIR}/netinet/in.h \
-                ${STAGING_INCDIR}/sys/types.h
-        sed -e 's,${STAGING_DIR_HOST},,g' -i *.py
-        cd -
-
-	# remove any bogus LD_LIBRARY_PATH
-	sed -i -e s,RUNSHARED=.*,RUNSHARED=, Makefile
-
-	if [ ! -f Makefile.orig ]; then
-		install -m 0644 Makefile Makefile.orig
-	fi
-	sed -i -e 's#^LDFLAGS=.*#LDFLAGS=${LDFLAGS} -L. -L${STAGING_LIBDIR}#g' \
-		-e 's,libdir=${libdir},libdir=${STAGING_LIBDIR},g' \
-		-e 's,libexecdir=${libexecdir},libexecdir=${STAGING_DIR_HOST}${libexecdir},g' \
-		-e 's,^LIBDIR=.*,LIBDIR=${STAGING_LIBDIR},g' \
-		-e 's,includedir=${includedir},includedir=${STAGING_INCDIR},g' \
-		-e 's,^INCLUDEDIR=.*,INCLUDE=${STAGING_INCDIR},g' \
-		-e 's,^CONFINCLUDEDIR=.*,CONFINCLUDE=${STAGING_INCDIR},g' \
-		Makefile
-	# save copy of it now, because if we do it in do_install and 
-	# then call do_install twice we get Makefile.orig == Makefile.sysroot
-	install -m 0644 Makefile Makefile.sysroot
-
-	export CROSS_COMPILE="${TARGET_PREFIX}"
-	export PYTHONBUILDDIR="${B}"
-
-	oe_runmake HOSTPGEN=${STAGING_BINDIR_NATIVE}/python-native/pgen \
-		HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python-native/python \
-		STAGING_LIBDIR=${STAGING_LIBDIR} \
-		STAGING_INCDIR=${STAGING_INCDIR} \
-		STAGING_BASELIBDIR=${STAGING_BASELIBDIR} \
-		OPT="${CFLAGS}"
-}
-
-do_install() {
-	# make install needs the original Makefile, or otherwise the inclues would
-	# go to ${D}${STAGING...}/...
-	install -m 0644 Makefile.orig Makefile
-
-	export CROSS_COMPILE="${TARGET_PREFIX}"
-	export PYTHONBUILDDIR="${B}"
-
-	# After swizzling the makefile, we need to run the build again.
-	# install can race with the build so we have to run this first, then install
-	oe_runmake HOSTPGEN=${STAGING_BINDIR_NATIVE}/python-native/pgen \
-		HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python-native/python \
-		CROSSPYTHONPATH=${STAGING_LIBDIR_NATIVE}/python${PYTHON_MAJMIN}/lib-dynload/ \
-		STAGING_LIBDIR=${STAGING_LIBDIR} \
-		STAGING_INCDIR=${STAGING_INCDIR} \
-		STAGING_BASELIBDIR=${STAGING_BASELIBDIR} \
-		DESTDIR=${D} LIBDIR=${libdir}
-	
-	oe_runmake HOSTPGEN=${STAGING_BINDIR_NATIVE}/python-native/pgen \
-		HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python-native/python \
-		CROSSPYTHONPATH=${STAGING_LIBDIR_NATIVE}/python${PYTHON_MAJMIN}/lib-dynload/ \
-		STAGING_LIBDIR=${STAGING_LIBDIR} \
-		STAGING_INCDIR=${STAGING_INCDIR} \
-		STAGING_BASELIBDIR=${STAGING_BASELIBDIR} \
-		DESTDIR=${D} LIBDIR=${libdir} install
-
-	install -m 0644 Makefile.sysroot ${D}/${libdir}/python${PYTHON_MAJMIN}/config/Makefile
-
-	if [ -e ${WORKDIR}/sitecustomize.py ]; then
-		install -m 0644 ${WORKDIR}/sitecustomize.py ${D}/${libdir}/python${PYTHON_MAJMIN}
-	fi
-
-	oe_multilib_header python${PYTHON_MAJMIN}/pyconfig.h
-
-    if [ -z "${@bb.utils.filter('PACKAGECONFIG', 'bdb', d)}" ]; then
-        rm -rf ${D}/${libdir}/python${PYTHON_MAJMIN}/bsddb
-    fi
-
-    # Python 3.x version of 2to3 is now the default
-    mv ${D}/${bindir}/2to3 ${D}/${bindir}/2to3-${PYTHON_MAJMIN}
-}
-
-do_install_append_class-nativesdk () {
-	create_wrapper ${D}${bindir}/python2.7 PYTHONHOME='${prefix}' TERMINFO_DIRS='${sysconfdir}/terminfo:/etc/terminfo:/usr/share/terminfo:/usr/share/misc/terminfo:/lib/terminfo' PYTHONNOUSERSITE='1'
-}
-
-SSTATE_SCAN_FILES += "Makefile"
-PACKAGE_PREPROCESS_FUNCS += "py_package_preprocess"
-
-py_package_preprocess () {
-	# copy back the old Makefile to fix target package
-	install -m 0644 ${B}/Makefile.orig ${PKGD}/${libdir}/python${PYTHON_MAJMIN}/config/Makefile
-
-	# Remove references to buildmachine paths in target Makefile and _sysconfigdata
-	sed -i -e 's:--sysroot=${STAGING_DIR_TARGET}::g' -e s:'--with-libtool-sysroot=${STAGING_DIR_TARGET}'::g \
-		-e 's|${DEBUG_PREFIX_MAP}||g' \
-		-e 's:${HOSTTOOLS_DIR}/::g' \
-		-e 's:${RECIPE_SYSROOT_NATIVE}::g' \
-		-e 's:${RECIPE_SYSROOT}::g' \
-		-e 's:${BASE_WORKDIR}/${MULTIMACH_TARGET_SYS}::g' \
-		${PKGD}/${libdir}/python${PYTHON_MAJMIN}/config/Makefile \
-		${PKGD}/${libdir}/python${PYTHON_MAJMIN}/_sysconfigdata.py
-	(cd ${PKGD}; python -m py_compile ./${libdir}/python${PYTHON_MAJMIN}/_sysconfigdata.py)
-}
-
-PACKAGES_remove = "${PN}"
-
-# manual dependency additions
-RPROVIDES_${PN}-modules = "${PN}"
-RRECOMMENDS_${PN}-core_append_class-nativesdk = " nativesdk-python-modules"
-RRECOMMENDS_${PN}-crypt = "openssl"
-
-# package libpython2
-PACKAGES =+ "lib${BPN}2"
-FILES_lib${BPN}2 = "${libdir}/libpython*.so.*"
-
-# catch all the rest (unsorted)
-PACKAGES += "${PN}-misc"
-FILES_${PN}-misc = "${libdir}/python${PYTHON_MAJMIN}"
-RDEPENDS_${PN}-modules += "${PN}-misc"
-
-# ptest
-RDEPENDS_${PN}-ptest = "${PN}-modules ${PN}-tests unzip tzdata-europe coreutils sed"
-RDEPENDS_${PN}-tkinter += "${@bb.utils.contains('PACKAGECONFIG', 'tk', 'tk tk-lib', '', d)}"
-# catch manpage
-PACKAGES += "${PN}-man"
-FILES_${PN}-man = "${datadir}/man"
-
-# Nasty but if bdb isn't enabled the package won't be generated
-RDEPENDS_${PN}-modules_remove = "${@bb.utils.contains('PACKAGECONFIG', 'bdb', '', '${PN}-bsddb', d)}"
-
-RDEPENDS_${PN}-dev = ""
-
-BBCLASSEXTEND = "nativesdk"
-
-# We want bytecode precompiled .py files (.pyc's) by default
-# but the user may set it on their own conf
-
-INCLUDE_PYCS ?= "1"
-
-python(){
-    import collections, json
-
-    filename = os.path.join(d.getVar('THISDIR'), 'python', 'python2-manifest.json')
-    # This python changes the datastore based on the contents of a file, so mark
-    # that dependency.
-    bb.parse.mark_dependency(d, filename)
-
-    with open(filename) as manifest_file:
-        manifest_str =  manifest_file.read()
-        json_start = manifest_str.find('# EOC') + 6
-        manifest_file.seek(json_start)
-        manifest_str = manifest_file.read()
-        python_manifest = json.loads(manifest_str, object_pairs_hook=collections.OrderedDict)
-
-    include_pycs = d.getVar('INCLUDE_PYCS')
-
-    packages = d.getVar('PACKAGES').split()
-    pn = d.getVar('PN')
-
-    newpackages=[]
-
-    for key in python_manifest:
-        pypackage= pn + '-' + key
-
-        if pypackage not in packages:
-            # We need to prepend, otherwise python-misc gets everything
-            # so we use a new variable
-            newpackages.append(pypackage)
-
-        # "Build" python's manifest FILES, RDEPENDS and SUMMARY
-        d.setVar('FILES_' + pypackage, '')
-        for value in python_manifest[key]['files']:
-            d.appendVar('FILES_' + pypackage, ' ' + value)
-            if include_pycs == '1':
-                if value.endswith('.py'):
-                    d.appendVar('FILES_' + pypackage, ' ' + value + 'c')
-
-        for value in python_manifest[key]['rdepends']:
-            # Make it work with or without $PN
-            if '${PN}' in value:
-                value=value.split('-')[1]
-            d.appendVar('RDEPENDS_' + pypackage, ' ' + pn + '-' + value)
-        d.setVar('SUMMARY_' + pypackage, python_manifest[key]['summary'])
-
-    # Prepending so to avoid python-misc getting everything
-    packages = newpackages + packages
-    d.setVar('PACKAGES', ' '.join(packages))
-    d.setVar('ALLOW_EMPTY_${PN}-modules', '1')
-}
-
-# Files needed to create a new manifest
-SRC_URI += "file://create_manifest2.py file://get_module_deps2.py file://python2-manifest.json"
-
-do_create_manifest() {
-    # This task should be run with every new release of Python.
-    # We must ensure that PACKAGECONFIG enables everything when creating
-    # a new manifest, this is to base our new manifest on a complete
-    # native python build, containing all dependencies, otherwise the task
-    # wont be able to find the required files.
-    # e.g. BerkeleyDB is an optional build dependency so it may or may not
-    # be present, we must ensure it is.
-
-    cd ${WORKDIR}
-    # This needs to be executed by python-native and NOT by HOST's python
-    nativepython create_manifest2.py
-    cp python2-manifest.json.new ${THISDIR}/python/python2-manifest.json
-}
-
-# bitbake python -c create_manifest
-addtask do_create_manifest
-
-# Make sure we have native python ready when we create a new manifest
-do_create_manifest[depends] += "python:do_prepare_recipe_sysroot"
-do_create_manifest[depends] += "python:do_patch"