<html><head><meta http-equiv="Content-Type" content="text/html; charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><br class=""><div><br class=""><blockquote type="cite" class=""><div class="">Am 02.11.2018 um 16:57 schrieb Burton, Ross <<a href="mailto:ross.burton@intel.com" class="">ross.burton@intel.com</a>>:</div><br class="Apple-interchange-newline"><div class=""><div class="">It appears that Python 3.6 or 3.7 removed os.errno as an alias for<br class="">errno, as this is failing in wic:<br class=""><br class="">| File "/home/ross/Yocto/poky/scripts/lib/wic/filemap.py", line 397,<br class="">in _invoke_fiemap<br class="">| if err.errno == os.errno.EOPNOTSUPP:<br class="">| AttributeError: module 'os' has no attribute 'errno'<br class=""><br class="">Easily fixed, but obviously this wasn't used to build a wic image<br class="">with. How much testing has this upgrade had?<br class=""></div></div></blockquote><div><br class=""></div><div>v8 didn't had the same amount of testing as v5 had - I built a lot of images</div><div>using wic with v5 (and run some python3 scripts on target).</div><div>But I can't say which python was used by that test ...</div><div><br class=""></div><div>However - I detected I made a mistake somewhere between v3 and v4</div><div>during rebase (which explains why Alejandro is still complaining ...), so</div><div>I decided instead of doing a v9 I go ahead to 3.7.1 update ...</div><div><br class=""></div><div>Are there some reasonable tests I can run on legacy code to see what</div><div>needs updates after that?</div><div><br class=""></div><div>Cheers,</div><div>Jens</div><br class=""><blockquote type="cite" class=""><div class=""><div class="">Ross<br class="">On Wed, 31 Oct 2018 at 14:47, Jens Rehsack <<a href="mailto:sno@netbsd.org" class="">sno@netbsd.org</a>> wrote:<br class=""><blockquote type="cite" class=""><br class="">Update python3 to recent 3.7.0 release.<br class=""><br class="">Details about new features and bug-fixes can be taken from<br class="">* <a href="https://docs.python.org/3/whatsnew/3.7.html" class="">https://docs.python.org/3/whatsnew/3.7.html</a><br class="">* <a href="https://docs.python.org/3/whatsnew/3.6.html" class="">https://docs.python.org/3/whatsnew/3.6.html</a><br class=""><br class="">Remove patches when they were fixed upstream and rebase the<br class="">remaining ones. If necessary, the patches are adopted to<br class="">keep the idea when upstream code was changed. Also remove<br class="">backports from 3.6 and 3.7 into 3.5.6 codebase for TLS<br class="">and multiprocessing.<br class=""><br class="">Open TODO: track patches in a -STABLE rebased git branch for<br class="">easier rebasing or upstream submitting.<br class=""><br class="">Enhancement requests for Yocto project<br class="">* <a href="https://bugzilla.yoctoproject.org/show_bug.cgi?id=12375" class="">https://bugzilla.yoctoproject.org/show_bug.cgi?id=12375</a><br class="">* <a href="https://bugzilla.yoctoproject.org/show_bug.cgi?id=12901" class="">https://bugzilla.yoctoproject.org/show_bug.cgi?id=12901</a><br class="">are solved by this.<br class=""><br class="">Rebased until e349b239c8833bcdad9b1ff1a0702ace2db71959<br class=""><br class="">Signed-off-by: Jens Rehsack <<a href="mailto:sno@netbsd.org" class="">sno@netbsd.org</a>><br class="">---<br class=""> meta/classes/python3-dir.bbclass | 6 +-<br class=""> .../python/python3-native_3.5.6.bb | 100 ------<br class=""> .../python/python3-native_3.7.0.bb | 73 ++++<br class=""> meta/recipes-devtools/python/python3.inc | 65 +++-<br class=""> ...hell-version-of-python-config-that-w.patch | 21 +-<br class=""> ..._sysconfigdata.py-to-initialize-dist.patch | 66 ----<br class=""> ...ontext-has-improved-default-settings.patch | 272 ---------------<br class=""> ...d-target-to-split-profile-generation.patch | 40 ---<br class=""> ...S-1.3-cipher-suites-and-OP_NO_TLSv1_.patch | 227 ------------<br class=""> ...for-TLS-1.3-and-OpenSSL-1.1.1-GH-876.patch | 173 ---------<br class=""> ....3-ciphers-for-OpenSSL-1.1.1-GH-6976.patch | 110 ------<br class=""> ...ALPN-changes-for-OpenSSL-1.1.0f-2305.patch | 68 ----<br class=""> .../python3/03-fix-tkinter-detection.patch | 12 +-<br class=""> .../python3/030-fixup-include-dirs.patch | 9 -<br class=""> .../080-distutils-dont_adjust_files.patch | 4 +-<br class=""> .../python/python3/150-fix-setupterm.patch | 17 -<br class=""> ...GS-for-extensions-when-cross-compili.patch | 53 ++-<br class=""> .../python3/avoid-ncursesw-include-path.patch | 18 +-<br class=""> .../python3/avoid_warning_about_tkinter.patch | 18 +-<br class=""> .../python3/configure.ac-fix-LIBPL.patch | 21 +-<br class=""> .../python/python3/float-endian.patch | 9 +-<br class=""> ...ssing-libraries-to-Extension-for-mul.patch | 26 +-<br class=""> .../python/python3/python-3.3-multilib.patch | 241 +++++++------<br class=""> .../python/python3/python3-manifest.json | 35 +-<br class=""> ...CROSSPYTHONPATH-for-PYTHON_FOR_BUILD.patch | 17 +-<br class=""> .../python/python3/regen-all.patch | 25 --<br class=""> .../python/python3/signal.patch | 56 ---<br class=""> ...port_SOURCE_DATE_EPOCH_in_py_compile.patch | 36 +-<br class=""> .../python3/sysroot-include-headers.patch | 23 +-<br class=""> .../python3/uuid_when_cross_compiling.patch | 24 ++<br class=""> meta/recipes-devtools/python/python3_3.5.6.bb | 329 ------------------<br class=""> meta/recipes-devtools/python/python3_3.7.0.bb | 300 ++++++++++++++++<br class=""> 32 files changed, 723 insertions(+), 1771 deletions(-)<br class=""> delete mode 100644 meta/recipes-devtools/python/python3-native_3.5.6.bb<br class=""> create mode 100644 meta/recipes-devtools/python/python3-native_3.7.0.bb<br class=""> delete mode 100644 meta/recipes-devtools/python/python3/0001-Issue-21272-Use-_sysconfigdata.py-to-initialize-dist.patch<br class=""> delete mode 100644 meta/recipes-devtools/python/python3/0001-Issue-28043-SSLContext-has-improved-default-settings.patch<br class=""> delete mode 100644 meta/recipes-devtools/python/python3/0002-Makefile-add-target-to-split-profile-generation.patch<br class=""> delete mode 100644 meta/recipes-devtools/python/python3/0002-bpo-29136-Add-TLS-1.3-cipher-suites-and-OP_NO_TLSv1_.patch<br class=""> delete mode 100644 meta/recipes-devtools/python/python3/0003-bpo-32947-Fixes-for-TLS-1.3-and-OpenSSL-1.1.1-GH-876.patch<br class=""> delete mode 100644 meta/recipes-devtools/python/python3/0004-bpo-33570-TLS-1.3-ciphers-for-OpenSSL-1.1.1-GH-6976.patch<br class=""> delete mode 100644 meta/recipes-devtools/python/python3/0005-bpo-30714-ALPN-changes-for-OpenSSL-1.1.0f-2305.patch<br class=""> delete mode 100644 meta/recipes-devtools/python/python3/150-fix-setupterm.patch<br class=""> delete mode 100644 meta/recipes-devtools/python/python3/regen-all.patch<br class=""> delete mode 100644 meta/recipes-devtools/python/python3/signal.patch<br class=""> create mode 100644 meta/recipes-devtools/python/python3/uuid_when_cross_compiling.patch<br class=""> delete mode 100644 meta/recipes-devtools/python/python3_3.5.6.bb<br class=""> create mode 100644 meta/recipes-devtools/python/python3_3.7.0.bb<br class=""><br class="">diff --git a/meta/classes/python3-dir.bbclass b/meta/classes/python3-dir.bbclass<br class="">index 06bb046d9c..ad7ea8dd9a 100644<br class="">--- a/meta/classes/python3-dir.bbclass<br class="">+++ b/meta/classes/python3-dir.bbclass<br class="">@@ -1,4 +1,8 @@<br class="">-PYTHON_BASEVERSION = "3.5"<br class="">+PYTHON_BASEVERSION = "3.7"<br class="">+# [d][m][u]<br class="">+# d: py_debug<br class="">+# m: my_malloc<br class="">+# u: wide-char unicode<br class=""> PYTHON_ABI = "m"<br class=""> PYTHON_DIR = "python${PYTHON_BASEVERSION}"<br class=""> PYTHON_PN = "python3"<br class="">diff --git a/meta/recipes-devtools/python/python3-native_3.5.6.bb b/meta/recipes-devtools/python/python3-native_3.5.6.bb<br class="">deleted file mode 100644<br class="">index d5953cf4bb..0000000000<br class="">--- a/meta/recipes-devtools/python/python3-native_3.5.6.bb<br class="">+++ /dev/null<br class="">@@ -1,100 +0,0 @@<br class="">-require recipes-devtools/python/python3.inc<br class="">-<br class="">-DISTRO_SRC_URI ?= "<a href="file://sitecustomize.py" class="">file://sitecustomize.py</a>"<br class="">-DISTRO_SRC_URI_linuxstdbase = ""<br class="">-SRC_URI = "<a href="http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.xz" class="">http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.xz</a> \<br class="">-<a href="file://12-distutils-prefix-is-inside-staging-area.patch" class="">file://12-distutils-prefix-is-inside-staging-area.patch</a> \<br class="">-<a href="file://python-config.patch" class="">file://python-config.patch</a> \<br class="">-<a href="file://030-fixup-include-dirs.patch" class="">file://030-fixup-include-dirs.patch</a> \<br class="">-<a href="file://070-dont-clean-ipkg-install.patch" class="">file://070-dont-clean-ipkg-install.patch</a> \<br class="">-<a href="file://080-distutils-dont_adjust_files.patch" class="">file://080-distutils-dont_adjust_files.patch</a> \<br class="">-<a href="file://130-readline-setup.patch" class="">file://130-readline-setup.patch</a> \<br class="">-<a href="file://150-fix-setupterm.patch" class="">file://150-fix-setupterm.patch</a> \<br class="">-<a href="file://python-3.3-multilib.patch" class="">file://python-3.3-multilib.patch</a> \<br class="">-<a href="file://03-fix-tkinter-detection.patch" class="">file://03-fix-tkinter-detection.patch</a> \<br class="">-<a href="file://avoid_warning_about_tkinter.patch" class="">file://avoid_warning_about_tkinter.patch</a> \<br class="">-<a href="file://0001-h2py-Fix-issue-13032-where-it-fails-with-UnicodeDeco.patch" class="">file://0001-h2py-Fix-issue-13032-where-it-fails-with-UnicodeDeco.patch</a> \<br class="">-<a href="file://sysroot-include-headers.patch" class="">file://sysroot-include-headers.patch</a> \<br class="">-<a href="file://unixccompiler.patch" class="">file://unixccompiler.patch</a> \<br class="">-${DISTRO_SRC_URI} \<br class="">-<a href="file://sysconfig.py-add-_PYTHON_PROJECT_SRC.patch" class="">file://sysconfig.py-add-_PYTHON_PROJECT_SRC.patch</a> \<br class="">-<a href="file://setup.py-check-cross_compiling-when-get-FLAGS.patch" class="">file://setup.py-check-cross_compiling-when-get-FLAGS.patch</a> \<br class="">-<a href="file://0001-Do-not-use-the-shell-version-of-python-config-that-w.patch" class="">file://0001-Do-not-use-the-shell-version-of-python-config-that-w.patch</a> \<br class="">-<a href="file://support_SOURCE_DATE_EPOCH_in_py_compile.patch" class="">file://support_SOURCE_DATE_EPOCH_in_py_compile.patch</a> \<br class="">-<a href="file://regen-all.patch" class="">file://regen-all.patch</a> \<br class="">-<a href="file://0001-Issue-28043-SSLContext-has-improved-default-settings.patch" class="">file://0001-Issue-28043-SSLContext-has-improved-default-settings.patch</a> \<br class="">-<a href="file://0002-bpo-29136-Add-TLS-1.3-cipher-suites-and-OP_NO_TLSv1_.patch" class="">file://0002-bpo-29136-Add-TLS-1.3-cipher-suites-and-OP_NO_TLSv1_.patch</a> \<br class="">-<a href="file://0003-bpo-32947-Fixes-for-TLS-1.3-and-OpenSSL-1.1.1-GH-876.patch" class="">file://0003-bpo-32947-Fixes-for-TLS-1.3-and-OpenSSL-1.1.1-GH-876.patch</a> \<br class="">-<a href="file://0004-bpo-33570-TLS-1.3-ciphers-for-OpenSSL-1.1.1-GH-6976.patch" class="">file://0004-bpo-33570-TLS-1.3-ciphers-for-OpenSSL-1.1.1-GH-6976.patch</a> \<br class="">-<a href="file://0005-bpo-30714-ALPN-changes-for-OpenSSL-1.1.0f-2305.patch" class="">file://0005-bpo-30714-ALPN-changes-for-OpenSSL-1.1.0f-2305.patch</a> \<br class="">-"<br class="">-<br class="">-EXTRANATIVEPATH += "bzip2-native"<br class="">-DEPENDS = "openssl-native bzip2-replacement-native zlib-native readline-native sqlite3-native gdbm-native"<br class="">-<br class="">-inherit native<br class="">-<br class="">-EXTRA_OECONF_append = " --bindir=${bindir}/${PN} --without-ensurepip"<br class="">-<br class="">-EXTRA_OEMAKE = '\<br class="">- LIBC="" \<br class="">- STAGING_LIBDIR=${STAGING_LIBDIR_NATIVE} \<br class="">- STAGING_INCDIR=${STAGING_INCDIR_NATIVE} \<br class="">- LIB=${baselib} \<br class="">- ARCH=${TARGET_ARCH} \<br class="">-'<br class="">-<br class="">-do_configure_append() {<br class="">- autoreconf --verbose --install --force --exclude=autopoint ../Python-${PV}/Modules/_ctypes/libffi<br class="">- sed -i -e 's,#define HAVE_GETRANDOM 1,/\* #undef HAVE_GETRANDOM \*/,' ${B}/pyconfig.h<br class="">-}<br class="">-<br class="">-# Regenerate all of the generated files<br class="">-# This ensures that pgen and friends get created during the compile phase<br class="">-#<br class="">-do_compile_prepend() {<br class="">- # Assuming <a href="https://bugs.python.org/issue33080" class="">https://bugs.python.org/issue33080</a> has been addressed in Makefile.<br class="">- oe_runmake regen-all<br class="">-}<br class="">-<br class="">-do_install() {<br class="">- install -d ${D}${libdir}/pkgconfig<br class="">- oe_runmake 'DESTDIR=${D}' install<br class="">- if [ -e ${WORKDIR}/sitecustomize.py ]; then<br class="">- install -m 0644 ${WORKDIR}/sitecustomize.py ${D}/${libdir}/python${PYTHON_MAJMIN}<br class="">- fi<br class="">- install -d ${D}${bindir}/${PN}<br class="">- install -m 0755 Parser/pgen ${D}${bindir}/${PN}<br class="">-<br class="">- # Make sure we use /usr/bin/env python<br class="">- for PYTHSCRIPT in `grep -rIl ${bindir}/${PN}/python ${D}${bindir}/${PN}`; do<br class="">- sed -i -e '1s|^#!.*|#!/usr/bin/env python3|' $PYTHSCRIPT<br class="">- done<br class="">-<br class="">- # Add a symlink to the native Python so that scripts can just invoke<br class="">- # "nativepython" and get the right one without needing absolute paths<br class="">- # (these often end up too long for the #! parser in the kernel as the<br class="">- # buffer is 128 bytes long).<br class="">- ln -s python3-native/python3 ${D}${bindir}/nativepython3<br class="">-}<br class="">-<br class="">-python(){<br class="">-<br class="">- # Read JSON manifest<br class="">- import json<br class="">- pythondir = d.getVar('THISDIR',True)<br class="">- with open(pythondir+'/python3/python3-manifest.json') as manifest_file:<br class="">- python_manifest=json.load(manifest_file)<br class="">-<br class="">- rprovides = d.getVar('RPROVIDES').split()<br class="">-<br class="">- # Hardcoded since it cant be python3-native-foo, should be python3-foo-native<br class="">- pn = 'python3'<br class="">-<br class="">- for key in python_manifest:<br class="">- pypackage = pn + '-' + key + '-native'<br class="">- if pypackage not in rprovides:<br class="">- rprovides.append(pypackage)<br class="">-<br class="">- d.setVar('RPROVIDES', ' '.join(rprovides))<br class="">-}<br class="">diff --git a/meta/recipes-devtools/python/python3-native_3.7.0.bb b/meta/recipes-devtools/python/python3-native_3.7.0.bb<br class="">new file mode 100644<br class="">index 0000000000..3ef9f0a5e3<br class="">--- /dev/null<br class="">+++ b/meta/recipes-devtools/python/python3-native_3.7.0.bb<br class="">@@ -0,0 +1,73 @@<br class="">+require recipes-devtools/python/python3.inc<br class="">+<br class="">+SRC_URI += "\<br class="">+ <a href="file:///12-distutils-prefix-is-inside-staging-area.patch" class="">file://12-distutils-prefix-is-inside-staging-area.patch</a> \<br class="">+ <a href="file:///0001-Do-not-use-the-shell-version-of-python-config-that-w.patch" class="">file://0001-Do-not-use-the-shell-version-of-python-config-that-w.patch</a> \<br class="">+"<br class="">+<br class="">+EXTRANATIVEPATH += "bzip2-native"<br class="">+DEPENDS = "openssl-native libffi-native bzip2-replacement-native zlib-native \<br class="">+ util-linux-native readline-native sqlite3-native gdbm-native \<br class="">+"<br class="">+<br class="">+inherit native<br class="">+<br class="">+EXTRA_OECONF_append = " --bindir=${bindir}/${PN} --without-ensurepip"<br class="">+<br class="">+EXTRA_OEMAKE = '\<br class="">+ LIBC="" \<br class="">+ STAGING_LIBDIR=${STAGING_LIBDIR_NATIVE} \<br class="">+ STAGING_INCDIR=${STAGING_INCDIR_NATIVE} \<br class="">+ LIB=${baselib} \<br class="">+ ARCH=${TARGET_ARCH} \<br class="">+'<br class="">+<br class="">+# Regenerate all of the generated files<br class="">+# This ensures that pgen and friends get created during the compile phase<br class="">+#<br class="">+do_compile_prepend() {<br class="">+ # Assuming <a href="https://bugs.python.org/issue33080" class="">https://bugs.python.org/issue33080</a> has been addressed in Makefile.<br class="">+ oe_runmake regen-all<br class="">+}<br class="">+<br class="">+do_install() {<br class="">+ install -d ${D}${libdir}/pkgconfig<br class="">+ oe_runmake 'DESTDIR=${D}' install<br class="">+ if [ -e ${WORKDIR}/sitecustomize.py ]; then<br class="">+ install -m 0644 ${WORKDIR}/sitecustomize.py ${D}/${libdir}/python${PYTHON_MAJMIN}<br class="">+ fi<br class="">+ install -d ${D}${bindir}/${PN}<br class="">+ install -m 0755 Parser/pgen ${D}${bindir}/${PN}<br class="">+<br class="">+ # Make sure we use /usr/bin/env python<br class="">+ for PYTHSCRIPT in `grep -rIl ${bindir}/${PN}/python ${D}${bindir}/${PN}`; do<br class="">+ sed -i -e '1s|^#!.*|#!/usr/bin/env python3|' $PYTHSCRIPT<br class="">+ done<br class="">+<br class="">+ # Add a symlink to the native Python so that scripts can just invoke<br class="">+ # "nativepython" and get the right one without needing absolute paths<br class="">+ # (these often end up too long for the #! parser in the kernel as the<br class="">+ # buffer is 128 bytes long).<br class="">+ ln -s python3-native/python3 ${D}${bindir}/nativepython3<br class="">+}<br class="">+<br class="">+python(){<br class="">+<br class="">+ # Read JSON manifest<br class="">+ import json<br class="">+ pythondir = d.getVar('THISDIR',True)<br class="">+ with open(pythondir+'/python3/python3-manifest.json') as manifest_file:<br class="">+ python_manifest=json.load(manifest_file)<br class="">+<br class="">+ rprovides = d.getVar('RPROVIDES').split()<br class="">+<br class="">+ # Hardcoded since it cant be python3-native-foo, should be python3-foo-native<br class="">+ pn = 'python3'<br class="">+<br class="">+ for key in python_manifest:<br class="">+ pypackage = pn + '-' + key + '-native'<br class="">+ if pypackage not in rprovides:<br class="">+ rprovides.append(pypackage)<br class="">+<br class="">+ d.setVar('RPROVIDES', ' '.join(rprovides))<br class="">+}<br class="">diff --git a/meta/recipes-devtools/python/python3.inc b/meta/recipes-devtools/python/python3.inc<br class="">index f565b3f171..b0fc0144a4 100644<br class="">--- a/meta/recipes-devtools/python/python3.inc<br class="">+++ b/meta/recipes-devtools/python/python3.inc<br class="">@@ -3,41 +3,74 @@ HOMEPAGE = "<a href="http://www.python.org" class="">http://www.python.org</a>"<br class=""> LICENSE = "PSFv2"<br class=""> SECTION = "devel/python"<br class=""><br class="">-# TODO Remove this when we upgrade<br class="">-INC_PR = "r1"<br class="">-PR = "${INC_PR}.0"<br class="">+PYTHON_MAJMIN = "3.7"<br class="">+DISTRO_SRC_URI ?= "<a href="file://sitecustomize.py" class="">file://sitecustomize.py</a>"<br class="">+DISTRO_SRC_URI_linuxstdbase = ""<br class="">+SRC_URI = "<a href="http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.xz" class="">http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.xz</a> \<br class="">+ <a href="file:///python-config.patch" class="">file://python-config.patch</a> \<br class="">+ <a href="file:///python-3.3-multilib.patch" class="">file://python-3.3-multilib.patch</a> \<br class="">+ <a href="file:///03-fix-tkinter-detection.patch" class="">file://03-fix-tkinter-detection.patch</a> \<br class="">+ <a href="file:///avoid_warning_about_tkinter.patch" class="">file://avoid_warning_about_tkinter.patch</a> \<br class="">+ <a href="file:///unixccompiler.patch" class="">file://unixccompiler.patch</a> \<br class="">+ <a href="file:///sysroot-include-headers.patch" class="">file://sysroot-include-headers.patch</a> \<br class="">+ <a href="file:///sysconfig.py-add-_PYTHON_PROJECT_SRC.patch" class="">file://sysconfig.py-add-_PYTHON_PROJECT_SRC.patch</a> \<br class="">+ <a href="file:///setup.py-check-cross_compiling-when-get-FLAGS.patch" class="">file://setup.py-check-cross_compiling-when-get-FLAGS.patch</a> \<br class="">+ <a href="file:///030-fixup-include-dirs.patch" class="">file://030-fixup-include-dirs.patch</a> \<br class="">+ <a href="file:///070-dont-clean-ipkg-install.patch" class="">file://070-dont-clean-ipkg-install.patch</a> \<br class="">+ <a href="file:///080-distutils-dont_adjust_files.patch" class="">file://080-distutils-dont_adjust_files.patch</a> \<br class="">+ <a href="file:///130-readline-setup.patch" class="">file://130-readline-setup.patch</a> \<br class="">+ <a href="file:///0001-h2py-Fix-issue-13032-where-it-fails-with-UnicodeDeco.patch" class="">file://0001-h2py-Fix-issue-13032-where-it-fails-with-UnicodeDeco.patch</a> \<br class="">+ ${DISTRO_SRC_URI} \<br class="">+ <a href="file:///support_SOURCE_DATE_EPOCH_in_py_compile.patch" class="">file://support_SOURCE_DATE_EPOCH_in_py_compile.patch</a> \<br class="">+ <a href="file:///Use-correct-CFLAGS-for-extensions-when-cross-compili.patch" class="">file://Use-correct-CFLAGS-for-extensions-when-cross-compili.patch</a> \<br class="">+"<br class=""><br class="">-LIC_FILES_CHKSUM = "<a href="file://LICENSE;md5=b6ec515b22618f55fa07276b897bacea" class="">file://LICENSE;md5=b6ec515b22618f55fa07276b897bacea</a>"<br class="">+SRC_URI[md5sum] = "eb8c2a6b1447d50813c02714af4681f3"<br class="">+SRC_URI[sha256sum] = "0382996d1ee6aafe59763426cf0139ffebe36984474d0ec4126dd1c40a8b3549"<br class=""><br class="">-# TODO consolidate patch set<br class="">-SRC_URI[md5sum] = "f5a99f765e765336a3ebbb2a24ca2be3"<br class="">-SRC_URI[sha256sum] = "f55cde04f521f273c7cba08912921cc5642cfc15ca7b22d5829f0aff4371155f"<br class="">+LIC_FILES_CHKSUM = "<a href="file://LICENSE;md5=f257cc14f81685691652a3d3e1b5d754" class="">file://LICENSE;md5=f257cc14f81685691652a3d3e1b5d754</a>"<br class=""><br class=""> # exclude pre-releases for both python 2.x and 3.x<br class=""> UPSTREAM_CHECK_REGEX = "[Pp]ython-(?P<pver>\d+(\.\d+)+).tar"<br class=""><br class="">-CVE_PRODUCT = "python"<br class="">-<br class="">-PYTHON_MAJMIN = "3.5"<br class="">-PYTHON_BINABI = "${PYTHON_MAJMIN}m"<br class="">-<br class=""> S = "${WORKDIR}/Python-${PV}"<br class=""><br class="">-inherit autotools bluetooth pkgconfig<br class="">+CVE_PRODUCT = "python"<br class="">+<br class="">+inherit autotools bluetooth pkgconfig python3-dir<br class=""><br class=""> EXTRA_OECONF = "\<br class="">- --with-threads \<br class=""> --with-pymalloc \<br class=""> --without-cxx-main \<br class="">- --with-signal-module \<br class=""> --enable-shared \<br class=""> --<a href="mailto:enable-ipv6=${@bb.utils.contains" class="">enable-ipv6=${@bb.utils.contains</a>('DISTRO_FEATURES', 'ipv6', 'yes', 'no', d)} \<br class=""> "<br class=""><br class=""> PACKAGECONFIG[bluetooth] = ",ac_cv_header_bluetooth_bluetooth_h=no ac_cv_header_bluetooth_h=no,${BLUEZ}"<br class=""><br class="">+do_configure_prepend() {<br class="">+ libdirleaf="$(echo ${libdir} | sed -e 's:${prefix}/::')"<br class="">+ sed -i -e "s:SEDMELIBLEAF:${libdirleaf}:g" \<br class="">+ ${S}/configure.ac<br class="">+}<br class="">+<br class="">+do_install_prepend() {<br class="">+ MAKESETTINGS="$(egrep '^(ABIFLAGS|MULTIARCH)=' ${B}/Makefile | sed -E -e 's/[[:space:]]//g' -e 's/=/="/' -e 's/$/"/')"<br class="">+ eval ${MAKESETTINGS}<br class="">+ if test "${ABIFLAGS}" != "${PYTHON_ABI}"; then<br class="">+ die "do_install: configure determined ABIFLAGS '${ABIFLAGS}' != '${PYTHON_ABI}' from python3-dir.bbclass"<br class="">+ fi<br class="">+ if test "x${BUILD_OS}" = "x${TARGET_OS}"; then<br class="">+ # no cross-compile at all<br class="">+ _PYTHON_SYSCONFIGDATA_NAME=${PYTHON_ABI}_${TARGET_OS}_${MULTIARCH}<br class="">+ else<br class="">+ # at the very moment, it's the only available target<br class="">+ _PYTHON_SYSCONFIGDATA_NAME=${PYTHON_ABI}_linux_${MULTIARCH}<br class="">+ fi<br class="">+}<br class="">+<br class=""> do_install_append () {<br class=""> sed -i -e 's:${HOSTTOOLS_DIR}/install:install:g' \<br class=""> -e 's:${HOSTTOOLS_DIR}/mkdir:mkdir:g' \<br class="">- ${D}/${libdir}/python${PYTHON_MAJMIN}/_sysconfigdata.py<br class="">+ ${D}/${libdir}/python${PYTHON_MAJMIN}/_sysconfigdata_${_PYTHON_SYSCONFIGDATA_NAME}.py<br class=""> }<br class="">diff --git a/meta/recipes-devtools/python/python3/0001-Do-not-use-the-shell-version-of-python-config-that-w.patch b/meta/recipes-devtools/python/python3/0001-Do-not-use-the-shell-version-of-python-config-that-w.patch<br class="">index 8ea3f03fe0..aac34533ef 100644<br class="">--- a/meta/recipes-devtools/python/python3/0001-Do-not-use-the-shell-version-of-python-config-that-w.patch<br class="">+++ b/meta/recipes-devtools/python/python3/0001-Do-not-use-the-shell-version-of-python-config-that-w.patch<br class="">@@ -14,25 +14,22 @@ Signed-off-by: Alexander Kanavin <<a href="mailto:alex.kanavin@gmail.com" class="">alex.kanavin@gmail.com</a>><br class=""> 1 file changed, 3 insertions(+), 6 deletions(-)<br class=""><br class=""> diff --git a/<a href="http://Makefile.pre.in" class="">Makefile.pre.in</a> b/<a href="http://Makefile.pre.in" class="">Makefile.pre.in</a><br class="">-index 236f005..5c4337f 100644<br class="">+index 31b4bcabb3..7da6d6941e 100644<br class=""> --- a/<a href="http://Makefile.pre.in" class="">Makefile.pre.in</a><br class=""> +++ b/<a href="http://Makefile.pre.in" class="">Makefile.pre.in</a><br class="">-@@ -1348,12 +1348,9 @@ python-config: $(srcdir)/Misc/<a href="http://python-config.in" class="">python-config.in</a> Misc/python-config.sh<br class="">+@@ -1415,12 +1415,9 @@ python-config: $(srcdir)/Misc/<a href="http://python-config.in" class="">python-config.in</a> Misc/python-config.sh<br class=""> sed -e "s,@EXENAME@,$(BINDIR)/python$(LDVERSION)$(EXE)," < $(srcdir)/Misc/<a href="http://python-config.in" class="">python-config.in</a> >python-config.py<br class="">- # Replace makefile compat. variable references with shell script compat. ones; $(VAR) -> ${VAR}<br class="">+ @ # Replace makefile compat. variable references with shell script compat. ones; $(VAR) -> ${VAR}<br class=""> LC_ALL=C sed -e 's,\$$(\([A-Za-z0-9_]*\)),\$$\{\1\},g' < Misc/python-config.sh >python-config<br class="">-- # On Darwin, always use the python version of the script, the shell<br class="">-- # version doesn't use the compiler customizations that are provided<br class="">-- # in python (_osx_support.py).<br class="">-- if test `uname -s` = Darwin; then \<br class="">+- @ # On Darwin, always use the python version of the script, the shell<br class="">+- @ # version doesn't use the compiler customizations that are provided<br class="">+- @ # in python (_osx_support.py).<br class="">+- @if test `uname -s` = Darwin; then \<br class=""> - cp python-config.py python-config; \<br class=""> - fi<br class="">-+ # In OpenEmbedded, always use the python version of the script, the shell<br class="">-+ # version is broken in multiple ways, and doesn't return correct directories<br class="">++ @ # In OpenEmbedded, always use the python version of the script, the shell<br class="">++ @ # version is broken in multiple ways, and doesn't return correct directories<br class=""> + cp python-config.py python-config<br class=""><br class=""><br class=""> # Install the include files<br class="">---<br class="">-2.11.0<br class="">-<br class="">diff --git a/meta/recipes-devtools/python/python3/0001-Issue-21272-Use-_sysconfigdata.py-to-initialize-dist.patch b/meta/recipes-devtools/python/python3/0001-Issue-21272-Use-_sysconfigdata.py-to-initialize-dist.patch<br class="">deleted file mode 100644<br class="">index d1c92e9eed..0000000000<br class="">--- a/meta/recipes-devtools/python/python3/0001-Issue-21272-Use-_sysconfigdata.py-to-initialize-dist.patch<br class="">+++ /dev/null<br class="">@@ -1,66 +0,0 @@<br class="">-From bcddbf40c7f1b80336268cdddacc17369fb0ccea Mon Sep 17 00:00:00 2001<br class="">-From: Libin Dang <<a href="mailto:libin.dang@windriver.com" class="">libin.dang@windriver.com</a>><br class="">-Date: Tue, 11 Apr 2017 14:12:15 +0800<br class="">-Subject: [PATCH] Issue #21272: Use _sysconfigdata.py to initialize<br class="">- distutils.sysconfig<br class="">-<br class="">-Backport upstream commit<br class="">-<a href="https://github.com/python/cpython/commit/409482251b06fe75c4ee56e85ffbb4b23d934159" class="">https://github.com/python/cpython/commit/409482251b06fe75c4ee56e85ffbb4b23d934159</a><br class="">-<br class="">-Upstream-Status: Backport<br class="">-<br class="">-Signed-off-by: Li Zhou <<a href="mailto:li.zhou@windriver.com" class="">li.zhou@windriver.com</a>><br class="">----<br class="">- Lib/distutils/sysconfig.py | 35 ++++-------------------------------<br class="">- 1 file changed, 4 insertions(+), 31 deletions(-)<br class="">-<br class="">-diff --git a/Lib/distutils/sysconfig.py b/Lib/distutils/sysconfig.py<br class="">-index 6d5cfd0..9925d24 100644<br class="">---- a/Lib/distutils/sysconfig.py<br class="">-+++ b/Lib/distutils/sysconfig.py<br class="">-@@ -424,38 +424,11 @@ _config_vars = None<br class="">-<br class="">- def _init_posix():<br class="">- """Initialize the module as appropriate for POSIX systems."""<br class="">-- g = {}<br class="">-- # load the installed Makefile:<br class="">-- try:<br class="">-- filename = get_makefile_filename()<br class="">-- parse_makefile(filename, g)<br class="">-- except OSError as msg:<br class="">-- my_msg = "invalid Python installation: unable to open %s" % filename<br class="">-- if hasattr(msg, "strerror"):<br class="">-- my_msg = my_msg + " (%s)" % msg.strerror<br class="">--<br class="">-- raise DistutilsPlatformError(my_msg)<br class="">--<br class="">-- # load the installed pyconfig.h:<br class="">-- try:<br class="">-- filename = get_config_h_filename()<br class="">-- with open(filename) as file:<br class="">-- parse_config_h(file, g)<br class="">-- except OSError as msg:<br class="">-- my_msg = "invalid Python installation: unable to open %s" % filename<br class="">-- if hasattr(msg, "strerror"):<br class="">-- my_msg = my_msg + " (%s)" % msg.strerror<br class="">--<br class="">-- raise DistutilsPlatformError(my_msg)<br class="">--<br class="">-- # On AIX, there are wrong paths to the linker scripts in the Makefile<br class="">-- # -- these paths are relative to the Python source, but when installed<br class="">-- # the scripts are in another directory.<br class="">-- if python_build:<br class="">-- g['LDSHARED'] = g['BLDSHARED']<br class="">--<br class="">-+ # _sysconfigdata is generated at build time, see the sysconfig module<br class="">-+ from _sysconfigdata import build_time_vars<br class="">- global _config_vars<br class="">-- _config_vars = g<br class="">-+ _config_vars = {}<br class="">-+ _config_vars.update(build_time_vars)<br class="">-<br class="">-<br class="">- def _init_nt():<br class="">---<br class="">-1.8.3.1<br class="">-<br class="">diff --git a/meta/recipes-devtools/python/python3/0001-Issue-28043-SSLContext-has-improved-default-settings.patch b/meta/recipes-devtools/python/python3/0001-Issue-28043-SSLContext-has-improved-default-settings.patch<br class="">deleted file mode 100644<br class="">index 321b4afa12..0000000000<br class="">--- a/meta/recipes-devtools/python/python3/0001-Issue-28043-SSLContext-has-improved-default-settings.patch<br class="">+++ /dev/null<br class="">@@ -1,272 +0,0 @@<br class="">-From 758e7463c104f71b810c8588166747eeab6148d7 Mon Sep 17 00:00:00 2001<br class="">-From: Christian Heimes <<a href="mailto:christian@python.org" class="">christian@python.org</a>><br class="">-Date: Sat, 10 Sep 2016 22:43:48 +0200<br class="">-Subject: [PATCH 1/4] Issue 28043: SSLContext has improved default settings<br class="">-<br class="">-The options OP_NO_COMPRESSION, OP_CIPHER_SERVER_PREFERENCE, OP_SINGLE_DH_USE, OP_SINGLE_ECDH_USE, OP_NO_SSLv2 (except for PROTOCOL_SSLv2), and OP_NO_SSLv3 (except for PROTOCOL_SSLv3) are set by default. The initial cipher suite list contains only HIGH ciphers, no NULL ciphers and MD5 ciphers (except for PROTOCOL_SSLv2).<br class="">-<br class="">-Upstream-Status: Backport<br class="">-[<a href="https://github.com/python/cpython/commit/358cfd426ccc0fcd6a7940d306602138e76420ae" class="">https://github.com/python/cpython/commit/358cfd426ccc0fcd6a7940d306602138e76420ae</a>]<br class="">-<br class="">-Signed-off-by: Anuj Mittal <<a href="mailto:anuj.mittal@intel.com" class="">anuj.mittal@intel.com</a>><br class="">----<br class="">- Doc/library/ssl.rst | 9 ++++++-<br class="">- Lib/ssl.py | 30 +++++----------------<br class="">- Lib/test/test_ssl.py | 62 +++++++++++++++++++++++---------------------<br class="">- Modules/_ssl.c | 31 ++++++++++++++++++++++<br class="">- 4 files changed, 78 insertions(+), 54 deletions(-)<br class="">-<br class="">-diff --git a/Doc/library/ssl.rst b/Doc/library/ssl.rst<br class="">-index a2f008346b..14f2d68217 100644<br class="">---- a/Doc/library/ssl.rst<br class="">-+++ b/Doc/library/ssl.rst<br class="">-@@ -1151,7 +1151,14 @@ to speed up repeated connections from the same clients.<br class="">-<br class="">- .. versionchanged:: 3.5.3<br class="">-<br class="">-- :data:`PROTOCOL_TLS` is the default value.<br class="">-+ The context is created with secure default values. The options<br class="">-+ :data:`OP_NO_COMPRESSION`, :data:`OP_CIPHER_SERVER_PREFERENCE`,<br class="">-+ :data:`OP_SINGLE_DH_USE`, :data:`OP_SINGLE_ECDH_USE`,<br class="">-+ :data:`OP_NO_SSLv2` (except for :data:`PROTOCOL_SSLv2`),<br class="">-+ and :data:`OP_NO_SSLv3` (except for :data:`PROTOCOL_SSLv3`) are<br class="">-+ set by default. The initial cipher suite list contains only ``HIGH``<br class="">-+ ciphers, no ``NULL`` ciphers and no ``MD5`` ciphers (except for<br class="">-+ :data:`PROTOCOL_SSLv2`).<br class="">-<br class="">-<br class="">- :class:`SSLContext` objects have the following methods and attributes:<br class="">-diff --git a/Lib/ssl.py b/Lib/ssl.py<br class="">-index e1913904f3..4d302a78fa 100644<br class="">---- a/Lib/ssl.py<br class="">-+++ b/Lib/ssl.py<br class="">-@@ -446,32 +446,16 @@ def create_default_context(purpose=Purpose.SERVER_AUTH, *, cafile=None,<br class="">- if not isinstance(purpose, _ASN1Object):<br class="">- raise TypeError(purpose)<br class="">-<br class="">-+ # SSLContext sets OP_NO_SSLv2, OP_NO_SSLv3, OP_NO_COMPRESSION,<br class="">-+ # OP_CIPHER_SERVER_PREFERENCE, OP_SINGLE_DH_USE and OP_SINGLE_ECDH_USE<br class="">-+ # by default.<br class="">- context = SSLContext(PROTOCOL_TLS)<br class="">-<br class="">-- # SSLv2 considered harmful.<br class="">-- context.options |= OP_NO_SSLv2<br class="">--<br class="">-- # SSLv3 has problematic security and is only required for really old<br class="">-- # clients such as IE6 on Windows XP<br class="">-- context.options |= OP_NO_SSLv3<br class="">--<br class="">-- # disable compression to prevent CRIME attacks (OpenSSL 1.0+)<br class="">-- context.options |= getattr(_ssl, "OP_NO_COMPRESSION", 0)<br class="">--<br class="">- if purpose == Purpose.SERVER_AUTH:<br class="">- # verify certs and host name in client mode<br class="">- context.verify_mode = CERT_REQUIRED<br class="">- context.check_hostname = True<br class="">- elif purpose == Purpose.CLIENT_AUTH:<br class="">-- # Prefer the server's ciphers by default so that we get stronger<br class="">-- # encryption<br class="">-- context.options |= getattr(_ssl, "OP_CIPHER_SERVER_PREFERENCE", 0)<br class="">--<br class="">-- # Use single use keys in order to improve forward secrecy<br class="">-- context.options |= getattr(_ssl, "OP_SINGLE_DH_USE", 0)<br class="">-- context.options |= getattr(_ssl, "OP_SINGLE_ECDH_USE", 0)<br class="">--<br class="">-- # disallow ciphers with known vulnerabilities<br class="">- context.set_ciphers(_RESTRICTED_SERVER_CIPHERS)<br class="">-<br class="">- if cafile or capath or cadata:<br class="">-@@ -497,12 +481,10 @@ def _create_unverified_context(protocol=PROTOCOL_TLS, *, cert_reqs=None,<br class="">- if not isinstance(purpose, _ASN1Object):<br class="">- raise TypeError(purpose)<br class="">-<br class="">-+ # SSLContext sets OP_NO_SSLv2, OP_NO_SSLv3, OP_NO_COMPRESSION,<br class="">-+ # OP_CIPHER_SERVER_PREFERENCE, OP_SINGLE_DH_USE and OP_SINGLE_ECDH_USE<br class="">-+ # by default.<br class="">- context = SSLContext(protocol)<br class="">-- # SSLv2 considered harmful.<br class="">-- context.options |= OP_NO_SSLv2<br class="">-- # SSLv3 has problematic security and is only required for really old<br class="">-- # clients such as IE6 on Windows XP<br class="">-- context.options |= OP_NO_SSLv3<br class="">-<br class="">- if cert_reqs is not None:<br class="">- context.verify_mode = cert_reqs<br class="">-diff --git a/Lib/test/test_ssl.py b/Lib/test/test_ssl.py<br class="">-index ffb7314f57..f91af7bd05 100644<br class="">---- a/Lib/test/test_ssl.py<br class="">-+++ b/Lib/test/test_ssl.py<br class="">-@@ -73,6 +73,12 @@ NULLBYTECERT = data_file("nullbytecert.pem")<br class="">- DHFILE = data_file("dh1024.pem")<br class="">- BYTES_DHFILE = os.fsencode(DHFILE)<br class="">-<br class="">-+# Not defined in all versions of OpenSSL<br class="">-+OP_NO_COMPRESSION = getattr(ssl, "OP_NO_COMPRESSION", 0)<br class="">-+OP_SINGLE_DH_USE = getattr(ssl, "OP_SINGLE_DH_USE", 0)<br class="">-+OP_SINGLE_ECDH_USE = getattr(ssl, "OP_SINGLE_ECDH_USE", 0)<br class="">-+OP_CIPHER_SERVER_PREFERENCE = getattr(ssl, "OP_CIPHER_SERVER_PREFERENCE", 0)<br class="">-+<br class="">-<br class="">- def handle_error(prefix):<br class="">- exc_format = ' '.join(traceback.format_exception(*sys.exc_info()))<br class="">-@@ -839,8 +845,9 @@ class ContextTests(unittest.TestCase):<br class="">- ctx = ssl.SSLContext(ssl.PROTOCOL_TLSv1)<br class="">- # OP_ALL | OP_NO_SSLv2 | OP_NO_SSLv3 is the default value<br class="">- default = (ssl.OP_ALL | ssl.OP_NO_SSLv2 | ssl.OP_NO_SSLv3)<br class="">-- if not IS_LIBRESSL and ssl.OPENSSL_VERSION_INFO >= (1, 1, 0):<br class="">-- default |= ssl.OP_NO_COMPRESSION<br class="">-+ # SSLContext also enables these by default<br class="">-+ default |= (OP_NO_COMPRESSION | OP_CIPHER_SERVER_PREFERENCE |<br class="">-+ OP_SINGLE_DH_USE | OP_SINGLE_ECDH_USE)<br class="">- self.assertEqual(default, ctx.options)<br class="">- ctx.options |= ssl.OP_NO_TLSv1<br class="">- self.assertEqual(default | ssl.OP_NO_TLSv1, ctx.options)<br class="">-@@ -1205,16 +1212,29 @@ class ContextTests(unittest.TestCase):<br class="">- stats["x509"] += 1<br class="">- self.assertEqual(ctx.cert_store_stats(), stats)<br class="">-<br class="">-+ def _assert_context_options(self, ctx):<br class="">-+ self.assertEqual(ctx.options & ssl.OP_NO_SSLv2, ssl.OP_NO_SSLv2)<br class="">-+ if OP_NO_COMPRESSION != 0:<br class="">-+ self.assertEqual(ctx.options & OP_NO_COMPRESSION,<br class="">-+ OP_NO_COMPRESSION)<br class="">-+ if OP_SINGLE_DH_USE != 0:<br class="">-+ self.assertEqual(ctx.options & OP_SINGLE_DH_USE,<br class="">-+ OP_SINGLE_DH_USE)<br class="">-+ if OP_SINGLE_ECDH_USE != 0:<br class="">-+ self.assertEqual(ctx.options & OP_SINGLE_ECDH_USE,<br class="">-+ OP_SINGLE_ECDH_USE)<br class="">-+ if OP_CIPHER_SERVER_PREFERENCE != 0:<br class="">-+ self.assertEqual(ctx.options & OP_CIPHER_SERVER_PREFERENCE,<br class="">-+ OP_CIPHER_SERVER_PREFERENCE)<br class="">-+<br class="">- def test_create_default_context(self):<br class="">- ctx = ssl.create_default_context()<br class="">-+<br class="">- self.assertEqual(ctx.protocol, ssl.PROTOCOL_SSLv23)<br class="">- self.assertEqual(ctx.verify_mode, ssl.CERT_REQUIRED)<br class="">- self.assertTrue(ctx.check_hostname)<br class="">-- self.assertEqual(ctx.options & ssl.OP_NO_SSLv2, ssl.OP_NO_SSLv2)<br class="">-- self.assertEqual(<br class="">-- ctx.options & getattr(ssl, "OP_NO_COMPRESSION", 0),<br class="">-- getattr(ssl, "OP_NO_COMPRESSION", 0),<br class="">-- )<br class="">-+ self._assert_context_options(ctx)<br class="">-+<br class="">-<br class="">- with open(SIGNING_CA) as f:<br class="">- cadata = f.read()<br class="">-@@ -1222,40 +1242,24 @@ class ContextTests(unittest.TestCase):<br class="">- cadata=cadata)<br class="">- self.assertEqual(ctx.protocol, ssl.PROTOCOL_SSLv23)<br class="">- self.assertEqual(ctx.verify_mode, ssl.CERT_REQUIRED)<br class="">-- self.assertEqual(ctx.options & ssl.OP_NO_SSLv2, ssl.OP_NO_SSLv2)<br class="">-- self.assertEqual(<br class="">-- ctx.options & getattr(ssl, "OP_NO_COMPRESSION", 0),<br class="">-- getattr(ssl, "OP_NO_COMPRESSION", 0),<br class="">-- )<br class="">-+ self._assert_context_options(ctx)<br class="">-<br class="">- ctx = ssl.create_default_context(ssl.Purpose.CLIENT_AUTH)<br class="">- self.assertEqual(ctx.protocol, ssl.PROTOCOL_SSLv23)<br class="">- self.assertEqual(ctx.verify_mode, ssl.CERT_NONE)<br class="">-- self.assertEqual(ctx.options & ssl.OP_NO_SSLv2, ssl.OP_NO_SSLv2)<br class="">-- self.assertEqual(<br class="">-- ctx.options & getattr(ssl, "OP_NO_COMPRESSION", 0),<br class="">-- getattr(ssl, "OP_NO_COMPRESSION", 0),<br class="">-- )<br class="">-- self.assertEqual(<br class="">-- ctx.options & getattr(ssl, "OP_SINGLE_DH_USE", 0),<br class="">-- getattr(ssl, "OP_SINGLE_DH_USE", 0),<br class="">-- )<br class="">-- self.assertEqual(<br class="">-- ctx.options & getattr(ssl, "OP_SINGLE_ECDH_USE", 0),<br class="">-- getattr(ssl, "OP_SINGLE_ECDH_USE", 0),<br class="">-- )<br class="">-+ self._assert_context_options(ctx)<br class="">-<br class="">- def test__create_stdlib_context(self):<br class="">- ctx = ssl._create_stdlib_context()<br class="">- self.assertEqual(ctx.protocol, ssl.PROTOCOL_SSLv23)<br class="">- self.assertEqual(ctx.verify_mode, ssl.CERT_NONE)<br class="">- self.assertFalse(ctx.check_hostname)<br class="">-- self.assertEqual(ctx.options & ssl.OP_NO_SSLv2, ssl.OP_NO_SSLv2)<br class="">-+ self._assert_context_options(ctx)<br class="">-<br class="">- ctx = ssl._create_stdlib_context(ssl.PROTOCOL_TLSv1)<br class="">- self.assertEqual(ctx.protocol, ssl.PROTOCOL_TLSv1)<br class="">- self.assertEqual(ctx.verify_mode, ssl.CERT_NONE)<br class="">-- self.assertEqual(ctx.options & ssl.OP_NO_SSLv2, ssl.OP_NO_SSLv2)<br class="">-+ self._assert_context_options(ctx)<br class="">-<br class="">- ctx = ssl._create_stdlib_context(ssl.PROTOCOL_TLSv1,<br class="">- cert_reqs=ssl.CERT_REQUIRED,<br class="">-@@ -1263,12 +1267,12 @@ class ContextTests(unittest.TestCase):<br class="">- self.assertEqual(ctx.protocol, ssl.PROTOCOL_TLSv1)<br class="">- self.assertEqual(ctx.verify_mode, ssl.CERT_REQUIRED)<br class="">- self.assertTrue(ctx.check_hostname)<br class="">-- self.assertEqual(ctx.options & ssl.OP_NO_SSLv2, ssl.OP_NO_SSLv2)<br class="">-+ self._assert_context_options(ctx)<br class="">-<br class="">- ctx = ssl._create_stdlib_context(purpose=ssl.Purpose.CLIENT_AUTH)<br class="">- self.assertEqual(ctx.protocol, ssl.PROTOCOL_SSLv23)<br class="">- self.assertEqual(ctx.verify_mode, ssl.CERT_NONE)<br class="">-- self.assertEqual(ctx.options & ssl.OP_NO_SSLv2, ssl.OP_NO_SSLv2)<br class="">-+ self._assert_context_options(ctx)<br class="">-<br class="">- def test_check_hostname(self):<br class="">- ctx = ssl.SSLContext(ssl.PROTOCOL_TLSv1)<br class="">-diff --git a/Modules/_ssl.c b/Modules/_ssl.c<br class="">-index 86482677ae..0d5c121d2c 100644<br class="">---- a/Modules/_ssl.c<br class="">-+++ b/Modules/_ssl.c<br class="">-@@ -2330,6 +2330,7 @@ _ssl__SSLContext_impl(PyTypeObject *type, int proto_version)<br class="">- PySSLContext *self;<br class="">- long options;<br class="">- SSL_CTX *ctx = NULL;<br class="">-+ int result;<br class="">- #if defined(SSL_MODE_RELEASE_BUFFERS)<br class="">- unsigned long libver;<br class="">- #endif<br class="">-@@ -2393,8 +2394,38 @@ _ssl__SSLContext_impl(PyTypeObject *type, int proto_version)<br class="">- options |= SSL_OP_NO_SSLv2;<br class="">- if (proto_version != PY_SSL_VERSION_SSL3)<br class="">- options |= SSL_OP_NO_SSLv3;<br class="">-+ /* Minimal security flags for server and client side context.<br class="">-+ * Client sockets ignore server-side parameters. */<br class="">-+#ifdef SSL_OP_NO_COMPRESSION<br class="">-+ options |= SSL_OP_NO_COMPRESSION;<br class="">-+#endif<br class="">-+#ifdef SSL_OP_CIPHER_SERVER_PREFERENCE<br class="">-+ options |= SSL_OP_CIPHER_SERVER_PREFERENCE;<br class="">-+#endif<br class="">-+#ifdef SSL_OP_SINGLE_DH_USE<br class="">-+ options |= SSL_OP_SINGLE_DH_USE;<br class="">-+#endif<br class="">-+#ifdef SSL_OP_SINGLE_ECDH_USE<br class="">-+ options |= SSL_OP_SINGLE_ECDH_USE;<br class="">-+#endif<br class="">- SSL_CTX_set_options(self->ctx, options);<br class="">-<br class="">-+ /* A bare minimum cipher list without completly broken cipher suites.<br class="">-+ * It's far from perfect but gives users a better head start. */<br class="">-+ if (proto_version != PY_SSL_VERSION_SSL2) {<br class="">-+ result = SSL_CTX_set_cipher_list(ctx, "HIGH:!aNULL:!eNULL:!MD5");<br class="">-+ } else {<br class="">-+ /* SSLv2 needs MD5 */<br class="">-+ result = SSL_CTX_set_cipher_list(ctx, "HIGH:!aNULL:!eNULL");<br class="">-+ }<br class="">-+ if (result == 0) {<br class="">-+ Py_DECREF(self);<br class="">-+ ERR_clear_error();<br class="">-+ PyErr_SetString(PySSLErrorObject,<br class="">-+ "No cipher can be selected.");<br class="">-+ return NULL;<br class="">-+ }<br class="">-+<br class="">- #if defined(SSL_MODE_RELEASE_BUFFERS)<br class="">- /* Set SSL_MODE_RELEASE_BUFFERS. This potentially greatly reduces memory<br class="">- usage for no cost at all. However, don't do this for OpenSSL versions<br class="">---<br class="">-2.17.1<br class="">-<br class="">diff --git a/meta/recipes-devtools/python/python3/0002-Makefile-add-target-to-split-profile-generation.patch b/meta/recipes-devtools/python/python3/0002-Makefile-add-target-to-split-profile-generation.patch<br class="">deleted file mode 100644<br class="">index 2b4ba316e4..0000000000<br class="">--- a/meta/recipes-devtools/python/python3/0002-Makefile-add-target-to-split-profile-generation.patch<br class="">+++ /dev/null<br class="">@@ -1,40 +0,0 @@<br class="">-From 98586d6dc598e40b8b821b0dde57599e188a7ca4 Mon Sep 17 00:00:00 2001<br class="">-From: Anuj Mittal <<a href="mailto:anuj.mittal@intel.com" class="">anuj.mittal@intel.com</a>><br class="">-Date: Tue, 7 Aug 2018 16:43:17 +0800<br class="">-Subject: [PATCH 2/2] Makefile: add target to split profile generation<br class="">-<br class="">-We don't want to have profile task invoked from here and want to use<br class="">-qemu-user instead. Split the profile-opt task so qemu can be invoked<br class="">-once binaries have been built with instrumentation and then we can go<br class="">-ahead and build again using the profile data generated.<br class="">-<br class="">-Upstream-Status: Inappropriate [OE-specific]<br class="">-<br class="">-Signed-off-by: Anuj Mittal <<a href="mailto:anuj.mittal@intel.com" class="">anuj.mittal@intel.com</a>><br class="">----<br class="">- <a href="http://Makefile.pre.in" class="">Makefile.pre.in</a> | 6 ++----<br class="">- 1 file changed, 2 insertions(+), 4 deletions(-)<br class="">-<br class="">-diff --git a/<a href="http://Makefile.pre.in" class="">Makefile.pre.in</a> b/<a href="http://Makefile.pre.in" class="">Makefile.pre.in</a><br class="">-index 84bc3ff..017a2c4 100644<br class="">---- a/<a href="http://Makefile.pre.in" class="">Makefile.pre.in</a><br class="">-+++ b/<a href="http://Makefile.pre.in" class="">Makefile.pre.in</a><br class="">-@@ -469,13 +469,12 @@ profile-opt:<br class="">- $(MAKE) profile-removal<br class="">- $(MAKE) build_all_generate_profile<br class="">- $(MAKE) profile-removal<br class="">-- @echo "Running code to generate profile data (this can take a while):"<br class="">-- $(MAKE) run_profile_task<br class="">-- $(MAKE) build_all_merge_profile<br class="">-+<br class="">-+clean_and_use_profile:<br class="">- @echo "Rebuilding with profile guided optimizations:"<br class="">- $(MAKE) clean<br class="">- $(MAKE) build_all_use_profile<br class="">- $(MAKE) profile-removal<br class="">-<br class="">- build_all_generate_profile:<br class="">- $(MAKE) @DEF_MAKE_RULE@ CFLAGS_NODIST="$(CFLAGS) $(EXTRA_CFLAGS) $(PGO_PROF_GEN_FLAG) @LTOFLAGS@" LDFLAGS="$(LDFLAGS) $(PGO_PROF_GEN_FLAG) @LTOFLAGS@" LIBS="$(LIBS)"<br class="">---<br class="">-2.17.1<br class="">-<br class="">diff --git a/meta/recipes-devtools/python/python3/0002-bpo-29136-Add-TLS-1.3-cipher-suites-and-OP_NO_TLSv1_.patch b/meta/recipes-devtools/python/python3/0002-bpo-29136-Add-TLS-1.3-cipher-suites-and-OP_NO_TLSv1_.patch<br class="">deleted file mode 100644<br class="">index d48cad7586..0000000000<br class="">--- a/meta/recipes-devtools/python/python3/0002-bpo-29136-Add-TLS-1.3-cipher-suites-and-OP_NO_TLSv1_.patch<br class="">+++ /dev/null<br class="">@@ -1,227 +0,0 @@<br class="">-From e950ea68dab006944af194c9910b8f2341d1437d Mon Sep 17 00:00:00 2001<br class="">-From: Christian Heimes <<a href="mailto:christian@python.org" class="">christian@python.org</a>><br class="">-Date: Thu, 7 Sep 2017 20:23:52 -0700<br class="">-Subject: [PATCH] bpo-29136: Add TLS 1.3 cipher suites and OP_NO_TLSv1_3<br class="">- (GH-1363) (#3444)<br class="">-<br class="">-* bpo-29136: Add TLS 1.3 support<br class="">-<br class="">-TLS 1.3 introduces a new, distinct set of cipher suites. The TLS 1.3<br class="">-cipher suites don't overlap with cipher suites from TLS 1.2 and earlier.<br class="">-Since Python sets its own set of permitted ciphers, TLS 1.3 handshake<br class="">-will fail as soon as OpenSSL 1.1.1 is released. Let's enable the common<br class="">-AES-GCM and ChaCha20 suites.<br class="">-<br class="">-Additionally the flag OP_NO_TLSv1_3 is added. It defaults to 0 (no op) with<br class="">-OpenSSL prior to 1.1.1. This allows applications to opt-out from TLS 1.3<br class="">-now.<br class="">-<br class="">-Signed-off-by: Christian Heimes <<a href="mailto:christian@python.org" class="">christian@python.org</a>>.<br class="">-(cherry picked from commit cb5b68abdeb1b1d56c581d5b4d647018703d61e3)<br class="">-<br class="">-Upstream-Status: Backport<br class="">-[<a href="https://github.com/python/cpython/commit/cb5b68abdeb1b1d56c581d5b4d647018703d61e3" class="">https://github.com/python/cpython/commit/cb5b68abdeb1b1d56c581d5b4d647018703d61e3</a>]<br class="">-<br class="">-Signed-off-by: Anuj Mittal <<a href="mailto:anuj.mittal@intel.com" class="">anuj.mittal@intel.com</a>><br class="">----<br class="">- Doc/library/ssl.rst | 21 ++++++++++++++<br class="">- Lib/ssl.py | 7 +++++<br class="">- Lib/test/test_ssl.py | 29 ++++++++++++++++++-<br class="">- .../2017-09-04-16-39-49.bpo-29136.vSn1oR.rst | 1 +<br class="">- Modules/_ssl.c | 13 +++++++++<br class="">- 5 files changed, 70 insertions(+), 1 deletion(-)<br class="">- create mode 100644 Misc/NEWS.d/next/Library/2017-09-04-16-39-49.bpo-29136.vSn1oR.rst<br class="">-<br class="">-diff --git a/Doc/library/ssl.rst b/Doc/library/ssl.rst<br class="">-index 14f2d68217..29c5e94cf6 100644<br class="">---- a/Doc/library/ssl.rst<br class="">-+++ b/Doc/library/ssl.rst<br class="">-@@ -285,6 +285,11 @@ purposes.<br class="">-<br class="">- 3DES was dropped from the default cipher string.<br class="">-<br class="">-+ .. versionchanged:: 3.7<br class="">-+<br class="">-+ TLS 1.3 cipher suites TLS_AES_128_GCM_SHA256, TLS_AES_256_GCM_SHA384,<br class="">-+ and TLS_CHACHA20_POLY1305_SHA256 were added to the default cipher string.<br class="">-+<br class="">-<br class="">- Random generation<br class="">- ^^^^^^^^^^^^^^^^^<br class="">-@@ -719,6 +724,16 @@ Constants<br class="">-<br class="">- .. versionadded:: 3.4<br class="">-<br class="">-+.. data:: OP_NO_TLSv1_3<br class="">-+<br class="">-+ Prevents a TLSv1.3 connection. This option is only applicable in conjunction<br class="">-+ with :const:`PROTOCOL_TLS`. It prevents the peers from choosing TLSv1.3 as<br class="">-+ the protocol version. TLS 1.3 is available with OpenSSL 1.1.1 or later.<br class="">-+ When Python has been compiled against an older version of OpenSSL, the<br class="">-+ flag defaults to *0*.<br class="">-+<br class="">-+ .. versionadded:: 3.7<br class="">-+<br class="">- .. data:: OP_CIPHER_SERVER_PREFERENCE<br class="">-<br class="">- Use the server's cipher ordering preference, rather than the client's.<br class="">-@@ -783,6 +798,12 @@ Constants<br class="">-<br class="">- .. versionadded:: 3.3<br class="">-<br class="">-+.. data:: HAS_TLSv1_3<br class="">-+<br class="">-+ Whether the OpenSSL library has built-in support for the TLS 1.3 protocol.<br class="">-+<br class="">-+ .. versionadded:: 3.7<br class="">-+<br class="">- .. data:: CHANNEL_BINDING_TYPES<br class="">-<br class="">- List of supported TLS channel binding types. Strings in this list<br class="">-diff --git a/Lib/ssl.py b/Lib/ssl.py<br class="">-index 4d302a78fa..f233e72e1f 100644<br class="">---- a/Lib/ssl.py<br class="">-+++ b/Lib/ssl.py<br class="">-@@ -122,6 +122,7 @@ _import_symbols('OP_')<br class="">- _import_symbols('ALERT_DESCRIPTION_')<br class="">- _import_symbols('SSL_ERROR_')<br class="">- _import_symbols('VERIFY_')<br class="">-+from _ssl import HAS_SNI, HAS_ECDH, HAS_NPN, HAS_ALPN, HAS_TLSv1_3<br class="">-<br class="">- from _ssl import HAS_SNI, HAS_ECDH, HAS_NPN, HAS_ALPN<br class="">-<br class="">-@@ -162,6 +163,7 @@ else:<br class="">- # (OpenSSL's default setting is 'DEFAULT:!aNULL:!eNULL')<br class="">- # Enable a better set of ciphers by default<br class="">- # This list has been explicitly chosen to:<br class="">-+# * TLS 1.3 ChaCha20 and AES-GCM cipher suites<br class="">- # * Prefer cipher suites that offer perfect forward secrecy (DHE/ECDHE)<br class="">- # * Prefer ECDHE over DHE for better performance<br class="">- # * Prefer AEAD over CBC for better performance and security<br class="">-@@ -173,6 +175,8 @@ else:<br class="">- # * Disable NULL authentication, NULL encryption, 3DES and MD5 MACs<br class="">- # for security reasons<br class="">- _DEFAULT_CIPHERS = (<br class="">-+ 'TLS13-AES-256-GCM-SHA384:TLS13-CHACHA20-POLY1305-SHA256:'<br class="">-+ 'TLS13-AES-128-GCM-SHA256:'<br class="">- 'ECDH+AESGCM:ECDH+CHACHA20:DH+AESGCM:DH+CHACHA20:ECDH+AES256:DH+AES256:'<br class="">- 'ECDH+AES128:DH+AES:ECDH+HIGH:DH+HIGH:RSA+AESGCM:RSA+AES:RSA+HIGH:'<br class="">- '!aNULL:!eNULL:!MD5:!3DES'<br class="">-@@ -180,6 +184,7 @@ _DEFAULT_CIPHERS = (<br class="">-<br class="">- # Restricted and more secure ciphers for the server side<br class="">- # This list has been explicitly chosen to:<br class="">-+# * TLS 1.3 ChaCha20 and AES-GCM cipher suites<br class="">- # * Prefer cipher suites that offer perfect forward secrecy (DHE/ECDHE)<br class="">- # * Prefer ECDHE over DHE for better performance<br class="">- # * Prefer AEAD over CBC for better performance and security<br class="">-@@ -190,6 +195,8 @@ _DEFAULT_CIPHERS = (<br class="">- # * Disable NULL authentication, NULL encryption, MD5 MACs, DSS, RC4, and<br class="">- # 3DES for security reasons<br class="">- _RESTRICTED_SERVER_CIPHERS = (<br class="">-+ 'TLS13-AES-256-GCM-SHA384:TLS13-CHACHA20-POLY1305-SHA256:'<br class="">-+ 'TLS13-AES-128-GCM-SHA256:'<br class="">- 'ECDH+AESGCM:ECDH+CHACHA20:DH+AESGCM:DH+CHACHA20:ECDH+AES256:DH+AES256:'<br class="">- 'ECDH+AES128:DH+AES:ECDH+HIGH:DH+HIGH:RSA+AESGCM:RSA+AES:RSA+HIGH:'<br class="">- '!aNULL:!eNULL:!MD5:!DSS:!RC4:!3DES'<br class="">-diff --git a/Lib/test/test_ssl.py b/Lib/test/test_ssl.py<br class="">-index f91af7bd05..1acc12ec2d 100644<br class="">---- a/Lib/test/test_ssl.py<br class="">-+++ b/Lib/test/test_ssl.py<br class="">-@@ -150,6 +150,13 @@ class BasicSocketTests(unittest.TestCase):<br class="">- ssl.OP_NO_COMPRESSION<br class="">- self.assertIn(ssl.HAS_SNI, {True, False})<br class="">- self.assertIn(ssl.HAS_ECDH, {True, False})<br class="">-+ ssl.OP_NO_SSLv2<br class="">-+ ssl.OP_NO_SSLv3<br class="">-+ ssl.OP_NO_TLSv1<br class="">-+ ssl.OP_NO_TLSv1_3<br class="">-+ if ssl.OPENSSL_VERSION_INFO >= (1, 0, 1):<br class="">-+ ssl.OP_NO_TLSv1_1<br class="">-+ ssl.OP_NO_TLSv1_2<br class="">-<br class="">- def test_str_for_enums(self):<br class="">- # Make sure that the PROTOCOL_* constants have enum-like string<br class="">-@@ -3028,12 +3035,33 @@ else:<br class="">- self.assertEqual(s.version(), 'TLSv1')<br class="">- self.assertIs(s.version(), None)<br class="">-<br class="">-+ @unittest.skipUnless(ssl.HAS_TLSv1_3,<br class="">-+ "test requires TLSv1.3 enabled OpenSSL")<br class="">-+ def test_tls1_3(self):<br class="">-+ context = ssl.SSLContext(ssl.PROTOCOL_TLS)<br class="">-+ context.load_cert_chain(CERTFILE)<br class="">-+ # disable all but TLS 1.3<br class="">-+ context.options |= (<br class="">-+ ssl.OP_NO_TLSv1 | ssl.OP_NO_TLSv1_1 | ssl.OP_NO_TLSv1_2<br class="">-+ )<br class="">-+ with ThreadedEchoServer(context=context) as server:<br class="">-+ with context.wrap_socket(socket.socket()) as s:<br class="">-+ s.connect((HOST, server.port))<br class="">-+ self.assertIn(s.cipher()[0], [<br class="">-+ 'TLS13-AES-256-GCM-SHA384',<br class="">-+ 'TLS13-CHACHA20-POLY1305-SHA256',<br class="">-+ 'TLS13-AES-128-GCM-SHA256',<br class="">-+ ])<br class="">-+<br class="">- @unittest.skipUnless(ssl.HAS_ECDH, "test requires ECDH-enabled OpenSSL")<br class="">- def test_default_ecdh_curve(self):<br class="">- # Issue #21015: elliptic curve-based Diffie Hellman key exchange<br class="">- # should be enabled by default on SSL contexts.<br class="">- context = ssl.SSLContext(ssl.PROTOCOL_SSLv23)<br class="">- context.load_cert_chain(CERTFILE)<br class="">-+ # TLSv1.3 defaults to PFS key agreement and no longer has KEA in<br class="">-+ # cipher name.<br class="">-+ context.options |= ssl.OP_NO_TLSv1_3<br class="">- # Prior to OpenSSL 1.0.0, ECDH ciphers have to be enabled<br class="">- # explicitly using the 'ECCdraft' cipher alias. Otherwise,<br class="">- # our default cipher list should prefer ECDH-based ciphers<br class="">-@@ -3394,7 +3422,6 @@ else:<br class="">- s.sendfile(file)<br class="">- self.assertEqual(s.recv(1024), TEST_DATA)<br class="">-<br class="">--<br class="">- def test_main(verbose=False):<br class="">- if support.verbose:<br class="">- import warnings<br class="">-diff --git a/Misc/NEWS.d/next/Library/2017-09-04-16-39-49.bpo-29136.vSn1oR.rst b/Misc/NEWS.d/next/Library/2017-09-04-16-39-49.bpo-29136.vSn1oR.rst<br class="">-new file mode 100644<br class="">-index 0000000000..e76997ef83<br class="">---- /dev/null<br class="">-+++ b/Misc/NEWS.d/next/Library/2017-09-04-16-39-49.bpo-29136.vSn1oR.rst<br class="">-@@ -0,0 +1 @@<br class="">-+Add TLS 1.3 cipher suites and OP_NO_TLSv1_3.<br class="">-diff --git a/Modules/_ssl.c b/Modules/_ssl.c<br class="">-index 0d5c121d2c..c71d89607c 100644<br class="">---- a/Modules/_ssl.c<br class="">-+++ b/Modules/_ssl.c<br class="">-@@ -4842,6 +4842,11 @@ PyInit__ssl(void)<br class="">- #if HAVE_TLSv1_2<br class="">- PyModule_AddIntConstant(m, "OP_NO_TLSv1_1", SSL_OP_NO_TLSv1_1);<br class="">- PyModule_AddIntConstant(m, "OP_NO_TLSv1_2", SSL_OP_NO_TLSv1_2);<br class="">-+#endif<br class="">-+#ifdef SSL_OP_NO_TLSv1_3<br class="">-+ PyModule_AddIntConstant(m, "OP_NO_TLSv1_3", SSL_OP_NO_TLSv1_3);<br class="">-+#else<br class="">-+ PyModule_AddIntConstant(m, "OP_NO_TLSv1_3", 0);<br class="">- #endif<br class="">- PyModule_AddIntConstant(m, "OP_CIPHER_SERVER_PREFERENCE",<br class="">- SSL_OP_CIPHER_SERVER_PREFERENCE);<br class="">-@@ -4890,6 +4895,14 @@ PyInit__ssl(void)<br class="">- Py_INCREF(r);<br class="">- PyModule_AddObject(m, "HAS_ALPN", r);<br class="">-<br class="">-+#if defined(TLS1_3_VERSION) && !defined(OPENSSL_NO_TLS1_3)<br class="">-+ r = Py_True;<br class="">-+#else<br class="">-+ r = Py_False;<br class="">-+#endif<br class="">-+ Py_INCREF(r);<br class="">-+ PyModule_AddObject(m, "HAS_TLSv1_3", r);<br class="">-+<br class="">- /* Mappings for error codes */<br class="">- err_codes_to_names = PyDict_New();<br class="">- err_names_to_codes = PyDict_New();<br class="">---<br class="">-2.17.1<br class="">-<br class="">diff --git a/meta/recipes-devtools/python/python3/0003-bpo-32947-Fixes-for-TLS-1.3-and-OpenSSL-1.1.1-GH-876.patch b/meta/recipes-devtools/python/python3/0003-bpo-32947-Fixes-for-TLS-1.3-and-OpenSSL-1.1.1-GH-876.patch<br class="">deleted file mode 100644<br class="">index 56d591d1b5..0000000000<br class="">--- a/meta/recipes-devtools/python/python3/0003-bpo-32947-Fixes-for-TLS-1.3-and-OpenSSL-1.1.1-GH-876.patch<br class="">+++ /dev/null<br class="">@@ -1,173 +0,0 @@<br class="">-From 170a614904febd14ff6cfd7a75c9bccc114b3948 Mon Sep 17 00:00:00 2001<br class="">-From: Christian Heimes <<a href="mailto:christian@python.org" class="">christian@python.org</a>><br class="">-Date: Tue, 14 Aug 2018 16:56:32 +0200<br class="">-Subject: [PATCH] bpo-32947: Fixes for TLS 1.3 and OpenSSL 1.1.1 (GH-8761)<br class="">-<br class="">-Backport of TLS 1.3 related fixes from 3.7.<br class="">-<br class="">-Misc fixes and workarounds for compatibility with OpenSSL 1.1.1 from git<br class="">-master and TLS 1.3 support. With OpenSSL 1.1.1, Python negotiates TLS 1.3 by<br class="">-default. Some test cases only apply to TLS 1.2.<br class="">-<br class="">-OpenSSL 1.1.1 has added a new option OP_ENABLE_MIDDLEBOX_COMPAT for TLS<br class="">-1.3. The feature is enabled by default for maximum compatibility with<br class="">-broken middle boxes. Users should be able to disable the hack and CPython's test suite needs<br class="">-it to verify default options<br class="">-<br class="">-Signed-off-by: Christian Heimes <<a href="mailto:christian@python.org" class="">christian@python.org</a>><br class="">-<br class="">-Upstream-Status: Backport<br class="">-[<a href="https://github.com/python/cpython/commit/2a4ee8aa01d61b6a9c8e9c65c211e61bdb471826" class="">https://github.com/python/cpython/commit/2a4ee8aa01d61b6a9c8e9c65c211e61bdb471826</a>]<br class="">-<br class="">-Signed-off-by: Anuj Mittal <<a href="mailto:anuj.mittal@intel.com" class="">anuj.mittal@intel.com</a>><br class="">----<br class="">- Doc/library/ssl.rst | 9 ++++++<br class="">- Lib/test/test_asyncio/test_events.py | 6 +++-<br class="">- Lib/test/test_ssl.py | 29 +++++++++++++++----<br class="">- .../2018-08-14-08-57-01.bpo-32947.mqStVW.rst | 2 ++<br class="">- Modules/_ssl.c | 4 +++<br class="">- 5 files changed, 44 insertions(+), 6 deletions(-)<br class="">- create mode 100644 Misc/NEWS.d/next/Library/2018-08-14-08-57-01.bpo-32947.mqStVW.rst<br class="">-<br class="">-diff --git a/Doc/library/ssl.rst b/Doc/library/ssl.rst<br class="">-index 29c5e94cf6..f63a3deec5 100644<br class="">---- a/Doc/library/ssl.rst<br class="">-+++ b/Doc/library/ssl.rst<br class="">-@@ -757,6 +757,15 @@ Constants<br class="">-<br class="">- .. versionadded:: 3.3<br class="">-<br class="">-+.. data:: OP_ENABLE_MIDDLEBOX_COMPAT<br class="">-+<br class="">-+ Send dummy Change Cipher Spec (CCS) messages in TLS 1.3 handshake to make<br class="">-+ a TLS 1.3 connection look more like a TLS 1.2 connection.<br class="">-+<br class="">-+ This option is only available with OpenSSL 1.1.1 and later.<br class="">-+<br class="">-+ .. versionadded:: 3.6.7<br class="">-+<br class="">- .. data:: OP_NO_COMPRESSION<br class="">-<br class="">- Disable compression on the SSL channel. This is useful if the application<br class="">-diff --git a/Lib/test/test_asyncio/test_events.py b/Lib/test/test_asyncio/test_events.py<br class="">-index 492a84a231..6f208474b9 100644<br class="">---- a/Lib/test/test_asyncio/test_events.py<br class="">-+++ b/Lib/test/test_asyncio/test_events.py<br class="">-@@ -1169,7 +1169,11 @@ class EventLoopTestsMixin:<br class="">- self.loop.run_until_complete(f_c)<br class="">-<br class="">- # close connection<br class="">-- proto.transport.close()<br class="">-+ # transport may be None with TLS 1.3, because connection is<br class="">-+ # interrupted, server is unable to send session tickets, and<br class="">-+ # transport is closed.<br class="">-+ if proto.transport is not None:<br class="">-+ proto.transport.close()<br class="">- server.close()<br class="">-<br class="">- def test_legacy_create_server_ssl_match_failed(self):<br class="">-diff --git a/Lib/test/test_ssl.py b/Lib/test/test_ssl.py<br class="">-index 1acc12ec2d..a2e1d32a62 100644<br class="">---- a/Lib/test/test_ssl.py<br class="">-+++ b/Lib/test/test_ssl.py<br class="">-@@ -78,6 +78,7 @@ OP_NO_COMPRESSION = getattr(ssl, "OP_NO_COMPRESSION", 0)<br class="">- OP_SINGLE_DH_USE = getattr(ssl, "OP_SINGLE_DH_USE", 0)<br class="">- OP_SINGLE_ECDH_USE = getattr(ssl, "OP_SINGLE_ECDH_USE", 0)<br class="">- OP_CIPHER_SERVER_PREFERENCE = getattr(ssl, "OP_CIPHER_SERVER_PREFERENCE", 0)<br class="">-+OP_ENABLE_MIDDLEBOX_COMPAT = getattr(ssl, "OP_ENABLE_MIDDLEBOX_COMPAT", 0)<br class="">-<br class="">-<br class="">- def handle_error(prefix):<br class="">-@@ -155,8 +156,8 @@ class BasicSocketTests(unittest.TestCase):<br class="">- ssl.OP_NO_TLSv1<br class="">- ssl.OP_NO_TLSv1_3<br class="">- if ssl.OPENSSL_VERSION_INFO >= (1, 0, 1):<br class="">-- ssl.OP_NO_TLSv1_1<br class="">-- ssl.OP_NO_TLSv1_2<br class="">-+ ssl.OP_NO_TLSv1_1<br class="">-+ ssl.OP_NO_TLSv1_2<br class="">-<br class="">- def test_str_for_enums(self):<br class="">- # Make sure that the PROTOCOL_* constants have enum-like string<br class="">-@@ -854,7 +855,8 @@ class ContextTests(unittest.TestCase):<br class="">- default = (ssl.OP_ALL | ssl.OP_NO_SSLv2 | ssl.OP_NO_SSLv3)<br class="">- # SSLContext also enables these by default<br class="">- default |= (OP_NO_COMPRESSION | OP_CIPHER_SERVER_PREFERENCE |<br class="">-- OP_SINGLE_DH_USE | OP_SINGLE_ECDH_USE)<br class="">-+ OP_SINGLE_DH_USE | OP_SINGLE_ECDH_USE |<br class="">-+ OP_ENABLE_MIDDLEBOX_COMPAT)<br class="">- self.assertEqual(default, ctx.options)<br class="">- ctx.options |= ssl.OP_NO_TLSv1<br class="">- self.assertEqual(default | ssl.OP_NO_TLSv1, ctx.options)<br class="">-@@ -1860,11 +1862,26 @@ else:<br class="">- self.sock, server_side=True)<br class="">- self.server.selected_npn_protocols.append(self.sslconn.selected_npn_protocol())<br class="">- self.server.selected_alpn_protocols.append(self.sslconn.selected_alpn_protocol())<br class="">-- except (ssl.SSLError, ConnectionResetError) as e:<br class="">-+ except (ConnectionResetError, BrokenPipeError) as e:<br class="">- # We treat ConnectionResetError as though it were an<br class="">- # SSLError - OpenSSL on Ubuntu abruptly closes the<br class="">- # connection when asked to use an unsupported protocol.<br class="">- #<br class="">-+ # BrokenPipeError is raised in TLS 1.3 mode, when OpenSSL<br class="">-+ # tries to send session tickets after handshake.<br class="">-+ # <a href="https://github.com/openssl/openssl/issues/6342" class="">https://github.com/openssl/openssl/issues/6342</a><br class="">-+ self.server.conn_errors.append(str(e))<br class="">-+ if self.server.chatty:<br class="">-+ handle_error(<br class="">-+ "\n server: bad connection attempt from " + repr(<br class="">-+ self.addr) + ":\n")<br class="">-+ self.running = False<br class="">-+ self.close()<br class="">-+ return False<br class="">-+ except (ssl.SSLError, OSError) as e:<br class="">-+ # OSError may occur with wrong protocols, e.g. both<br class="">-+ # sides use PROTOCOL_TLS_SERVER.<br class="">-+ #<br class="">- # XXX Various errors can have happened here, for example<br class="">- # a mismatching protocol version, an invalid certificate,<br class="">- # or a low-level bug. This should be made more discriminating.<br class="">-@@ -2974,7 +2991,7 @@ else:<br class="">- # Block on the accept and wait on the connection to close.<br class="">- evt.set()<br class="">- remote, peer = server.accept()<br class="">-- remote.recv(1)<br class="">-+ remote.send(remote.recv(4))<br class="">-<br class="">- t = threading.Thread(target=serve)<br class="">- t.start()<br class="">-@@ -2982,6 +2999,8 @@ else:<br class="">- evt.wait()<br class="">- client = context.wrap_socket(socket.socket())<br class="">- client.connect((host, port))<br class="">-+ client.send(b'data')<br class="">-+ client.recv()<br class="">- client_addr = client.getsockname()<br class="">- client.close()<br class="">- t.join()<br class="">-diff --git a/Misc/NEWS.d/next/Library/2018-08-14-08-57-01.bpo-32947.mqStVW.rst b/Misc/NEWS.d/next/Library/2018-08-14-08-57-01.bpo-32947.mqStVW.rst<br class="">-new file mode 100644<br class="">-index 0000000000..28de360c36<br class="">---- /dev/null<br class="">-+++ b/Misc/NEWS.d/next/Library/2018-08-14-08-57-01.bpo-32947.mqStVW.rst<br class="">-@@ -0,0 +1,2 @@<br class="">-+Add OP_ENABLE_MIDDLEBOX_COMPAT and test workaround for TLSv1.3 for future<br class="">-+compatibility with OpenSSL 1.1.1.<br class="">-diff --git a/Modules/_ssl.c b/Modules/_ssl.c<br class="">-index c71d89607c..eb123a87ba 100644<br class="">---- a/Modules/_ssl.c<br class="">-+++ b/Modules/_ssl.c<br class="">-@@ -4858,6 +4858,10 @@ PyInit__ssl(void)<br class="">- PyModule_AddIntConstant(m, "OP_NO_COMPRESSION",<br class="">- SSL_OP_NO_COMPRESSION);<br class="">- #endif<br class="">-+#ifdef SSL_OP_ENABLE_MIDDLEBOX_COMPAT<br class="">-+ PyModule_AddIntConstant(m, "OP_ENABLE_MIDDLEBOX_COMPAT",<br class="">-+ SSL_OP_ENABLE_MIDDLEBOX_COMPAT);<br class="">-+#endif<br class="">-<br class="">- #if HAVE_SNI<br class="">- r = Py_True;<br class="">---<br class="">-2.17.1<br class="">-<br class="">diff --git a/meta/recipes-devtools/python/python3/0004-bpo-33570-TLS-1.3-ciphers-for-OpenSSL-1.1.1-GH-6976.patch b/meta/recipes-devtools/python/python3/0004-bpo-33570-TLS-1.3-ciphers-for-OpenSSL-1.1.1-GH-6976.patch<br class="">deleted file mode 100644<br class="">index b97d5501e1..0000000000<br class="">--- a/meta/recipes-devtools/python/python3/0004-bpo-33570-TLS-1.3-ciphers-for-OpenSSL-1.1.1-GH-6976.patch<br class="">+++ /dev/null<br class="">@@ -1,110 +0,0 @@<br class="">-From 0c9354362bfa5f90fbea8ff8237a1f1f5dba686f Mon Sep 17 00:00:00 2001<br class="">-From: Christian Heimes <<a href="mailto:christian@python.org" class="">christian@python.org</a>><br class="">-Date: Wed, 12 Sep 2018 15:20:31 +0800<br class="">-Subject: [PATCH] bpo-33570: TLS 1.3 ciphers for OpenSSL 1.1.1 (GH-6976)<br class="">-<br class="">-Change TLS 1.3 cipher suite settings for compatibility with OpenSSL<br class="">-1.1.1-pre6 and newer. OpenSSL 1.1.1 will have TLS 1.3 cipers enabled by<br class="">-default.<br class="">-<br class="">-Also update multissltests and Travis config to test with latest OpenSSL.<br class="">-<br class="">-Signed-off-by: Christian Heimes <<a href="mailto:christian@python.org" class="">christian@python.org</a>><br class="">-(cherry picked from commit e8eb6cb7920ded66abc5d284319a8539bdc2bae3)<br class="">-<br class="">-Co-authored-by: Christian Heimes <<a href="mailto:christian@python.org" class="">christian@python.org</a><br class="">-<br class="">-Upstream-Status: Backport<br class="">-[<a href="https://github.com/python/cpython/commit/3e630c541b35c96bfe5619165255e559f577ee71" class="">https://github.com/python/cpython/commit/3e630c541b35c96bfe5619165255e559f577ee71</a>]<br class="">-<br class="">-Tweaked patch to not take changes for multissltests and Travis config.<br class="">-<br class="">-Signed-off-by: Anuj Mittal <<a href="mailto:anuj.mittal@intel.com" class="">anuj.mittal@intel.com</a>><br class="">----<br class="">- Lib/test/test_ssl.py | 51 ++++++++++++++++++++++----------------------<br class="">- 1 file changed, 26 insertions(+), 25 deletions(-)<br class="">-<br class="">-diff --git a/Lib/test/test_ssl.py b/Lib/test/test_ssl.py<br class="">-index a2e1d32a62..c484ead5ff 100644<br class="">---- a/Lib/test/test_ssl.py<br class="">-+++ b/Lib/test/test_ssl.py<br class="">-@@ -3024,17 +3024,21 @@ else:<br class="">- sock.do_handshake()<br class="">- self.assertEqual(cm.exception.errno, errno.ENOTCONN)<br class="">-<br class="">-- def test_default_ciphers(self):<br class="">-- context = ssl.SSLContext(ssl.PROTOCOL_SSLv23)<br class="">-- try:<br class="">-- # Force a set of weak ciphers on our client context<br class="">-- context.set_ciphers("DES")<br class="">-- except ssl.SSLError:<br class="">-- self.skipTest("no DES cipher available")<br class="">-- with ThreadedEchoServer(CERTFILE,<br class="">-- ssl_version=ssl.PROTOCOL_SSLv23,<br class="">-- chatty=False) as server:<br class="">-- with context.wrap_socket(socket.socket()) as s:<br class="">-+ def test_no_shared_ciphers(self):<br class="">-+ server_context = ssl.SSLContext(ssl.PROTOCOL_SSLv23)<br class="">-+ server_context.load_cert_chain(SIGNED_CERTFILE)<br class="">-+ client_context = ssl.SSLContext(ssl.PROTOCOL_SSLv23)<br class="">-+ client_context.verify_mode = ssl.CERT_REQUIRED<br class="">-+ client_context.check_hostname = True<br class="">-+<br class="">-+ client_context.set_ciphers("AES128")<br class="">-+ server_context.set_ciphers("AES256")<br class="">-+ # OpenSSL enables all TLS 1.3 ciphers, enforce TLS 1.2 for test<br class="">-+ client_context.options |= ssl.OP_NO_TLSv1_3<br class="">-+ with ThreadedEchoServer(context=server_context) as server:<br class="">-+ with client_context.wrap_socket(<br class="">-+ socket.socket(),<br class="">-+ server_hostname="localhost") as s:<br class="">- with self.assertRaises(OSError):<br class="">- s.connect((HOST, server.port))<br class="">- self.assertIn("no shared cipher", str(server.conn_errors[0]))<br class="">-@@ -3067,9 +3071,9 @@ else:<br class="">- with context.wrap_socket(socket.socket()) as s:<br class="">- s.connect((HOST, server.port))<br class="">- self.assertIn(s.cipher()[0], [<br class="">-- 'TLS13-AES-256-GCM-SHA384',<br class="">-- 'TLS13-CHACHA20-POLY1305-SHA256',<br class="">-- 'TLS13-AES-128-GCM-SHA256',<br class="">-+ 'TLS_AES_256_GCM_SHA384',<br class="">-+ 'TLS_CHACHA20_POLY1305_SHA256',<br class="">-+ 'TLS_AES_128_GCM_SHA256',<br class="">- ])<br class="">-<br class="">- @unittest.skipUnless(ssl.HAS_ECDH, "test requires ECDH-enabled OpenSSL")<br class="">-@@ -3391,22 +3395,19 @@ else:<br class="">- client_context = ssl.SSLContext(ssl.PROTOCOL_TLSv1)<br class="">- client_context.verify_mode = ssl.CERT_REQUIRED<br class="">- client_context.load_verify_locations(SIGNING_CA)<br class="">-- if ssl.OPENSSL_VERSION_INFO >= (1, 0, 2):<br class="">-- client_context.set_ciphers("AES128:AES256")<br class="">-- server_context.set_ciphers("AES256")<br class="">-- alg1 = "AES256"<br class="">-- alg2 = "AES-256"<br class="">-- else:<br class="">-- client_context.set_ciphers("AES:3DES")<br class="">-- server_context.set_ciphers("3DES")<br class="">-- alg1 = "3DES"<br class="">-- alg2 = "DES-CBC3"<br class="">-+ client_context.set_ciphers("AES128:AES256")<br class="">-+ server_context.set_ciphers("AES256")<br class="">-+ expected_algs = [<br class="">-+ "AES256", "AES-256",<br class="">-+ # TLS 1.3 ciphers are always enabled<br class="">-+ "TLS_CHACHA20", "TLS_AES",<br class="">-+ ]<br class="">-<br class="">- stats = server_params_test(client_context, server_context)<br class="">- ciphers = stats['server_shared_ciphers'][0]<br class="">- self.assertGreater(len(ciphers), 0)<br class="">- for name, tls_version, bits in ciphers:<br class="">-- if not alg1 in name.split("-") and alg2 not in name:<br class="">-+ if not any (alg in name for alg in expected_algs):<br class="">- self.fail(name)<br class="">-<br class="">- def test_read_write_after_close_raises_valuerror(self):<br class="">---<br class="">-2.17.1<br class="">-<br class="">diff --git a/meta/recipes-devtools/python/python3/0005-bpo-30714-ALPN-changes-for-OpenSSL-1.1.0f-2305.patch b/meta/recipes-devtools/python/python3/0005-bpo-30714-ALPN-changes-for-OpenSSL-1.1.0f-2305.patch<br class="">deleted file mode 100644<br class="">index d609847204..0000000000<br class="">--- a/meta/recipes-devtools/python/python3/0005-bpo-30714-ALPN-changes-for-OpenSSL-1.1.0f-2305.patch<br class="">+++ /dev/null<br class="">@@ -1,68 +0,0 @@<br class="">-From 7b40cb7293cb14e5c7c8ed123efaf9acb33edae2 Mon Sep 17 00:00:00 2001<br class="">-From: Christian Heimes <<a href="mailto:christian@python.org" class="">christian@python.org</a>><br class="">-Date: Tue, 15 Aug 2017 10:33:43 +0200<br class="">-Subject: [PATCH] bpo-30714: ALPN changes for OpenSSL 1.1.0f (#2305)<br class="">-<br class="">-OpenSSL 1.1.0 to 1.1.0e aborted the handshake when server and client<br class="">-could not agree on a protocol using ALPN. OpenSSL 1.1.0f changed that.<br class="">-The most recent version now behaves like OpenSSL 1.0.2 again. The ALPN<br class="">-callback can pretend to not been set.<br class="">-<br class="">-See <a href="https://github.com/openssl/openssl/pull/3158" class="">https://github.com/openssl/openssl/pull/3158</a> for more details<br class="">-<br class="">-Signed-off-by: Christian Heimes <<a href="mailto:christian@python.org" class="">christian@python.org</a>><br class="">-<br class="">-Upstream-Status: Backport<br class="">-[<a href="https://github.com/python/cpython/commit/7b40cb7293cb14e5c7c8ed123efaf9acb33edae2" class="">https://github.com/python/cpython/commit/7b40cb7293cb14e5c7c8ed123efaf9acb33edae2</a>]<br class="">-<br class="">-Signed-off-by: Anuj Mittal <<a href="mailto:anuj.mittal@intel.com" class="">anuj.mittal@intel.com</a>><br class="">----<br class="">- Doc/library/ssl.rst | 5 +++--<br class="">- Lib/test/test_ssl.py | 5 +++--<br class="">- .../next/Tests/2017-07-25-15-27-44.bpo-30715.Sp7bTF.rst | 2 ++<br class="">- 3 files changed, 8 insertions(+), 4 deletions(-)<br class="">- create mode 100644 Misc/NEWS.d/next/Tests/2017-07-25-15-27-44.bpo-30715.Sp7bTF.rst<br class="">-<br class="">-diff --git a/Doc/library/ssl.rst b/Doc/library/ssl.rst<br class="">-index 729a239a1b..0a09e7e9d4 100644<br class="">---- a/Doc/library/ssl.rst<br class="">-+++ b/Doc/library/ssl.rst<br class="">-@@ -1447,8 +1447,9 @@ to speed up repeated connections from the same clients.<br class="">- This method will raise :exc:`NotImplementedError` if :data:`HAS_ALPN` is<br class="">- False.<br class="">-<br class="">-- OpenSSL 1.1.0+ will abort the handshake and raise :exc:`SSLError` when<br class="">-- both sides support ALPN but cannot agree on a protocol.<br class="">-+ OpenSSL 1.1.0 to 1.1.0e will abort the handshake and raise :exc:`SSLError`<br class="">-+ when both sides support ALPN but cannot agree on a protocol. 1.1.0f+<br class="">-+ behaves like 1.0.2, :meth:`SSLSocket.selected_alpn_protocol` returns None.<br class="">-<br class="">- .. versionadded:: 3.5<br class="">-<br class="">-diff --git a/Lib/test/test_ssl.py b/Lib/test/test_ssl.py<br class="">-index d960d82065..104b7f377a 100644<br class="">---- a/Lib/test/test_ssl.py<br class="">-+++ b/Lib/test/test_ssl.py<br class="">-@@ -3268,8 +3268,9 @@ if _have_threads:<br class="">- except ssl.SSLError as e:<br class="">- stats = e<br class="">-<br class="">-- if expected is None and IS_OPENSSL_1_1:<br class="">-- # OpenSSL 1.1.0 raises handshake error<br class="">-+ if (expected is None and IS_OPENSSL_1_1<br class="">-+ and ssl.OPENSSL_VERSION_INFO < (1, 1, 0, 6)):<br class="">-+ # OpenSSL 1.1.0 to 1.1.0e raises handshake error<br class="">- self.assertIsInstance(stats, ssl.SSLError)<br class="">- else:<br class="">- msg = "failed trying %s (s) and %s (c).\n" \<br class="">-diff --git a/Misc/NEWS.d/next/Tests/2017-07-25-15-27-44.bpo-30715.Sp7bTF.rst b/Misc/NEWS.d/next/Tests/2017-07-25-15-27-44.bpo-30715.Sp7bTF.rst<br class="">-new file mode 100644<br class="">-index 0000000000..88394e585c<br class="">---- /dev/null<br class="">-+++ b/Misc/NEWS.d/next/Tests/2017-07-25-15-27-44.bpo-30715.Sp7bTF.rst<br class="">-@@ -0,0 +1,2 @@<br class="">-+Address ALPN callback changes for OpenSSL 1.1.0f. The latest version behaves<br class="">-+like OpenSSL 1.0.2 and no longer aborts handshake.<br class="">---<br class="">-2.17.1<br class="">-<br class="">diff --git a/meta/recipes-devtools/python/python3/03-fix-tkinter-detection.patch b/meta/recipes-devtools/python/python3/03-fix-tkinter-detection.patch<br class="">index fddfd2b2f6..b916d04d05 100644<br class="">--- a/meta/recipes-devtools/python/python3/03-fix-tkinter-detection.patch<br class="">+++ b/meta/recipes-devtools/python/python3/03-fix-tkinter-detection.patch<br class="">@@ -4,11 +4,11 @@ Upstream-Status: Inappropriate [embedded specific]<br class=""> # will not be found.<br class=""> # Signed-Off: Michael 'Mickey' Lauer <<a href="mailto:mickey@vanille.de" class="">mickey@vanille.de</a>><br class=""><br class="">-Index: Python-3.3.0rc2/setup.py<br class="">-===================================================================<br class="">---- Python-3.3.0rc2.orig/setup.py 2012-09-20 15:24:14.009124003 -0700<br class="">-+++ Python-3.3.0rc2/setup.py 2012-09-20 15:25:08.449124963 -0700<br class="">-@@ -1620,7 +1620,7 @@<br class="">+diff --git a/setup.py b/setup.py<br class="">+index 37c5dd58a6..7f0e4d1010 100644<br class="">+--- a/setup.py<br class="">++++ b/setup.py<br class="">+@@ -1803,7 +1803,7 @@ class PyBuildExt(build_ext):<br class=""> dotversion = dotversion[:-1] + '.' + dotversion[-1]<br class=""> tcl_include_sub = []<br class=""> tk_include_sub = []<br class="">@@ -17,7 +17,7 @@ Index: Python-3.3.0rc2/setup.py<br class=""> tcl_include_sub += [dir + os.sep + "tcl" + dotversion]<br class=""> tk_include_sub += [dir + os.sep + "tk" + dotversion]<br class=""> tk_include_sub += tcl_include_sub<br class="">-@@ -1639,22 +1639,6 @@<br class="">+@@ -1822,22 +1822,6 @@ class PyBuildExt(build_ext):<br class=""> if dir not in include_dirs:<br class=""> include_dirs.append(dir)<br class=""><br class="">diff --git a/meta/recipes-devtools/python/python3/030-fixup-include-dirs.patch b/meta/recipes-devtools/python/python3/030-fixup-include-dirs.patch<br class="">index 6beac7b805..c12f11c6e7 100644<br class="">--- a/meta/recipes-devtools/python/python3/030-fixup-include-dirs.patch<br class="">+++ b/meta/recipes-devtools/python/python3/030-fixup-include-dirs.patch<br class="">@@ -22,12 +22,3 @@ Index: Python-3.3.2/setup.py<br class=""><br class=""> # Add paths specified in the environment variables LDFLAGS and<br class=""> # CPPFLAGS for header and library files.<br class="">-@@ -480,7 +481,7 @@ class PyBuildExt(build_ext):<br class="">- for directory in reversed(options.dirs):<br class="">- add_dir_to_list(dir_list, directory)<br class="">-<br class="">-- if os.path.normpath(sys.base_prefix) != '/usr' \<br class="">-+ if not cross_compiling and os.path.normpath(sys.base_prefix) != '/usr' \<br class="">- and not sysconfig.get_config_var('PYTHONFRAMEWORK'):<br class="">- # OSX note: Don't add LIBDIR and INCLUDEDIR to building a framework<br class="">- # (PYTHONFRAMEWORK is set) to avoid # linking problems when<br class="">diff --git a/meta/recipes-devtools/python/python3/080-distutils-dont_adjust_files.patch b/meta/recipes-devtools/python/python3/080-distutils-dont_adjust_files.patch<br class="">index b96419a638..1bd6e56117 100644<br class="">--- a/meta/recipes-devtools/python/python3/080-distutils-dont_adjust_files.patch<br class="">+++ b/meta/recipes-devtools/python/python3/080-distutils-dont_adjust_files.patch<br class="">@@ -14,11 +14,11 @@ Upstream-Status: Inappropriate [Embedded-Specific]<br class=""><br class=""><br class=""> def copy_scripts(self):<br class="">-- """Copy each script listed in 'self.scripts'; if it's marked as a<br class="">+- r"""Copy each script listed in 'self.scripts'; if it's marked as a<br class=""> - Python script in the Unix way (first line matches 'first_line_re',<br class=""> - ie. starts with "\#!" and contains "python"), then adjust the first<br class=""> - line to refer to the current Python interpreter as we copy.<br class="">-+ """Copy each script listed in 'self.scripts'<br class="">++ r"""Copy each script listed in 'self.scripts'<br class=""> """<br class=""> self.mkpath(self.build_dir)<br class=""> outfiles = []<br class="">diff --git a/meta/recipes-devtools/python/python3/150-fix-setupterm.patch b/meta/recipes-devtools/python/python3/150-fix-setupterm.patch<br class="">deleted file mode 100644<br class="">index 78d7c78670..0000000000<br class="">--- a/meta/recipes-devtools/python/python3/150-fix-setupterm.patch<br class="">+++ /dev/null<br class="">@@ -1,17 +0,0 @@<br class="">-Fix warning with newer compiler<br class="">-<br class="">--Khem<br class="">-<br class="">-Upstream-Status: Pending<br class="">-<br class="">---- a/Modules/_cursesmodule.c<br class="">-+++ b/Modules/_cursesmodule.c<br class="">-@@ -116,7 +116,7 @@ char *PyCursesVersion = "2.2";<br class="">- #defines many common symbols (such as "lines") which breaks the<br class="">- curses module in other ways. So the code will just specify<br class="">- explicit prototypes here. */<br class="">--extern int setupterm(char *,int,int *);<br class="">-+//extern int setupterm(char *,int,int *);<br class="">- #ifdef __sgi<br class="">- #include <term.h><br class="">- #endif<br class="">diff --git a/meta/recipes-devtools/python/python3/Use-correct-CFLAGS-for-extensions-when-cross-compili.patch b/meta/recipes-devtools/python/python3/Use-correct-CFLAGS-for-extensions-when-cross-compili.patch<br class="">index ae74ef531d..35b849e399 100644<br class="">--- a/meta/recipes-devtools/python/python3/Use-correct-CFLAGS-for-extensions-when-cross-compili.patch<br class="">+++ b/meta/recipes-devtools/python/python3/Use-correct-CFLAGS-for-extensions-when-cross-compili.patch<br class="">@@ -9,6 +9,11 @@ profile-optimized build.<br class=""><br class=""> Upstream-Status: Pending<br class=""><br class="">+2018-08:<br class="">+ * Rebased <a href="http://Makefile.pre.in" class="">Makefile.pre.in</a> for 3.7<br class="">+ * Remove patch for setup.py in favor of upstream fix<br class="">+ -- Jens<br class="">+<br class=""> Signed-off-by: Markus Lehtonen <<a href="mailto:markus.lehtonen@linux.intel.com" class="">markus.lehtonen@linux.intel.com</a>><br class=""> ---<br class=""> <a href="http://Makefile.pre.in" class="">Makefile.pre.in</a> | 4 ++--<br class="">@@ -16,41 +21,31 @@ Signed-off-by: Markus Lehtonen <<a href="mailto:markus.lehtonen@linux.intel.com" class="">markus.lehtonen@linux.intel.com</a>><br class=""> 2 files changed, 4 insertions(+), 3 deletions(-)<br class=""><br class=""> diff --git a/<a href="http://Makefile.pre.in" class="">Makefile.pre.in</a> b/<a href="http://Makefile.pre.in" class="">Makefile.pre.in</a><br class="">-index e2d5d3d..84bc3ff 100644<br class="">+index 4c23c0e411..0871c98f29 100644<br class=""> --- a/<a href="http://Makefile.pre.in" class="">Makefile.pre.in</a><br class=""> +++ b/<a href="http://Makefile.pre.in" class="">Makefile.pre.in</a><br class="">-@@ -478,7 +478,7 @@ profile-opt:<br class="">- $(MAKE) profile-removal<br class="">+@@ -497,6 +497,7 @@ profile-run-stamp:<br class=""><br class=""> build_all_generate_profile:<br class="">-- $(MAKE) @DEF_MAKE_RULE@ CFLAGS_NODIST="$(CFLAGS) $(PGO_PROF_GEN_FLAG) @LTOFLAGS@" LDFLAGS="$(LDFLAGS) $(PGO_PROF_GEN_FLAG) @LTOFLAGS@" LIBS="$(LIBS)"<br class="">-+ $(MAKE) @DEF_MAKE_RULE@ CFLAGS_NODIST="$(CFLAGS) $(EXTRA_CFLAGS) $(PGO_PROF_GEN_FLAG) @LTOFLAGS@" LDFLAGS="$(LDFLAGS) $(PGO_PROF_GEN_FLAG) @LTOFLAGS@" LIBS="$(LIBS)"<br class="">+ $(MAKE) @DEF_MAKE_RULE@ CFLAGS_NODIST="$(CFLAGS) $(PGO_PROF_GEN_FLAG)" LDFLAGS="$(LDFLAGS) $(PGO_PROF_GEN_FLAG)" LIBS="$(LIBS)"<br class="">++ $(MAKE) @DEF_MAKE_RULE@ CFLAGS_NODIST="$(CFLAGS) $(EXTRA_CFLAGS) $(PGO_PROF_GEN_FLAG)" LDFLAGS="$(LDFLAGS) $(PGO_PROF_GEN_FLAG)" LIBS="$(LIBS)"<br class=""><br class=""> run_profile_task:<br class="">- : # FIXME: can't run for a cross build<br class="">-@@ -488,7 +488,7 @@ build_all_merge_profile:<br class="">- $(LLVM_PROF_MERGER)<br class="">-<br class="">- build_all_use_profile:<br class="">-- $(MAKE) @DEF_MAKE_RULE@ CFLAGS_NODIST="$(CFLAGS) $(PGO_PROF_USE_FLAG) @LTOFLAGS@" LDFLAGS="$(LDFLAGS) @LTOFLAGS@"<br class="">-+ $(MAKE) @DEF_MAKE_RULE@ CFLAGS_NODIST="$(CFLAGS) $(EXTRA_CFLAGS) $(PGO_PROF_USE_FLAG) @LTOFLAGS@" LDFLAGS="$(LDFLAGS) @LTOFLAGS@"<br class="">+ @ # FIXME: can't run for a cross build<br class="">+@@ -510,14 +511,14 @@ build_all_merge_profile:<br class="">+ profile-opt: profile-run-stamp<br class="">+ @echo "Rebuilding with profile guided optimizations:"<br class="">+ -rm -f profile-clean-stamp<br class="">+- $(MAKE) @DEF_MAKE_RULE@ CFLAGS_NODIST="$(CFLAGS) $(PGO_PROF_USE_FLAG)" LDFLAGS="$(LDFLAGS)"<br class="">++ $(MAKE) @DEF_MAKE_RULE@ CFLAGS_NODIST="$(CFLAGS) $(EXTRA_CFLAGS) $(PGO_PROF_USE_FLAG)" LDFLAGS="$(LDFLAGS)"<br class=""><br class=""> # Compile and run with gcov<br class=""> .PHONY=coverage coverage-lcov coverage-report<br class="">-diff --git a/setup.py b/setup.py<br class="">-index add3346..65e83b1 100644<br class="">---- a/setup.py<br class="">-+++ b/setup.py<br class="">-@@ -263,7 +263,8 @@ class PyBuildExt(build_ext):<br class="">- # compilers<br class="">- if compiler is not None:<br class="">- if cross_compiling:<br class="">-- (ccshared,cflags) = (os.environ.get('CCSHARED') or '', os.environ.get('CFLAGS') or '')<br class="">-+ (ccshared,cflags) = (os.environ.get('CCSHARED') or '',<br class="">-+ (os.environ.get('CFLAGS') or '') + ' ' + sysconfig.get_config_var('PY_CFLAGS_NODIST'))<br class="">- else:<br class="">- (ccshared,cflags) = sysconfig.get_config_vars('CCSHARED','CFLAGS')<br class="">- args['compiler_so'] = compiler + ' ' + ccshared + ' ' + cflags<br class="">---<br class="">-2.17.1<br class="">-<br class="">+ coverage:<br class="">+ @echo "Building with support for coverage checking:"<br class="">+ $(MAKE) clean profile-removal<br class="">+- $(MAKE) @DEF_MAKE_RULE@ CFLAGS="$(CFLAGS) -O0 -pg -fprofile-arcs -ftest-coverage" LIBS="$(LIBS) -lgcov"<br class="">++ $(MAKE) @DEF_MAKE_RULE@ CFLAGS="$(CFLAGS) $(EXTRA_CFLAGS) -O0 -pg -fprofile-arcs -ftest-coverage" LIBS="$(LIBS) -lgcov"<br class="">+<br class="">+ coverage-lcov:<br class="">+ @echo "Creating Coverage HTML report with LCOV:"<br class="">diff --git a/meta/recipes-devtools/python/python3/avoid-ncursesw-include-path.patch b/meta/recipes-devtools/python/python3/avoid-ncursesw-include-path.patch<br class="">index f29ae53371..7e1dc4ef5b 100644<br class="">--- a/meta/recipes-devtools/python/python3/avoid-ncursesw-include-path.patch<br class="">+++ b/meta/recipes-devtools/python/python3/avoid-ncursesw-include-path.patch<br class="">@@ -6,16 +6,16 @@ hardcoded locations for include paths<br class=""><br class=""> Signed-off-by: Khem Raj <<a href="mailto:raj.khem@gmail.com" class="">raj.khem@gmail.com</a>><br class=""><br class="">-Index: Python-3.4.2/configure.ac<br class="">-===================================================================<br class="">---- Python-3.4.2.orig/configure.ac<br class="">-+++ Python-3.4.2/configure.ac<br class="">-@@ -4434,7 +4434,7 @@ fi<br class="">-<br class="">+diff --git a/configure.ac b/configure.ac<br class="">+index 2b8aa4d592..1f5bf4b4b0 100644<br class="">+--- a/configure.ac<br class="">++++ b/configure.ac<br class="">+@@ -4976,7 +4976,7 @@ fi<br class=""> # first curses header check<br class=""> ac_save_cppflags="$CPPFLAGS"<br class="">--CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"<br class="">-+CPPFLAGS="$CPPFLAGS -I=/usr/include/ncursesw"<br class="">+ if test "$cross_compiling" = no; then<br class="">+- CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"<br class="">++ CPPFLAGS="$CPPFLAGS -I=/usr/include/ncursesw"<br class="">+ fi<br class=""><br class=""> AC_CHECK_HEADERS(curses.h ncurses.h)<br class="">-<br class="">diff --git a/meta/recipes-devtools/python/python3/avoid_warning_about_tkinter.patch b/meta/recipes-devtools/python/python3/avoid_warning_about_tkinter.patch<br class="">index a3cc48c9a4..ebdd64b7b5 100644<br class="">--- a/meta/recipes-devtools/python/python3/avoid_warning_about_tkinter.patch<br class="">+++ b/meta/recipes-devtools/python/python3/avoid_warning_about_tkinter.patch<br class="">@@ -5,13 +5,17 @@ Avoid a warning by not adding this module to missing variable.<br class=""> Upstream-Status: Inappropriate [distribution]<br class=""><br class=""> Also simply disable the tk module since its not in DEPENDS.<br class="">+<br class="">+2018-08: Rebased for 3.7.0<br class="">+ -- Jens<br class="">+<br class=""> Signed-off-by: Andrei Gherzan <<a href="mailto:andrei@gherzan.ro" class="">andrei@gherzan.ro</a>><br class=""><br class="">-Index: Python-3.5.3/setup.py<br class="">-===================================================================<br class="">---- Python-3.5.3.orig/setup.py<br class="">-+++ Python-3.5.3/setup.py<br class="">-@@ -1558,10 +1558,12 @@ class PyBuildExt(build_ext):<br class="">+diff --git a/setup.py b/setup.py<br class="">+index 37c5dd58a6..0321245761 100644<br class="">+--- a/setup.py<br class="">++++ b/setup.py<br class="">+@@ -1608,10 +1608,12 @@ class PyBuildExt(build_ext):<br class=""> self.extensions.extend(exts)<br class=""><br class=""> # Call the method for detecting whether _tkinter can be compiled<br class="">@@ -25,5 +29,5 @@ Index: Python-3.5.3/setup.py<br class=""> + #if '_tkinter' not in [e.name for e in self.extensions]:<br class=""> + # missing.append('_tkinter')<br class=""><br class="">- ## # Uncomment these lines if you want to play with xxmodule.c<br class="">- ## ext = Extension('xx', ['xxmodule.c'])<br class="">+ # Build the _uuid module if possible<br class="">+ uuid_incs = find_file("uuid.h", inc_dirs, ["/usr/include/uuid"])<br class="">diff --git a/meta/recipes-devtools/python/python3/configure.ac-fix-LIBPL.patch b/meta/recipes-devtools/python/python3/configure.ac-fix-LIBPL.patch<br class="">index 97214f9aa4..689baf00ad 100644<br class="">--- a/meta/recipes-devtools/python/python3/configure.ac-fix-LIBPL.patch<br class="">+++ b/meta/recipes-devtools/python/python3/configure.ac-fix-LIBPL.patch<br class="">@@ -7,24 +7,27 @@ Use LIBDIR rather than prefix/lib, so that it would work when lib64.<br class=""><br class=""> Upstream-Status: Pending<br class=""><br class="">+2018-08: rebased and adopted for 3.7<br class="">+ -- Jens<br class="">+<br class=""> Signed-off-by: Robert Yang <<a href="mailto:liezhi.yang@windriver.com" class="">liezhi.yang@windriver.com</a>><br class=""> ---<br class=""> configure.ac | 2 +-<br class=""> 1 file changed, 1 insertion(+), 1 deletion(-)<br class=""><br class=""> diff --git a/configure.ac b/configure.ac<br class="">-index 63aef8e..aefb27f 100644<br class="">+index 2b8aa4d592..0da15fbbdf 100644<br class=""> --- a/configure.ac<br class=""> +++ b/configure.ac<br class="">-@@ -4366,7 +4366,7 @@ AC_MSG_RESULT($LDVERSION)<br class="">-<br class="">+@@ -4674,9 +4674,9 @@ AC_MSG_RESULT($LDVERSION)<br class=""> dnl define LIBPL after ABIFLAGS and LDVERSION is defined.<br class=""> AC_SUBST(PY_ENABLE_SHARED)<br class="">--LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}"<br class="">-+LIBPL='$(LIBDIR)'"/python${VERSION}/config-${LDVERSION}"<br class="">+ if test x$PLATFORM_TRIPLET = x; then<br class="">+- LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}"<br class="">++ LIBPL='$(LIBDIR)'"/python${VERSION}/config-${LDVERSION}"<br class="">+ else<br class="">+- LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}-${PLATFORM_TRIPLET}"<br class="">++ LIBPL='$(LIBDIR)'"/python${VERSION}/config-${LDVERSION}-${PLATFORM_TRIPLET}"<br class="">+ fi<br class=""> AC_SUBST(LIBPL)<br class=""><br class="">- # Check whether right shifting a negative integer extends the sign bit<br class="">---<br class="">-1.7.9.5<br class="">-<br class="">diff --git a/meta/recipes-devtools/python/python3/float-endian.patch b/meta/recipes-devtools/python/python3/float-endian.patch<br class="">index 6ba3f5c252..1511f00bc3 100644<br class="">--- a/meta/recipes-devtools/python/python3/float-endian.patch<br class="">+++ b/meta/recipes-devtools/python/python3/float-endian.patch<br class="">@@ -21,19 +21,19 @@ Subject: [PATCH] Don't do runtime test to get float byte order<br class=""> create mode 100644 m4/ax_c_float_words_bigendian.m4<br class=""><br class=""> diff --git a/configure.ac b/configure.ac<br class="">-index c9b755f0f4..1215969871 100644<br class="">+index 2b8aa4d592..80aa37125f 100644<br class=""> --- a/configure.ac<br class=""> +++ b/configure.ac<br class="">-@@ -9,6 +9,8 @@ AC_PREREQ(2.65)<br class="">+@@ -11,6 +11,8 @@ AC_INIT(python, PYTHON_VERSION, <a href="https://bugs.python.org/" class="">https://bugs.python.org/</a>)<br class=""><br class="">- AC_INIT(python, PYTHON_VERSION, <a href="https://bugs.python.org/" class="">https://bugs.python.org/</a>)<br class="">+ AC_CONFIG_MACRO_DIR(m4)<br class=""><br class=""> +AC_CONFIG_MACRO_DIR(m4)<br class=""> +<br class=""> AC_SUBST(BASECPPFLAGS)<br class=""> if test "$srcdir" != . -a "$srcdir" != "$(pwd)"; then<br class=""> # If we're building out-of-tree, we need to make sure the following<br class="">-@@ -4128,77 +4130,19 @@ fi<br class="">+@@ -4264,77 +4266,19 @@ fi<br class=""> # * Check for various properties of floating point *<br class=""> # **************************************************<br class=""><br class="">@@ -209,4 +209,3 @@ index 0000000000..216b90d803<br class=""> +])# AX_C_FLOAT_WORDS_BIGENDIAN<br class=""> --<br class=""> 2.11.0<br class="">-<br class="">diff --git a/meta/recipes-devtools/python/python3/pass-missing-libraries-to-Extension-for-mul.patch b/meta/recipes-devtools/python/python3/pass-missing-libraries-to-Extension-for-mul.patch<br class="">index 5c3af6b626..1ce4defe95 100644<br class="">--- a/meta/recipes-devtools/python/python3/pass-missing-libraries-to-Extension-for-mul.patch<br class="">+++ b/meta/recipes-devtools/python/python3/pass-missing-libraries-to-Extension-for-mul.patch<br class="">@@ -47,16 +47,19 @@ And the semaphore issue also caused multiprocessing.Queue().put() hung.<br class=""><br class=""> Upstream-Status: Submitted [<a href="https://github.com/python/cpython/pull/2999" class="">https://github.com/python/cpython/pull/2999</a>]<br class=""><br class="">+2018-08: rebased for 3.7<br class="">+ -- Jens<br class="">+<br class=""> Signed-off-by: Hongxu Jia <<a href="mailto:hongxu.jia@windriver.com" class="">hongxu.jia@windriver.com</a>><br class=""> ---<br class=""> setup.py | 7 +++++--<br class=""> 1 file changed, 5 insertions(+), 2 deletions(-)<br class=""><br class=""> diff --git a/setup.py b/setup.py<br class="">-index 4f0f522..d05707d 100644<br class="">+index a97a7559ca..633eba8f1e 100644<br class=""> --- a/setup.py<br class=""> +++ b/setup.py<br class="">-@@ -1606,8 +1606,10 @@ class PyBuildExt(build_ext):<br class="">+@@ -1580,8 +1580,10 @@ class PyBuildExt(build_ext):<br class=""> elif host_platform.startswith('netbsd'):<br class=""> macros = dict()<br class=""> libraries = []<br class="">@@ -69,14 +72,11 @@ index 4f0f522..d05707d 100644<br class=""> macros = dict()<br class=""> libraries = ['rt']<br class=""><br class="">-@@ -1626,6 +1628,7 @@ class PyBuildExt(build_ext):<br class="">- if sysconfig.get_config_var('WITH_THREAD'):<br class="">- exts.append ( Extension('_multiprocessing', multiprocessing_srcs,<br class="">- define_macros=list(macros.items()),<br class="">-+ libraries=libraries,<br class="">- include_dirs=["Modules/_multiprocessing"]))<br class="">- else:<br class="">- missing.append('_multiprocessing')<br class="">---<br class="">-2.7.4<br class="">-<br class="">+@@ -1599,6 +1601,7 @@ class PyBuildExt(build_ext):<br class="">+<br class="">+ exts.append ( Extension('_multiprocessing', multiprocessing_srcs,<br class="">+ define_macros=list(macros.items()),<br class="">++ libraries=libraries,<br class="">+ include_dirs=["Modules/_multiprocessing"]))<br class="">+ # End multiprocessing<br class="">+<br class="">diff --git a/meta/recipes-devtools/python/python3/python-3.3-multilib.patch b/meta/recipes-devtools/python/python3/python-3.3-multilib.patch<br class="">index cc35dc1617..d5bafbfba1 100644<br class="">--- a/meta/recipes-devtools/python/python3/python-3.3-multilib.patch<br class="">+++ b/meta/recipes-devtools/python/python3/python-3.3-multilib.patch<br class="">@@ -4,7 +4,7 @@ Date: Tue, 14 May 2013 15:00:26 -0700<br class=""> Subject: [PATCH 01/13] get the sys.lib from python itself and do not use<br class=""> hardcoded value of 'lib'<br class=""><br class="">-02/2015 Rebased for 3.4.2<br class="">+08/2018 Rebased for 3.7.0<br class=""><br class=""> Upstream-Status: Pending<br class=""> Signed-off-by: Khem Raj <<a href="mailto:raj.khem@gmail.com" class="">raj.khem@gmail.com</a>><br class="">@@ -25,12 +25,12 @@ Signed-off-by: Alejandro Hernandez <<a href="mailto:alejandro.hernandez@linux.intel.com" class="">alejandro.hernandez@linux.intel.com</a>><br class=""> setup.py | 9 ++++-----<br class=""> 12 files changed, 97 insertions(+), 23 deletions(-)<br class=""><br class="">-Index: Python-3.5.4/Include/pythonrun.h<br class="">-===================================================================<br class="">---- Python-3.5.4.orig/Include/pythonrun.h<br class="">-+++ Python-3.5.4/Include/pythonrun.h<br class="">-@@ -23,6 +23,9 @@ typedef struct {<br class="">- } PyCompilerFlags;<br class="">+diff --git a/Include/pythonrun.h b/Include/pythonrun.h<br class="">+index 6f0c6fc655..95a597b412 100644<br class="">+--- a/Include/pythonrun.h<br class="">++++ b/Include/pythonrun.h<br class="">+@@ -7,6 +7,9 @@<br class="">+ extern "C" {<br class=""> #endif<br class=""><br class=""> +PyAPI_FUNC(const char *) Py_GetArch(void);<br class="">@@ -39,10 +39,10 @@ Index: Python-3.5.4/Include/pythonrun.h<br class=""> #ifndef Py_LIMITED_API<br class=""> PyAPI_FUNC(int) PyRun_SimpleStringFlags(const char *, PyCompilerFlags *);<br class=""> PyAPI_FUNC(int) PyRun_AnyFileFlags(FILE *, const char *, PyCompilerFlags *);<br class="">-Index: Python-3.5.4/Lib/distutils/command/install.py<br class="">-===================================================================<br class="">---- Python-3.5.4.orig/Lib/distutils/command/install.py<br class="">-+++ Python-3.5.4/Lib/distutils/command/install.py<br class="">+diff --git a/Lib/distutils/command/install.py b/Lib/distutils/command/install.py<br class="">+index 0258d3deae..352fd8f792 100644<br class="">+--- a/Lib/distutils/command/install.py<br class="">++++ b/Lib/distutils/command/install.py<br class=""> @@ -19,6 +19,8 @@ from site import USER_BASE<br class=""> from site import USER_SITE<br class=""> HAS_USER_SITE = True<br class="">@@ -63,11 +63,11 @@ Index: Python-3.5.4/Lib/distutils/command/install.py<br class=""> 'headers': '$base/include/python$py_version_short$abiflags/$dist_name',<br class=""> 'scripts': '$base/bin',<br class=""> 'data' : '$base',<br class="">-Index: Python-3.5.4/Lib/pydoc.py<br class="">-===================================================================<br class="">---- Python-3.5.4.orig/Lib/pydoc.py<br class="">-+++ Python-3.5.4/Lib/pydoc.py<br class="">-@@ -389,7 +389,7 @@ class Doc:<br class="">+diff --git a/Lib/pydoc.py b/Lib/pydoc.py<br class="">+index 8a6b27b16e..fc55893b18 100644<br class="">+--- a/Lib/pydoc.py<br class="">++++ b/Lib/pydoc.py<br class="">+@@ -399,7 +399,7 @@ class Doc:<br class=""> docmodule = docclass = docroutine = docother = docproperty = docdata = fail<br class=""><br class=""> def getdocloc(self, object,<br class="">@@ -76,29 +76,30 @@ Index: Python-3.5.4/Lib/pydoc.py<br class=""> "python%d.%d" % sys.version_info[:2])):<br class=""> """Return the location of module docs or None"""<br class=""><br class="">-Index: Python-3.5.4/Lib/site.py<br class="">-===================================================================<br class="">---- Python-3.5.4.orig/Lib/site.py<br class="">-+++ Python-3.5.4/Lib/site.py<br class="">-@@ -303,12 +303,12 @@ def getsitepackages(prefixes=None):<br class="">+diff --git a/Lib/site.py b/Lib/site.py<br class="">+index ffd132b389..3ca8270d49 100644<br class="">+--- a/Lib/site.py<br class="">++++ b/Lib/site.py<br class="">+@@ -334,12 +334,12 @@ def getsitepackages(prefixes=None):<br class=""> seen.add(prefix)<br class=""><br class=""> if os.sep == '/':<br class=""> - sitepackages.append(os.path.join(prefix, "lib",<br class="">+- "python%d.%d" % sys.version_info[:2],<br class=""> + sitepackages.append(os.path.join(prefix, sys.lib,<br class="">- "python" + sys.version[:3],<br class="">++ "python%d.%d" % sys.version_info[:2],<br class=""> "site-packages"))<br class=""> else:<br class=""> sitepackages.append(prefix)<br class=""> - sitepackages.append(os.path.join(prefix, "lib", "site-packages"))<br class=""> + sitepackages.append(os.path.join(prefix, sys.lib, "site-packages"))<br class="">- if sys.platform == "darwin":<br class="">- # for framework builds *only* we add the standard Apple<br class="">- # locations.<br class="">-Index: Python-3.5.4/Lib/sysconfig.py<br class="">-===================================================================<br class="">---- Python-3.5.4.orig/Lib/sysconfig.py<br class="">-+++ Python-3.5.4/Lib/sysconfig.py<br class="">+ return sitepackages<br class="">+<br class="">+ def addsitepackages(known_paths, prefixes=None):<br class="">+diff --git a/Lib/sysconfig.py b/Lib/sysconfig.py<br class="">+index e0f9c18531..9869363977 100644<br class="">+--- a/Lib/sysconfig.py<br class="">++++ b/Lib/sysconfig.py<br class=""> @@ -20,10 +20,10 @@ __all__ = [<br class=""><br class=""> _INSTALL_SCHEMES = {<br class="">@@ -129,7 +130,7 @@ Index: Python-3.5.4/Lib/sysconfig.py<br class=""> 'include': '{installed_base}/include/python',<br class=""> 'platinclude': '{installed_base}/include/python',<br class=""> 'scripts': '{base}/bin',<br class="">-@@ -61,10 +61,10 @@ _INSTALL_SCHEMES = {<br class="">+@@ -62,10 +62,10 @@ _INSTALL_SCHEMES = {<br class=""> 'data': '{userbase}',<br class=""> },<br class=""> 'posix_user': {<br class="">@@ -144,28 +145,24 @@ Index: Python-3.5.4/Lib/sysconfig.py<br class=""> 'include': '{userbase}/include/python{py_version_short}',<br class=""> 'scripts': '{userbase}/bin',<br class=""> 'data': '{userbase}',<br class="">-Index: Python-3.5.4/Lib/trace.py<br class="">-===================================================================<br class="">---- Python-3.5.4.orig/Lib/trace.py<br class="">-+++ Python-3.5.4/Lib/trace.py<br class="">-@@ -749,10 +749,10 @@ def main(argv=None):<br class="">- # should I also call expanduser? (after all, could use $HOME)<br class="">+diff --git a/Lib/trace.py b/Lib/trace.py<br class="">+index 86b2101763..f3c32ec317 100755<br class="">+--- a/Lib/trace.py<br class="">++++ b/Lib/trace.py<br class="">+@@ -659,7 +659,7 @@ def main():<br class="">+ opts = parser.parse_args()<br class="">+<br class="">+ if opts.ignore_dir:<br class="">+- rel_path = 'lib', 'python{0.major}.{0.minor}'.format(sys.version_info)<br class="">++ rel_path = sys.lib, 'python{0.major}.{0.minor}'.format(sys.version_info)<br class="">+ _prefix = os.path.join(sys.base_prefix, *rel_path)<br class="">+ _exec_prefix = os.path.join(sys.base_exec_prefix, *rel_path)<br class=""><br class="">- s = s.replace("$prefix",<br class="">-- os.path.join(sys.base_prefix, "lib",<br class="">-+ os.path.join(sys.base_prefix, sys.lib,<br class="">- "python" + sys.version[:3]))<br class="">- s = s.replace("$exec_prefix",<br class="">-- os.path.join(sys.base_exec_prefix, "lib",<br class="">-+ os.path.join(sys.base_exec_prefix, sys.lib,<br class="">- "python" + sys.version[:3]))<br class="">- s = os.path.normpath(s)<br class="">- ignore_dirs.append(s)<br class="">-Index: Python-3.5.4/<a href="http://Makefile.pre.in" class="">Makefile.pre.in</a><br class="">-===================================================================<br class="">---- Python-3.5.4.orig/<a href="http://Makefile.pre.in" class="">Makefile.pre.in</a><br class="">-+++ Python-3.5.4/<a href="http://Makefile.pre.in" class="">Makefile.pre.in</a><br class="">-@@ -109,6 +109,8 @@ CFLAGS_ALIASING=@CFLAGS_ALIASING@<br class="">+diff --git a/<a href="http://Makefile.pre.in" class="">Makefile.pre.in</a> b/<a href="http://Makefile.pre.in" class="">Makefile.pre.in</a><br class="">+index 31b4bcabb3..713215e57d 100644<br class="">+--- a/<a href="http://Makefile.pre.in" class="">Makefile.pre.in</a><br class="">++++ b/<a href="http://Makefile.pre.in" class="">Makefile.pre.in</a><br class="">+@@ -114,6 +114,8 @@ CFLAGS_ALIASING=@CFLAGS_ALIASING@<br class=""><br class=""> # Machine-dependent subdirectories<br class=""> MACHDEP= @MACHDEP@<br class="">@@ -174,7 +171,7 @@ Index: Python-3.5.4/<a href="http://Makefile.pre.in" class="">Makefile.pre.in</a><br class=""><br class=""> # Multiarch directory (may be empty)<br class=""> MULTIARCH= @MULTIARCH@<br class="">-@@ -128,7 +130,7 @@ LIBDIR= @libdir@<br class="">+@@ -134,7 +136,7 @@ LIBDIR= @libdir@<br class=""> MANDIR= @mandir@<br class=""> INCLUDEDIR= @includedir@<br class=""> CONFINCLUDEDIR= $(exec_prefix)/include<br class="">@@ -183,7 +180,7 @@ Index: Python-3.5.4/<a href="http://Makefile.pre.in" class="">Makefile.pre.in</a><br class=""> ABIFLAGS= @ABIFLAGS@<br class=""><br class=""> # Detailed destination directories<br class="">-@@ -731,6 +733,7 @@ Modules/getpath.o: $(srcdir)/Modules/get<br class="">+@@ -754,6 +756,7 @@ Modules/getpath.o: $(srcdir)/Modules/getpath.c Makefile<br class=""> -DEXEC_PREFIX='"$(exec_prefix)"' \<br class=""> -DVERSION='"$(VERSION)"' \<br class=""> -DVPATH='"$(VPATH)"' \<br class="">@@ -191,8 +188,8 @@ Index: Python-3.5.4/<a href="http://Makefile.pre.in" class="">Makefile.pre.in</a><br class=""> -o $@ $(srcdir)/Modules/getpath.c<br class=""><br class=""> Programs/python.o: $(srcdir)/Programs/python.c<br class="">-@@ -813,7 +816,7 @@ regen-opcode:<br class="">- Python/compile.o Python/symtable.o Python/ast.o: $(srcdir)/Include/graminit.h $(srcdir)/Include/Python-ast.h<br class="">+@@ -842,7 +845,7 @@ regen-opcode:<br class="">+ Python/compile.o Python/symtable.o Python/ast_unparse.o Python/ast.o: $(srcdir)/Include/graminit.h $(srcdir)/Include/Python-ast.h<br class=""><br class=""> Python/getplatform.o: $(srcdir)/Python/getplatform.c<br class=""> - $(CC) -c $(PY_CORE_CFLAGS) -DPLATFORM='"$(MACHDEP)"' -o $@ $(srcdir)/Python/getplatform.c<br class="">@@ -200,11 +197,11 @@ Index: Python-3.5.4/<a href="http://Makefile.pre.in" class="">Makefile.pre.in</a><br class=""><br class=""> Python/importdl.o: $(srcdir)/Python/importdl.c<br class=""> $(CC) -c $(PY_CORE_CFLAGS) -I$(DLINCLDIR) -o $@ $(srcdir)/Python/importdl.c<br class="">-Index: Python-3.5.4/Modules/getpath.c<br class="">-===================================================================<br class="">---- Python-3.5.4.orig/Modules/getpath.c<br class="">-+++ Python-3.5.4/Modules/getpath.c<br class="">-@@ -105,6 +105,13 @@<br class="">+diff --git a/Modules/getpath.c b/Modules/getpath.c<br class="">+index 041cb14b4b..d52d1e1cdb 100644<br class="">+--- a/Modules/getpath.c<br class="">++++ b/Modules/getpath.c<br class="">+@@ -106,6 +106,13 @@ extern "C" {<br class=""> #error "PREFIX, EXEC_PREFIX, VERSION, and VPATH must be constant defined"<br class=""> #endif<br class=""><br class="">@@ -218,30 +215,22 @@ Index: Python-3.5.4/Modules/getpath.c<br class=""> #ifndef LANDMARK<br class=""> #define LANDMARK L"os.py"<br class=""> #endif<br class="">-@@ -113,6 +120,7 @@ static wchar_t prefix[MAXPATHLEN+1];<br class="">- static wchar_t exec_prefix[MAXPATHLEN+1];<br class="">- static wchar_t progpath[MAXPATHLEN+1];<br class="">- static wchar_t *module_search_path = NULL;<br class="">-+static wchar_t *lib_python = L"" LIB_PYTHON;<br class="">-<br class="">- /* Get file status. Encode the path to the locale encoding. */<br class="">-<br class="">-@@ -494,7 +502,7 @@ calculate_path(void)<br class="">- _pythonpath = Py_DecodeLocale(PYTHONPATH, NULL);<br class="">- _prefix = Py_DecodeLocale(PREFIX, NULL);<br class="">- _exec_prefix = Py_DecodeLocale(EXEC_PREFIX, NULL);<br class="">-- lib_python = Py_DecodeLocale("lib/python" VERSION, NULL);<br class="">-+ lib_python = Py_DecodeLocale(LIB_PYTHON, NULL);<br class="">-<br class="">- if (!_pythonpath || !_prefix || !_exec_prefix || !lib_python) {<br class="">- Py_FatalError(<br class="">-Index: Python-3.5.4/Python/getplatform.c<br class="">-===================================================================<br class="">---- Python-3.5.4.orig/Python/getplatform.c<br class="">-+++ Python-3.5.4/Python/getplatform.c<br class="">+@@ -867,7 +874,7 @@ calculate_init(PyCalculatePath *calculate,<br class="">+ if (!calculate->prefix) {<br class="">+ return DECODE_LOCALE_ERR("EXEC_PREFIX define", len);<br class="">+ }<br class="">+- calculate->lib_python = Py_DecodeLocale("lib/python" VERSION, &len);<br class="">++ calculate->lib_python = Py_DecodeLocale(LIB_PYTHON, &len);<br class="">+ if (!calculate->lib_python) {<br class="">+ return DECODE_LOCALE_ERR("EXEC_PREFIX define", len);<br class="">+ }<br class="">+diff --git a/Python/getplatform.c b/Python/getplatform.c<br class="">+index 81a0f7ac53..bc7127ae3e 100644<br class="">+--- a/Python/getplatform.c<br class="">++++ b/Python/getplatform.c<br class=""> @@ -10,3 +10,23 @@ Py_GetPlatform(void)<br class=""> {<br class="">- return PLATFORM;<br class="">+ return PLATFORM;<br class=""> }<br class=""> +<br class=""> +#ifndef ARCH<br class="">@@ -263,11 +252,11 @@ Index: Python-3.5.4/Python/getplatform.c<br class=""> +{<br class=""> + return LIB;<br class=""> +}<br class="">-Index: Python-3.5.4/Python/sysmodule.c<br class="">-===================================================================<br class="">---- Python-3.5.4.orig/Python/sysmodule.c<br class="">-+++ Python-3.5.4/Python/sysmodule.c<br class="">-@@ -1827,6 +1827,10 @@ _PySys_Init(void)<br class="">+diff --git a/Python/sysmodule.c b/Python/sysmodule.c<br class="">+index 177b830762..38112b831e 100644<br class="">+--- a/Python/sysmodule.c<br class="">++++ b/Python/sysmodule.c<br class="">+@@ -2324,6 +2324,10 @@ _PySys_BeginInit(PyObject **sysmod)<br class=""> PyUnicode_FromString(Py_GetCopyright()));<br class=""> SET_SYS_FROM_STRING("platform",<br class=""> PyUnicode_FromString(Py_GetPlatform()));<br class="">@@ -275,16 +264,16 @@ Index: Python-3.5.4/Python/sysmodule.c<br class=""> + PyUnicode_FromString(Py_GetArch()));<br class=""> + SET_SYS_FROM_STRING("lib",<br class=""> + PyUnicode_FromString(Py_GetLib()));<br class="">- SET_SYS_FROM_STRING("executable",<br class="">- PyUnicode_FromWideChar(<br class="">- Py_GetProgramFullPath(), -1));<br class="">-Index: Python-3.5.4/configure.ac<br class="">-===================================================================<br class="">---- Python-3.5.4.orig/configure.ac<br class="">-+++ Python-3.5.4/configure.ac<br class="">-@@ -885,6 +885,41 @@ PLATDIR=plat-$MACHDEP<br class="">- AC_SUBST(PLATDIR)<br class="">- AC_SUBST(PLATFORM_TRIPLET)<br class="">+ SET_SYS_FROM_STRING("maxsize",<br class="">+ PyLong_FromSsize_t(PY_SSIZE_T_MAX));<br class="">+ SET_SYS_FROM_STRING("float_info",<br class="">+diff --git a/configure.ac b/configure.ac<br class="">+index 5b66624d78..1c88696532 100644<br class="">+--- a/configure.ac<br class="">++++ b/configure.ac<br class="">+@@ -867,6 +867,41 @@ AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[]])],<br class="">+ LDFLAGS="$save_LDFLAGS"<br class="">+ AC_SUBST(NO_AS_NEEDED)<br class=""><br class=""> +AC_SUBST(ARCH)<br class=""> +AC_MSG_CHECKING(ARCH)<br class="">@@ -322,13 +311,13 @@ Index: Python-3.5.4/configure.ac<br class=""> +esac<br class=""> +AC_MSG_RESULT($LIB)<br class=""><br class="">- AC_MSG_CHECKING([for -Wl,--no-as-needed])<br class="">- save_LDFLAGS="$LDFLAGS"<br class="">-Index: Python-3.5.4/setup.py<br class="">-===================================================================<br class="">---- Python-3.5.4.orig/setup.py<br class="">-+++ Python-3.5.4/setup.py<br class="">-@@ -494,7 +494,7 @@ class PyBuildExt(build_ext):<br class="">+ # checks for UNIX variants that set C preprocessor variables<br class="">+ AC_USE_SYSTEM_EXTENSIONS<br class="">+diff --git a/setup.py b/setup.py<br class="">+index 37c5dd58a6..b82b7177bc 100644<br class="">+--- a/setup.py<br class="">++++ b/setup.py<br class="">+@@ -541,7 +541,7 @@ class PyBuildExt(build_ext):<br class=""> # directories (i.e. '.' and 'Include') must be first. See issue<br class=""> # 10520.<br class=""> if not cross_compiling:<br class="">@@ -337,17 +326,16 @@ Index: Python-3.5.4/setup.py<br class=""> add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')<br class=""> # only change this for cross builds for 3.3, issues on Mageia<br class=""> if cross_compiling:<br class="">-@@ -552,8 +552,7 @@ class PyBuildExt(build_ext):<br class="">- # be assumed that no additional -I,-L directives are needed.<br class="">- if not cross_compiling:<br class="">- lib_dirs = self.compiler.library_dirs + [<br class="">-- '/lib64', '/usr/lib64',<br class="">-- '/lib', '/usr/lib',<br class="">-+ '/' + sys.lib, '/usr/' + sys.lib,<br class="">- ]<br class="">- inc_dirs = self.compiler.include_dirs + ['/usr/include']<br class="">- else:<br class="">-@@ -745,11 +744,11 @@ class PyBuildExt(build_ext):<br class="">+@@ -579,7 +579,7 @@ class PyBuildExt(build_ext):<br class="">+ add_dir_to_list(self.compiler.include_dirs,<br class="">+ sysconfig.get_config_var("INCLUDEDIR"))<br class="">+<br class="">+- system_lib_dirs = ['/lib64', '/usr/lib64', '/lib', '/usr/lib']<br class="">++ system_lib_dirs = ['/' + sys.lib, '/usr/' + sys.lib]<br class="">+ system_include_dirs = ['/usr/include']<br class="">+ # lib_dirs and inc_dirs are used to search for files;<br class="">+ # if a file is found in one of those directories, it can<br class="">+@@ -836,11 +836,11 @@ class PyBuildExt(build_ext):<br class=""> elif curses_library:<br class=""> readline_libs.append(curses_library)<br class=""> elif self.compiler.find_library_file(lib_dirs +<br class="">@@ -361,3 +349,26 @@ Index: Python-3.5.4/setup.py<br class=""> extra_link_args=readline_extra_link_args,<br class=""> libraries=readline_libs) )<br class=""> else:<br class="">+@@ -1054,8 +1054,7 @@ class PyBuildExt(build_ext):<br class="">+<br class="">+ # check lib directories parallel to the location of the header<br class="">+ db_dirs_to_check = [<br class="">+- db_incdir.replace("include", 'lib64'),<br class="">+- db_incdir.replace("include", 'lib'),<br class="">++ db_incdir.replace("include", sys.lib),<br class="">+ ]<br class="">+<br class="">+ if host_platform != 'darwin':<br class="">+@@ -1166,10 +1165,8 @@ class PyBuildExt(build_ext):<br class="">+<br class="">+ if sqlite_incdir:<br class="">+ sqlite_dirs_to_check = [<br class="">+- os.path.join(sqlite_incdir, '..', 'lib64'),<br class="">+- os.path.join(sqlite_incdir, '..', 'lib'),<br class="">+- os.path.join(sqlite_incdir, '..', '..', 'lib64'),<br class="">+- os.path.join(sqlite_incdir, '..', '..', 'lib'),<br class="">++ os.path.join(sqlite_incdir, '..', sys.lib),<br class="">++ os.path.join(sqlite_incdir, '..', '..', sys.lib),<br class="">+ ]<br class="">+ sqlite_libfile = self.compiler.find_library_file(<br class="">+ sqlite_dirs_to_check + lib_dirs, 'sqlite3')<br class="">diff --git a/meta/recipes-devtools/python/python3/python3-manifest.json b/meta/recipes-devtools/python/python3/python3-manifest.json<br class="">index f922561368..e63fcb95e3 100644<br class="">--- a/meta/recipes-devtools/python/python3/python3-manifest.json<br class="">+++ b/meta/recipes-devtools/python/python3/python3-manifest.json<br class="">@@ -27,24 +27,17 @@<br class=""> "asyncio": {<br class=""> "summary": "Python Asynchronous I/",<br class=""> "rdepends": [<br class="">- "compression",<br class=""> "core",<br class="">- "crypt",<br class=""> "io",<br class=""> "logging",<br class="">- "math",<br class="">- "multiprocessing",<br class=""> "netclient",<br class="">- "pickle",<br class="">- "shell",<br class="">- "stringold",<br class="">- "threading",<br class="">- "unixadmin"<br class="">+ "stringold"<br class=""> ],<br class=""> "files": [<br class=""> "${libdir}/python${PYTHON_MAJMIN}/asyncio",<br class=""> "${libdir}/python${PYTHON_MAJMIN}/concurrent",<br class="">- "${libdir}/python${PYTHON_MAJMIN}/concurrent/futures"<br class="">+ "${libdir}/python${PYTHON_MAJMIN}/concurrent/futures",<br class="">+ "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_asyncio.*.so"<br class=""> ],<br class=""> "cached": []<br class=""> },<br class="">@@ -149,7 +142,7 @@<br class=""> "${libdir}/python${PYTHON_MAJMIN}/_collections_abc.py",<br class=""> "${libdir}/python${PYTHON_MAJMIN}/_markupbase.py",<br class=""> "${libdir}/python${PYTHON_MAJMIN}/_sitebuiltins.py",<br class="">- "${libdir}/python${PYTHON_MAJMIN}/_sysconfigdata.py",<br class="">+ "${libdir}/python${PYTHON_MAJMIN}/_sysconfigdata*.py",<br class=""> "${libdir}/python${PYTHON_MAJMIN}/_weakrefset.py",<br class=""> "${libdir}/python${PYTHON_MAJMIN}/abc.py",<br class=""> "${libdir}/python${PYTHON_MAJMIN}/argparse.py",<br class="">@@ -162,6 +155,7 @@<br class=""> "${libdir}/python${PYTHON_MAJMIN}/collections/abc.py",<br class=""> "${libdir}/python${PYTHON_MAJMIN}/configparser.py",<br class=""> "${libdir}/python${PYTHON_MAJMIN}/contextlib.py",<br class="">+ "${libdir}/python${PYTHON_MAJMIN}/contextvars.py",<br class=""> "${libdir}/python${PYTHON_MAJMIN}/copy.py",<br class=""> "${libdir}/python${PYTHON_MAJMIN}/copyreg.py",<br class=""> "${libdir}/python${PYTHON_MAJMIN}/csv.py",<br class="">@@ -191,6 +185,7 @@<br class=""> "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/__pycache__/time.*.so",<br class=""> "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/__pycache__/xreadlines.*.so",<br class=""> "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_bisect.*.so",<br class="">+ "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_contextvars.*.so",<br class=""> "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_csv.*.so",<br class=""> "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_heapq.*.so",<br class=""> "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_opcode.*.so",<br class="">@@ -256,6 +251,7 @@<br class=""> "${libdir}/python${PYTHON_MAJMIN}/__pycache__/codeop.*.pyc",<br class=""> "${libdir}/python${PYTHON_MAJMIN}/__pycache__/configparser.*.pyc",<br class=""> "${libdir}/python${PYTHON_MAJMIN}/__pycache__/contextlib.*.pyc",<br class="">+ "${libdir}/python${PYTHON_MAJMIN}/__pycache__/contextvars.*.pyc",<br class=""> "${libdir}/python${PYTHON_MAJMIN}/__pycache__/copy.*.pyc",<br class=""> "${libdir}/python${PYTHON_MAJMIN}/__pycache__/copyreg.*.pyc",<br class=""> "${libdir}/python${PYTHON_MAJMIN}/__pycache__/csv.*.pyc",<br class="">@@ -323,9 +319,13 @@<br class=""> "files": [<br class=""> "${libdir}/python${PYTHON_MAJMIN}/crypt.py",<br class=""> "${libdir}/python${PYTHON_MAJMIN}/hashlib.py",<br class="">+ "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_blake2.*.so",<br class=""> "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_crypt.*.so",<br class=""> "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_hashlib.*.so",<br class="">+ "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_md5.*.so",<br class="">+ "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_sha1.*.so",<br class=""> "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_sha256.*.so",<br class="">+ "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_sha3.*.so",<br class=""> "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_sha512.*.so"<br class=""> ],<br class=""> "cached": [<br class="">@@ -729,7 +729,9 @@<br class=""> "multiprocessing": {<br class=""> "summary": "Python multiprocessing support",<br class=""> "rdepends": [<br class="">- "core"<br class="">+ "core",<br class="">+ "io",<br class="">+ "pickle"<br class=""> ],<br class=""> "files": [<br class=""> "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_multiprocessing.*.so",<br class="">@@ -740,18 +742,14 @@<br class=""> "netclient": {<br class=""> "summary": "Python Internet Protocol clients",<br class=""> "rdepends": [<br class="">- "compression",<br class=""> "core",<br class=""> "crypt",<br class="">- "ctypes",<br class=""> "datetime",<br class=""> "email",<br class=""> "io",<br class=""> "math",<br class=""> "mime",<br class="">- "shell",<br class="">- "stringold",<br class="">- "unixadmin"<br class="">+ "stringold"<br class=""> ],<br class=""> "files": [<br class=""> "${libdir}/python${PYTHON_MAJMIN}/base64.py",<br class="">@@ -1043,13 +1041,12 @@<br class=""> "files": [<br class=""> "${libdir}/python${PYTHON_MAJMIN}/_dummy_thread.py",<br class=""> "${libdir}/python${PYTHON_MAJMIN}/_threading_local.py",<br class="">- "${libdir}/python${PYTHON_MAJMIN}/dummy_threading.py",<br class="">+ "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_queue.*.so",<br class=""> "${libdir}/python${PYTHON_MAJMIN}/queue.py"<br class=""> ],<br class=""> "cached": [<br class=""> "${libdir}/python${PYTHON_MAJMIN}/__pycache__/_dummy_thread.*.pyc",<br class=""> "${libdir}/python${PYTHON_MAJMIN}/__pycache__/_threading_local.*.pyc",<br class="">- "${libdir}/python${PYTHON_MAJMIN}/__pycache__/dummy_threading.*.pyc",<br class=""> "${libdir}/python${PYTHON_MAJMIN}/__pycache__/queue.*.pyc"<br class=""> ]<br class=""> },<br class="">diff --git a/meta/recipes-devtools/python/python3/python3-use-CROSSPYTHONPATH-for-PYTHON_FOR_BUILD.patch b/meta/recipes-devtools/python/python3/python3-use-CROSSPYTHONPATH-for-PYTHON_FOR_BUILD.patch<br class="">index a4f8bd4710..c6aa581b4c 100644<br class="">--- a/meta/recipes-devtools/python/python3/python3-use-CROSSPYTHONPATH-for-PYTHON_FOR_BUILD.patch<br class="">+++ b/meta/recipes-devtools/python/python3/python3-use-CROSSPYTHONPATH-for-PYTHON_FOR_BUILD.patch<br class="">@@ -5,21 +5,24 @@ Subject: [PATCH] python3 use CROSSPYTHONPATH for PYTHON_FOR_BUILD<br class=""><br class=""> Upstream-Status: Inappropriate [Cross compile specific]<br class=""><br class="">+2018-08: Rebased and adopted for 3.7<br class="">+ -- Jens<br class="">+<br class=""> Signed-off-by: Jackie Huang <<a href="mailto:jackie.huang@windriver.com" class="">jackie.huang@windriver.com</a>><br class=""> ---<br class=""> configure.ac | 2 +-<br class=""> 1 file changed, 1 insertion(+), 1 deletion(-)<br class=""><br class="">-Index: Python-3.5.4/configure.ac<br class="">-===================================================================<br class="">---- Python-3.5.4.orig/configure.ac<br class="">-+++ Python-3.5.4/configure.ac<br class="">-@@ -73,7 +73,7 @@ if test "$cross_compiling" = yes; then<br class="">+diff --git a/configure.ac b/configure.ac<br class="">+index 2b8aa4d592..a361436f4f 100644<br class="">+--- a/configure.ac<br class="">++++ b/configure.ac<br class="">+@@ -75,7 +75,7 @@ if test "$cross_compiling" = yes; then<br class=""> AC_MSG_ERROR([python$PACKAGE_VERSION interpreter not found])<br class=""> fi<br class=""> AC_MSG_RESULT($interp)<br class="">-- 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<br class="">-+ PYTHON_FOR_BUILD='_PYTHON_PROJECT_BASE=$(abs_builddir) _PYTHON_HOST_PLATFORM=$(_PYTHON_HOST_PLATFORM) PYTHONPATH=$(CROSSPYTHONPATH) '$interp<br class="">+- 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 _PYTHON_SYSCONFIGDATA_NAME=_sysconfigdata_$(ABIFLAGS)_$(MACHDEP)_$(MULTIARCH) '$interp<br class="">++ PYTHON_FOR_BUILD='_PYTHON_PROJECT_BASE=$(abs_builddir) _PYTHON_HOST_PLATFORM=$(_PYTHON_HOST_PLATFORM) PYTHONPATH=$(CROSSPYTHONPATH) _PYTHON_SYSCONFIGDATA_NAME=_sysconfigdata_$(ABIFLAGS)_$(MACHDEP)_$(MULTIARCH) '$interp<br class=""> fi<br class=""> elif test "$cross_compiling" = maybe; then<br class=""> AC_MSG_ERROR([Cross compiling required --host=HOST-TUPLE and --build=ARCH])<br class="">diff --git a/meta/recipes-devtools/python/python3/regen-all.patch b/meta/recipes-devtools/python/python3/regen-all.patch<br class="">deleted file mode 100644<br class="">index 36b9d9d919..0000000000<br class="">--- a/meta/recipes-devtools/python/python3/regen-all.patch<br class="">+++ /dev/null<br class="">@@ -1,25 +0,0 @@<br class="">-python3-native: run regen-importlib target correctly<br class="">-<br class="">-regen-importlib depends on other regen- targets, so we must be sure to<br class="">-run it after (most of) the others. In reality, we do not need to run it<br class="">-at all since "make" will invoke it, if necessary. We do not want to<br class="">-rely on that, though.<br class="">-<br class="">-Upstream-Status: Pending<br class="">-<br class="">-Signed-off-by: Joe Slater <<a href="mailto:joe.slater@windriver.com" class="">joe.slater@windriver.com</a>><br class="">-<br class="">-<br class="">-<br class="">---- a/<a href="http://Makefile.pre.in" class="">Makefile.pre.in</a><br class="">-+++ b/<a href="http://Makefile.pre.in" class="">Makefile.pre.in</a><br class="">-@@ -709,7 +709,8 @@ regen-importlib: Programs/_freeze_import<br class="">- ############################################################################<br class="">- # Regenerate all generated files<br class="">-<br class="">--regen-all: regen-opcode regen-opcode-targets regen-typeslots regen-grammar regen-ast regen-importlib<br class="">-+regen-all: regen-opcode regen-opcode-targets regen-typeslots regen-grammar regen-ast<br class="">-+ $(MAKE) regen-importlib<br class="">-<br class="">- ############################################################################<br class="">- # Special rules for object files<br class="">diff --git a/meta/recipes-devtools/python/python3/signal.patch b/meta/recipes-devtools/python/python3/signal.patch<br class="">deleted file mode 100644<br class="">index 534a097771..0000000000<br class="">--- a/meta/recipes-devtools/python/python3/signal.patch<br class="">+++ /dev/null<br class="">@@ -1,56 +0,0 @@<br class="">-Upstream-Status: Backport<br class="">-Signed-off-by: Ross Burton <<a href="mailto:ross.burton@intel.com" class="">ross.burton@intel.com</a>><br class="">-<br class="">-From 4315389df3c4e8c1f94a18ab11a4b234762132b1 Mon Sep 17 00:00:00 2001<br class="">-From: Antoine Pitrou <<a href="mailto:pitrou@free.fr" class="">pitrou@free.fr</a>><br class="">-Date: Mon, 23 Apr 2018 22:22:49 +0200<br class="">-Subject: [PATCH] [3.6] bpo-33329: Fix multiprocessing regression on newer<br class="">- glibcs (GH-6575) (GH-6582)<br class="">-<br class="">-Starting with glibc 2.27.9000-xxx, sigaddset() can return EINVAL for some<br class="">-reserved signal numbers between 1 and NSIG. The `range(1, NSIG)` idiom<br class="">-is commonly used to select all signals for blocking with `pthread_sigmask`.<br class="">-So we ignore the sigaddset() return value until we expose sigfillset()<br class="">-to provide a better idiom.<br class="">-(cherry picked from commit 25038ecfb665bef641abf8cb61afff7505b0e008)<br class="">----<br class="">- .../next/Library/2018-04-23-13-21-39.bpo-33329.lQ-Eod.rst | 1 +<br class="">- Modules/signalmodule.c | 14 ++++++++------<br class="">- 2 files changed, 9 insertions(+), 6 deletions(-)<br class="">- create mode 100644 Misc/NEWS.d/next/Library/2018-04-23-13-21-39.bpo-33329.lQ-Eod.rst<br class="">-<br class="">-diff --git a/Modules/signalmodule.c b/Modules/signalmodule.c<br class="">-index e0d06b434d..138e74e8a9 100644<br class="">---- a/Modules/signalmodule.c<br class="">-+++ b/Modules/signalmodule.c<br class="">-@@ -744,7 +744,6 @@ iterable_to_sigset(PyObject *iterable, sigset_t *mask)<br class="">- int result = -1;<br class="">- PyObject *iterator, *item;<br class="">- long signum;<br class="">-- int err;<br class="">-<br class="">- sigemptyset(mask);<br class="">-<br class="">-@@ -766,11 +765,14 @@ iterable_to_sigset(PyObject *iterable, sigset_t *mask)<br class="">- Py_DECREF(item);<br class="">- if (signum == -1 && PyErr_Occurred())<br class="">- goto error;<br class="">-- if (0 < signum && signum < NSIG)<br class="">-- err = sigaddset(mask, (int)signum);<br class="">-- else<br class="">-- err = 1;<br class="">-- if (err) {<br class="">-+ if (0 < signum && signum < NSIG) {<br class="">-+ /* bpo-33329: ignore sigaddset() return value as it can fail<br class="">-+ * for some reserved signals, but we want the `range(1, NSIG)`<br class="">-+ * idiom to allow selecting all valid signals.<br class="">-+ */<br class="">-+ (void) sigaddset(mask, (int)signum);<br class="">-+ }<br class="">-+ else {<br class="">- PyErr_Format(PyExc_ValueError,<br class="">- "signal number %ld out of range", signum);<br class="">- goto error;<br class="">---<br class="">-2.11.0<br class="">-<br class="">diff --git a/meta/recipes-devtools/python/python3/support_SOURCE_DATE_EPOCH_in_py_compile.patch b/meta/recipes-devtools/python/python3/support_SOURCE_DATE_EPOCH_in_py_compile.patch<br class="">index 32ecab9fec..058cfdbc2d 100644<br class="">--- a/meta/recipes-devtools/python/python3/support_SOURCE_DATE_EPOCH_in_py_compile.patch<br class="">+++ b/meta/recipes-devtools/python/python3/support_SOURCE_DATE_EPOCH_in_py_compile.patch<br class="">@@ -36,12 +36,12 @@ The software will still work, but it will not use the .pyc file as it should.<br class=""> 3 files changed, 27 insertions(+)<br class=""><br class=""> diff --git a/Doc/library/py_compile.rst b/Doc/library/py_compile.rst<br class="">-index 0af8fb1..841f3e8 100644<br class="">+index d720e01050..c8cc738f3d 100644<br class=""> --- a/Doc/library/py_compile.rst<br class=""> +++ b/Doc/library/py_compile.rst<br class="">-@@ -53,6 +53,10 @@ byte-code cache files in the directory containing the source code.<br class="">- :func:`compile` function. The default of ``-1`` selects the optimization<br class="">- level of the current interpreter.<br class="">+@@ -59,6 +59,10 @@ byte-code cache files in the directory containing the source code.<br class="">+ *invalidation_mode* will be forced to<br class="">+ :attr:`PycInvalidationMode.CHECKED_HASH`.<br class=""><br class=""> + If the SOURCE_DATE_EPOCH environment variable is set, the .py file mtime<br class=""> + and timestamp entry in .pyc file header, will be limited to this value.<br class="">@@ -51,27 +51,27 @@ index 0af8fb1..841f3e8 100644<br class=""> Changed default value of *cfile* to be :PEP:`3147`-compliant. Previous<br class=""> default was *file* + ``'c'`` (``'o'`` if optimization was enabled).<br class=""> diff --git a/Lib/py_compile.py b/Lib/py_compile.py<br class="">-index 11c5b50..62dcdc7 100644<br class="">+index 16dc0a011f..b7c28e4fdd 100644<br class=""> --- a/Lib/py_compile.py<br class=""> +++ b/Lib/py_compile.py<br class="">-@@ -137,6 +137,10 @@ def compile(file, cfile=None, dfile=None, doraise=False, optimize=-1):<br class="">- except FileExistsError:<br class="">+@@ -149,6 +149,10 @@ def compile(file, cfile=None, dfile=None, doraise=False, optimize=-1,<br class=""> pass<br class="">- source_stats = loader.path_stats(file)<br class="">-+ sde = os.environ.get('SOURCE_DATE_EPOCH')<br class="">-+ if sde and source_stats['mtime'] > int(sde):<br class="">-+ source_stats['mtime'] = int(sde)<br class="">-+ os.utime(file, (source_stats['mtime'], source_stats['mtime']))<br class="">- bytecode = importlib._bootstrap_external._code_to_bytecode(<br class="">+ if invalidation_mode == PycInvalidationMode.TIMESTAMP:<br class="">+ source_stats = loader.path_stats(file)<br class="">++ sde = os.environ.get('SOURCE_DATE_EPOCH')<br class="">++ if sde and source_stats['mtime'] > int(sde):<br class="">++ source_stats['mtime'] = int(sde)<br class="">++ os.utime(file, (source_stats['mtime'], source_stats['mtime']))<br class="">+ bytecode = importlib._bootstrap_external._code_to_timestamp_pyc(<br class=""> code, source_stats['mtime'], source_stats['size'])<br class="">- mode = importlib._bootstrap_external._calc_mode(file)<br class="">+ else:<br class=""> diff --git a/Lib/test/test_py_compile.py b/Lib/test/test_py_compile.py<br class="">-index 4a6caa5..3d09963 100644<br class="">+index 8fc0b3308c..1445a14548 100644<br class=""> --- a/Lib/test/test_py_compile.py<br class=""> +++ b/Lib/test/test_py_compile.py<br class="">-@@ -98,6 +98,25 @@ def test_bad_coding(self):<br class="">- self.assertFalse(os.path.exists(<br class="">- importlib.util.cache_from_source(bad_coding)))<br class="">+@@ -110,6 +110,25 @@ class PyCompileTests(unittest.TestCase):<br class="">+ fp.read(), 'test', {})<br class="">+ self.assertEqual(flags, 0b11)<br class=""><br class=""> + def test_source_date_epoch(self):<br class=""> + testtime = 123456789<br class="">diff --git a/meta/recipes-devtools/python/python3/sysroot-include-headers.patch b/meta/recipes-devtools/python/python3/sysroot-include-headers.patch<br class="">index 785b5567f2..d5983544c4 100644<br class="">--- a/meta/recipes-devtools/python/python3/sysroot-include-headers.patch<br class="">+++ b/meta/recipes-devtools/python/python3/sysroot-include-headers.patch<br class="">@@ -6,26 +6,27 @@ Should fix things like<br class=""> configure:6972: arm-angstrom-linux-gnueabi-gcc -march=armv7-a -mthumb-interwork -mfloat-abi=hard -mfpu=neon -mtune=cortex-a8 -DNDEBUG -fno-inline -D__SOFTFP__ --sysroot=/build/v2013.06/build/tmp-angstrom_v2013_06-eglibc/sysroots/beaglebone -c -O2 -pipe -g -feliminate-unused-debug-types -I/usr/include/ncursesw conftest.c >&5<br class=""> cc1: warning: include location "/usr/include/ncursesw" is unsafe for cross-compilation [-Wpoison-system-directories]<br class=""><br class="">+2018-08: Rebased to 3.7.0<br class="">+ -- Jens<br class=""><br class=""> Signed-off-by: Khem Raj<br class=""> Upstream-Status: Pending<br class=""><br class="">-<br class="">-Index: Python-3.3.2/setup.py<br class="">-===================================================================<br class="">---- Python-3.3.2.orig/setup.py 2013-07-30 01:30:48.000000000 -0700<br class="">-+++ Python-3.3.2/setup.py 2013-07-30 01:41:11.697862723 -0700<br class="">-@@ -1210,7 +1210,7 @@<br class="">- panel_library = 'panel'<br class="">+diff --git a/setup.py b/setup.py<br class="">+index 37c5dd58a6..41e88a152b 100644<br class="">+--- a/setup.py<br class="">++++ b/setup.py<br class="">+@@ -1333,7 +1333,7 @@ class PyBuildExt(build_ext):<br class=""> if curses_library == 'ncursesw':<br class=""> curses_defines.append(('HAVE_NCURSESW', '1'))<br class="">-- curses_includes.append('/usr/include/ncursesw')<br class="">-+ curses_includes.append('=/usr/include/ncursesw')<br class="">+ if not cross_compiling:<br class="">+- curses_includes.append('/usr/include/ncursesw')<br class="">++ curses_includes.append('=/usr/include/ncursesw')<br class=""> # Bug 1464056: If _curses.so links with ncursesw,<br class=""> # _curses_panel.so must link with panelw.<br class=""> panel_library = 'panelw'<br class="">-@@ -1819,7 +1819,7 @@<br class="">- if host_platform == 'darwin':<br class="">+@@ -1968,7 +1968,7 @@ class PyBuildExt(build_ext):<br class="">+ return<br class=""> # OS X 10.5 comes with libffi.dylib; the include files are<br class=""> # in /usr/include/ffi<br class=""> - inc_dirs.append('/usr/include/ffi')<br class="">diff --git a/meta/recipes-devtools/python/python3/uuid_when_cross_compiling.patch b/meta/recipes-devtools/python/python3/uuid_when_cross_compiling.patch<br class="">new file mode 100644<br class="">index 0000000000..464f873112<br class="">--- /dev/null<br class="">+++ b/meta/recipes-devtools/python/python3/uuid_when_cross_compiling.patch<br class="">@@ -0,0 +1,24 @@<br class="">+Subject: [PATCH] util-linux uuid support<br class="">+<br class="">+Scan for uuid.h in include/uuid/ as well as in include/ to catch<br class="">+the uuid/uuid.h well supported but accidently not detected.<br class="">+<br class="">+Upstream-Status: Pending<br class="">+<br class="">+Signed-off-by: Jens Rehsack <<a href="mailto:sno@NetBSD.org" class="">sno@NetBSD.org</a>><br class="">+diff --git a/setup.py b/setup.py<br class="">+index a97a7559ca..01d8f24fdd 100644<br class="">+--- a/setup.py<br class="">++++ b/setup.py<br class="">+@@ -1596,8 +1596,9 @@ class PyBuildExt(build_ext):<br class="">+ # missing.append('_tkinter')<br class="">+<br class="">+ # Build the _uuid module if possible<br class="">+- uuid_incs = find_file("uuid.h", inc_dirs, ["/usr/include/uuid"])<br class="">+- if uuid_incs is not None:<br class="">++ uuid_incs = find_file("uuid.h", inc_dirs, [])<br class="">++ uuid_uuid_incs = find_file("uuid/uuid.h", inc_dirs, [])<br class="">++ if uuid_incs is not None or uuid_uuid_incs is not None:<br class="">+ if self.compiler.find_library_file(lib_dirs, 'uuid'):<br class="">+ uuid_libs = ['uuid']<br class="">+ else:<br class="">diff --git a/meta/recipes-devtools/python/python3_3.5.6.bb b/meta/recipes-devtools/python/python3_3.5.6.bb<br class="">deleted file mode 100644<br class="">index 2a4547694a..0000000000<br class="">--- a/meta/recipes-devtools/python/python3_3.5.6.bb<br class="">+++ /dev/null<br class="">@@ -1,329 +0,0 @@<br class="">-require recipes-devtools/python/python3.inc<br class="">-<br class="">-DEPENDS = "python3-native libffi bzip2 gdbm openssl \<br class="">- sqlite3 zlib virtual/libintl xz qemu-native \<br class="">- qemu-helper-native virtual/crypt"<br class="">-<br class="">-DISTRO_SRC_URI ?= "<a href="file://sitecustomize.py" class="">file://sitecustomize.py</a>"<br class="">-DISTRO_SRC_URI_linuxstdbase = ""<br class="">-SRC_URI = "<a href="http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.xz" class="">http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.xz</a> \<br class="">-<a href="file://python-config.patch" class="">file://python-config.patch</a> \<br class="">-<a href="file://030-fixup-include-dirs.patch" class="">file://030-fixup-include-dirs.patch</a> \<br class="">-<a href="file://070-dont-clean-ipkg-install.patch" class="">file://070-dont-clean-ipkg-install.patch</a> \<br class="">-<a href="file://080-distutils-dont_adjust_files.patch" class="">file://080-distutils-dont_adjust_files.patch</a> \<br class="">-<a href="file://130-readline-setup.patch" class="">file://130-readline-setup.patch</a> \<br class="">-<a href="file://150-fix-setupterm.patch" class="">file://150-fix-setupterm.patch</a> \<br class="">-<a href="file://0001-h2py-Fix-issue-13032-where-it-fails-with-UnicodeDeco.patch" class="">file://0001-h2py-Fix-issue-13032-where-it-fails-with-UnicodeDeco.patch</a> \<br class="">-<a href="file://tweak-MULTIARCH-for-powerpc-linux-gnuspe.patch" class="">file://tweak-MULTIARCH-for-powerpc-linux-gnuspe.patch</a> \<br class="">-<a href="file://support_SOURCE_DATE_EPOCH_in_py_compile.patch" class="">file://support_SOURCE_DATE_EPOCH_in_py_compile.patch</a> \<br class="">-${DISTRO_SRC_URI} \<br class="">-"<br class="">-<br class="">-SRC_URI += "\<br class="">- <a href="file:///03-fix-tkinter-detection.patch" class="">file://03-fix-tkinter-detection.patch</a> \<br class="">- <a href="file:///avoid_warning_about_tkinter.patch" class="">file://avoid_warning_about_tkinter.patch</a> \<br class="">- <a href="file:///cgi_py.patch" class="">file://cgi_py.patch</a> \<br class="">- <a href="file:///host_include_contamination.patch" class="">file://host_include_contamination.patch</a> \<br class="">- <a href="file:///python-3.3-multilib.patch" class="">file://python-3.3-multilib.patch</a> \<br class="">- <a href="file:///sysroot-include-headers.patch" class="">file://sysroot-include-headers.patch</a> \<br class="">- <a href="file:///unixccompiler.patch" class="">file://unixccompiler.patch</a> \<br class="">- <a href="file:///avoid-ncursesw-include-path.patch" class="">file://avoid-ncursesw-include-path.patch</a> \<br class="">- <a href="file:///python3-use-CROSSPYTHONPATH-for-PYTHON_FOR_BUILD.patch" class="">file://python3-use-CROSSPYTHONPATH-for-PYTHON_FOR_BUILD.patch</a> \<br class="">- <a href="file:///sysconfig.py-add-_PYTHON_PROJECT_SRC.patch" class="">file://sysconfig.py-add-_PYTHON_PROJECT_SRC.patch</a> \<br class="">- <a href="file:///setup.py-check-cross_compiling-when-get-FLAGS.patch" class="">file://setup.py-check-cross_compiling-when-get-FLAGS.patch</a> \<br class="">- <a href="file:///configure.ac-fix-LIBPL.patch" class="">file://configure.ac-fix-LIBPL.patch</a> \<br class="">- <a href="file:///0001-Issue-21272-Use-_sysconfigdata.py-to-initialize-dist.patch" class="">file://0001-Issue-21272-Use-_sysconfigdata.py-to-initialize-dist.patch</a> \<br class="">- <a href="file:///pass-missing-libraries-to-Extension-for-mul.patch" class="">file://pass-missing-libraries-to-Extension-for-mul.patch</a> \<br class="">- <a href="file:///Use-correct-CFLAGS-for-extensions-when-cross-compili.patch" class="">file://Use-correct-CFLAGS-for-extensions-when-cross-compili.patch</a> \<br class="">- <a href="file:///0002-Makefile-add-target-to-split-profile-generation.patch" class="">file://0002-Makefile-add-target-to-split-profile-generation.patch</a> \<br class="">- <a href="file:///float-endian.patch" class="">file://float-endian.patch</a> \<br class="">- <a href="file:///ftplib.patch" class="">file://ftplib.patch</a> \<br class="">- <a href="file:///signal.patch" class="">file://signal.patch</a> \<br class="">- <a href="file:///0001-Issue-28043-SSLContext-has-improved-default-settings.patch" class="">file://0001-Issue-28043-SSLContext-has-improved-default-settings.patch</a> \<br class="">- <a href="file:///0002-bpo-29136-Add-TLS-1.3-cipher-suites-and-OP_NO_TLSv1_.patch" class="">file://0002-bpo-29136-Add-TLS-1.3-cipher-suites-and-OP_NO_TLSv1_.patch</a> \<br class="">- <a href="file:///0003-bpo-32947-Fixes-for-TLS-1.3-and-OpenSSL-1.1.1-GH-876.patch" class="">file://0003-bpo-32947-Fixes-for-TLS-1.3-and-OpenSSL-1.1.1-GH-876.patch</a> \<br class="">- <a href="file:///0004-bpo-33570-TLS-1.3-ciphers-for-OpenSSL-1.1.1-GH-6976.patch" class="">file://0004-bpo-33570-TLS-1.3-ciphers-for-OpenSSL-1.1.1-GH-6976.patch</a> \<br class="">- <a href="file:///0005-bpo-30714-ALPN-changes-for-OpenSSL-1.1.0f-2305.patch" class="">file://0005-bpo-30714-ALPN-changes-for-OpenSSL-1.1.0f-2305.patch</a> \<br class="">- <a href="file:///run-ptest" class="">file://run-ptest</a> \<br class="">- "<br class="">-<br class="">-inherit multilib_header python3native update-alternatives qemu ptest<br class="">-<br class="">-MULTILIB_SUFFIX = "${@d.getVar('base_libdir',1).split('/')[-1]}"<br class="">-<br class="">-ALTERNATIVE_${PN}-dev = "python-config"<br class="">-ALTERNATIVE_LINK_NAME[python-config] = "${bindir}/python${PYTHON_BINABI}-config"<br class="">-ALTERNATIVE_TARGET[python-config] = "${bindir}/python${PYTHON_BINABI}-config-${MULTILIB_SUFFIX}"<br class="">-<br class="">-CONFIGUREOPTS += " --with-system-ffi "<br class="">-<br class="">-CACHED_CONFIGUREVARS = "ac_cv_have_chflags=no \<br class="">- ac_cv_have_lchflags=no \<br class="">- ac_cv_have_long_long_format=yes \<br class="">- ac_cv_buggy_getaddrinfo=no \<br class="">- ac_cv_file__dev_ptmx=yes \<br class="">- ac_cv_file__dev_ptc=no \<br class="">-"<br class="">-<br class="">-TARGET_CC_ARCH += "-DNDEBUG -fno-inline"<br class="">-SDK_CC_ARCH += "-DNDEBUG -fno-inline"<br class="">-EXTRA_OEMAKE += "CROSS_COMPILE=yes"<br class="">-EXTRA_OECONF += "CROSSPYTHONPATH=${STAGING_LIBDIR_NATIVE}/python${PYTHON_MAJMIN}/lib-dynload/ --without-ensurepip"<br class="">-<br class="">-PYTHON3_PROFILE_TASK ?= "./python -m test.regrtest --pgo test_grammar test_opcodes test_dict test_builtin test_exceptions test_types test_support || true"<br class="">-<br class="">-export CROSS_COMPILE = "${TARGET_PREFIX}"<br class="">-export CCSHARED = "-fPIC"<br class="">-<br class="">-# Fix cross compilation of different modules<br class="">-export CROSSPYTHONPATH = "${STAGING_LIBDIR_NATIVE}/python${PYTHON_MAJMIN}/lib-dynload/:${B}/build/lib.linux-${TARGET_ARCH}-${PYTHON_MAJMIN}:${S}/Lib:${S}/Lib/plat-linux"<br class="">-<br class="">-PACKAGECONFIG ??= "readline ${@bb.utils.contains('MACHINE_FEATURES', 'qemu-usermode', 'pgo', '', d)}"<br class="">-PACKAGECONFIG[readline] = ",,readline"<br class="">-# Use profile guided optimisation by running PyBench inside qemu-user<br class="">-PACKAGECONFIG[pgo] = "--enable-optimizations"<br class="">-<br class="">-do_configure_append() {<br class="">- rm -f ${S}/Makefile.orig<br class="">-}<br class="">-<br class="">-run_make() {<br class="">- oe_runmake PGEN=${STAGING_BINDIR_NATIVE}/python3-native/pgen \<br class="">- HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python3-native/python3 \<br class="">- STAGING_LIBDIR=${STAGING_LIBDIR} \<br class="">- STAGING_INCDIR=${STAGING_INCDIR} \<br class="">- STAGING_BASELIBDIR=${STAGING_BASELIBDIR} \<br class="">- LIB=${baselib} \<br class="">- ARCH=${TARGET_ARCH} \<br class="">- OPT="${CFLAGS}" \<br class="">- "$@"<br class="">-}<br class="">-<br class="">-do_compile() {<br class="">- # regenerate platform specific files, because they depend on system headers<br class="">- cd ${S}/Lib/plat-linux*<br class="">- include=${STAGING_INCDIR} ${STAGING_BINDIR_NATIVE}/python3-native/python3 \<br class="">- ${S}/Tools/scripts/h2py.py -i '(u_long)' \<br class="">- ${STAGING_INCDIR}/dlfcn.h \<br class="">- ${STAGING_INCDIR}/linux/cdrom.h \<br class="">- ${STAGING_INCDIR}/netinet/in.h \<br class="">- ${STAGING_INCDIR}/sys/types.h<br class="">- sed -e 's,${STAGING_DIR_HOST},,g' -i *.py<br class="">- cd -<br class="">-<br class="">- # remove any bogus LD_LIBRARY_PATH<br class="">- sed -i -e s,RUNSHARED=.*,RUNSHARED=, Makefile<br class="">-<br class="">- if [ ! -f Makefile.orig ]; then<br class="">- install -m 0644 Makefile Makefile.orig<br class="">- fi<br class="">- sed -i -e 's,^CONFIGURE_LDFLAGS=.*,CONFIGURE_LDFLAGS=-L. -L${STAGING_LIBDIR},g' \<br class="">- -e 's,libdir=${libdir},libdir=${STAGING_LIBDIR},g' \<br class="">- -e 's,libexecdir=${libexecdir},libexecdir=${STAGING_DIR_HOST}${libexecdir},g' \<br class="">- -e 's,^LIBDIR=.*,LIBDIR=${STAGING_LIBDIR},g' \<br class="">- -e 's,includedir=${includedir},includedir=${STAGING_INCDIR},g' \<br class="">- -e 's,^INCLUDEDIR=.*,INCLUDE=${STAGING_INCDIR},g' \<br class="">- -e 's,^CONFINCLUDEDIR=.*,CONFINCLUDE=${STAGING_INCDIR},g' \<br class="">- Makefile<br class="">- # save copy of it now, because if we do it in do_install and<br class="">- # then call do_install twice we get Makefile.orig == Makefile.sysroot<br class="">- install -m 0644 Makefile Makefile.sysroot<br class="">-<br class="">- if ${@bb.utils.contains('PACKAGECONFIG', 'pgo', 'true', 'false', d)}; then<br class="">- run_make profile-opt<br class="">- qemu_binary="${@qemu_wrapper_cmdline(d, '${STAGING_DIR_TARGET}', ['${B}', '${STAGING_DIR_TARGET}/${base_libdir}'])}"<br class="">- cat >pgo-wrapper <<EOF<br class="">-#!/bin/sh<br class="">-cd ${B}<br class="">-$qemu_binary "\$@"<br class="">-EOF<br class="">- chmod +x pgo-wrapper<br class="">- bbnote Gathering profiling data<br class="">- ./pgo-wrapper ${PYTHON3_PROFILE_TASK}<br class="">- bbnote Profiling data gathered, rebuilding<br class="">- run_make clean_and_use_profile<br class="">- else<br class="">- run_make libpython3.so<br class="">- run_make<br class="">- fi<br class="">-}<br class="">-<br class="">-do_install() {<br class="">- # make install needs the original Makefile, or otherwise the inclues would<br class="">- # go to ${D}${STAGING...}/...<br class="">- install -m 0644 Makefile.orig Makefile<br class="">-<br class="">- install -d ${D}${libdir}/pkgconfig<br class="">- install -d ${D}${libdir}/python${PYTHON_MAJMIN}/config<br class="">-<br class="">- # rerun the build once again with original makefile this time<br class="">- # run install in a separate step to avoid compile/install race<br class="">- if ${@bb.utils.contains('PACKAGECONFIG', 'pgo', 'true', 'false', d)}; then<br class="">- run_make DESTDIR=${D} LIBDIR=${libdir} build_all_use_profile<br class="">- else<br class="">- run_make DESTDIR=${D} LIBDIR=${libdir}<br class="">- fi<br class="">-<br class="">- run_make DESTDIR=${D} LIBDIR=${libdir} install<br class="">-<br class="">- # avoid conflict with 2to3 from Python 2<br class="">- rm -f ${D}/${bindir}/2to3<br class="">-<br class="">- install -m 0644 Makefile.sysroot ${D}/${libdir}/python${PYTHON_MAJMIN}/config/Makefile<br class="">- install -m 0644 Makefile.sysroot ${D}/${libdir}/python${PYTHON_MAJMIN}/config-${PYTHON_MAJMIN}${PYTHON_ABI}/Makefile<br class="">-<br class="">- if [ -e ${WORKDIR}/sitecustomize.py ]; then<br class="">- install -m 0644 ${WORKDIR}/sitecustomize.py ${D}/${libdir}/python${PYTHON_MAJMIN}<br class="">- fi<br class="">-<br class="">- oe_multilib_header python${PYTHON_BINABI}/pyconfig.h<br class="">-}<br class="">-<br class="">-do_install_append_class-nativesdk () {<br class="">- create_wrapper ${D}${bindir}/python${PYTHON_MAJMIN} PYTHONHOME='${prefix}' TERMINFO_DIRS='${sysconfdir}/terminfo:/etc/terminfo:/usr/share/terminfo:/usr/share/misc/terminfo:/lib/terminfo' PYTHONNOUSERSITE='1'<br class="">-}<br class="">-<br class="">-SSTATE_SCAN_FILES += "Makefile"<br class="">-PACKAGE_PREPROCESS_FUNCS += "py_package_preprocess"<br class="">-<br class="">-py_package_preprocess () {<br class="">- # copy back the old Makefile to fix target package<br class="">- install -m 0644 ${B}/Makefile.orig ${PKGD}/${libdir}/python${PYTHON_MAJMIN}/config/Makefile<br class="">- install -m 0644 ${B}/Makefile.orig ${PKGD}/${libdir}/python${PYTHON_MAJMIN}/config-${PYTHON_MAJMIN}${PYTHON_ABI}/Makefile<br class="">- # Remove references to buildmachine paths in target Makefile and _sysconfigdata<br class="">- sed -i -e 's:--sysroot=${STAGING_DIR_TARGET}::g' -e s:'--with-libtool-sysroot=${STAGING_DIR_TARGET}'::g \<br class="">- -e 's|${DEBUG_PREFIX_MAP}||g' \<br class="">- -e 's:${HOSTTOOLS_DIR}/::g' \<br class="">- -e 's:${RECIPE_SYSROOT_NATIVE}::g' \<br class="">- -e 's:${RECIPE_SYSROOT}::g' \<br class="">- -e 's:${BASE_WORKDIR}/${MULTIMACH_TARGET_SYS}::g' \<br class="">- ${PKGD}/${libdir}/python${PYTHON_MAJMIN}/config/Makefile \<br class="">- ${PKGD}/${libdir}/python${PYTHON_MAJMIN}/config-${PYTHON_MAJMIN}${PYTHON_ABI}/Makefile \<br class="">- ${PKGD}/${libdir}/python${PYTHON_MAJMIN}/_sysconfigdata.py \<br class="">- ${PKGD}/${bindir}/python${PYTHON_BINABI}-config<br class="">-<br class="">- # Recompile _sysconfigdata after modifying it<br class="">- cd ${PKGD}<br class="">- ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} \<br class="">- -c "from py_compile import compile; compile('./${libdir}/python${PYTHON_MAJMIN}/_sysconfigdata.py')"<br class="">- ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} \<br class="">- -c "from py_compile import compile; compile('./${libdir}/python${PYTHON_MAJMIN}/_sysconfigdata.py', optimize=1)"<br class="">- ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} \<br class="">- -c "from py_compile import compile; compile('./${libdir}/python${PYTHON_MAJMIN}/_sysconfigdata.py', optimize=2)"<br class="">- cd -<br class="">-<br class="">- mv ${PKGD}/${bindir}/python${PYTHON_BINABI}-config ${PKGD}/${bindir}/python${PYTHON_BINABI}-config-${MULTILIB_SUFFIX}<br class="">-}<br class="">-<br class="">-PACKAGES_remove = "${PN}"<br class="">-<br class="">-# manual dependency additions<br class="">-RPROVIDES_${PN}-modules = "${PN}"<br class="">-RRECOMMENDS_${PN}-core_append_class-nativesdk = " nativesdk-python3-modules"<br class="">-RRECOMMENDS_${PN}-crypt = "openssl ca-certificates"<br class="">-<br class="">-FILES_${PN}-2to3 += "${bindir}/2to3-${PYTHON_MAJMIN}"<br class="">-FILES_${PN}-pydoc += "${bindir}/pydoc${PYTHON_MAJMIN} ${bindir}/pydoc3"<br class="">-FILES_${PN}-idle += "${bindir}/idle3 ${bindir}/idle${PYTHON_MAJMIN}"<br class="">-<br class="">-PACKAGES =+ "${PN}-pyvenv"<br class="">-FILES_${PN}-pyvenv += "${bindir}/pyvenv-${PYTHON_MAJMIN} ${bindir}/pyvenv"<br class="">-<br class="">-# package libpython3<br class="">-PACKAGES =+ "libpython3 libpython3-staticdev"<br class="">-FILES_libpython3 = "${libdir}/libpython*.so.*"<br class="">-FILES_libpython3-staticdev += "${libdir}/python${PYTHON_MAJMIN}/config-${PYTHON_BINABI}/libpython${PYTHON_BINABI}.a"<br class="">-INSANE_SKIP_${PN}-dev += "dev-elf"<br class="">-<br class="">-# catch all the rest (unsorted)<br class="">-PACKAGES += "${PN}-misc"<br class="">-RDEPENDS_${PN}-misc += "${PN}-core ${PN}-email ${PN}-codecs"<br class="">-RDEPENDS_${PN}-modules += "${PN}-misc"<br class="">-FILES_${PN}-misc = "${libdir}/python${PYTHON_MAJMIN}"<br class="">-<br class="">-# catch manpage<br class="">-PACKAGES += "${PN}-man"<br class="">-FILES_${PN}-man = "${datadir}/man"<br class="">-<br class="">-RDEPENDS_${PN}-ptest = "${PN}-modules ${PN}-tests unzip bzip2"<br class="">-<br class="">-RDEPENDS_${PN}-dev = ""<br class="">-<br class="">-BBCLASSEXTEND = "nativesdk"<br class="">-<br class="">-# We want bytecode precompiled .py files (.pyc's) by default<br class="">-# but the user may set it on their own conf<br class="">-INCLUDE_PYCS ?= "1"<br class="">-<br class="">-python(){<br class="">- import collections, json<br class="">-<br class="">- filename = os.path.join(d.getVar('THISDIR'), 'python3', 'python3-manifest.json')<br class="">- # This python changes the datastore based on the contents of a file, so mark<br class="">- # that dependency.<br class="">- bb.parse.mark_dependency(d, filename)<br class="">-<br class="">- with open(filename) as manifest_file:<br class="">- python_manifest=json.load(manifest_file, object_pairs_hook=collections.OrderedDict)<br class="">-<br class="">- include_pycs = d.getVar('INCLUDE_PYCS')<br class="">-<br class="">- packages = d.getVar('PACKAGES').split()<br class="">- pn = d.getVar('PN')<br class="">-<br class="">- newpackages=[]<br class="">- for key in python_manifest:<br class="">- pypackage= pn + '-' + key<br class="">-<br class="">- if pypackage not in packages:<br class="">- # We need to prepend, otherwise python-misc gets everything<br class="">- # so we use a new variable<br class="">- newpackages.append(pypackage)<br class="">-<br class="">- # "Build" python's manifest FILES, RDEPENDS and SUMMARY<br class="">- d.setVar('FILES_' + pypackage, '')<br class="">- for value in python_manifest[key]['files']:<br class="">- d.appendVar('FILES_' + pypackage, ' ' + value)<br class="">-<br class="">- # Add cached files<br class="">- if include_pycs == '1':<br class="">- for value in python_manifest[key]['cached']:<br class="">- d.appendVar('FILES_' + pypackage, ' ' + value)<br class="">-<br class="">- for value in python_manifest[key]['rdepends']:<br class="">- # Make it work with or without $PN<br class="">- if '${PN}' in value:<br class="">- value=value.split('-')[1]<br class="">- d.appendVar('RDEPENDS_' + pypackage, ' ' + pn + '-' + value)<br class="">- d.setVar('SUMMARY_' + pypackage, python_manifest[key]['summary'])<br class="">-<br class="">- # Prepending so to avoid python-misc getting everything<br class="">- packages = newpackages + packages<br class="">- d.setVar('PACKAGES', ' '.join(packages))<br class="">- d.setVar('ALLOW_EMPTY_${PN}-modules', '1')<br class="">-}<br class="">-<br class="">-# Files needed to create a new manifest<br class="">-SRC_URI += "<a href="file://create_manifest3.py" class="">file://create_manifest3.py</a> <a href="file:///get_module_deps3.py" class="">file://get_module_deps3.py</a> <a href="file://python3-manifest.json" class="">file://python3-manifest.json</a>"<br class="">-<br class="">-do_create_manifest() {<br class="">- # This task should be run with every new release of Python.<br class="">- # We must ensure that PACKAGECONFIG enables everything when creating<br class="">- # a new manifest, this is to base our new manifest on a complete<br class="">- # native python build, containing all dependencies, otherwise the task<br class="">- # wont be able to find the required files.<br class="">- # e.g. BerkeleyDB is an optional build dependency so it may or may not<br class="">- # be present, we must ensure it is.<br class="">-<br class="">- cd ${WORKDIR}<br class="">- # This needs to be executed by python-native and NOT by HOST's python<br class="">- nativepython3 create_manifest3.py ${PYTHON_MAJMIN}<br class="">- cp python3-manifest.json.new ${THISDIR}/python3/python3-manifest.json<br class="">-}<br class="">-<br class="">-# bitbake python -c create_manifest<br class="">-addtask do_create_manifest<br class="">-<br class="">-# Make sure we have native python ready when we create a new manifest<br class="">-do_create_manifest[depends] += "python3:do_prepare_recipe_sysroot"<br class="">-do_create_manifest[depends] += "python3:do_patch"<br class="">diff --git a/meta/recipes-devtools/python/python3_3.7.0.bb b/meta/recipes-devtools/python/python3_3.7.0.bb<br class="">new file mode 100644<br class="">index 0000000000..453df546f0<br class="">--- /dev/null<br class="">+++ b/meta/recipes-devtools/python/python3_3.7.0.bb<br class="">@@ -0,0 +1,300 @@<br class="">+# Maintainers hint: with every new release of Python, the task<br class="">+# create_manifest - please see for detailed documentation<br class="">+# inside do_create_manifest<br class="">+require recipes-devtools/python/python3.inc<br class="">+<br class="">+DEPENDS = "libffi bzip2 gdbm openssl sqlite3 zlib xz \<br class="">+ util-linux libtirpc libnsl2 virtual/libintl virtual/crypt\<br class="">+"<br class="">+DEPENDS += "${@["qemu-native qemu-helper-native", ""][bb.utils.contains('PACKAGECONFIG', 'pgo', 0, 1, d)]}"<br class="">+<br class="">+PYTHON_BINABI = "${PYTHON_MAJMIN}${PYTHON_ABI}"<br class="">+<br class="">+SRC_URI += "\<br class="">+ <a href="file:///tweak-MULTIARCH-for-powerpc-linux-gnuspe.patch" class="">file://tweak-MULTIARCH-for-powerpc-linux-gnuspe.patch</a> \<br class="">+ <a href="file:///cgi_py.patch" class="">file://cgi_py.patch</a> \<br class="">+ <a href="file:///host_include_contamination.patch" class="">file://host_include_contamination.patch</a> \<br class="">+ <a href="file:///uuid_when_cross_compiling.patch" class="">file://uuid_when_cross_compiling.patch</a> \<br class="">+ <a href="file:///avoid-ncursesw-include-path.patch" class="">file://avoid-ncursesw-include-path.patch</a> \<br class="">+ <a href="file:///python3-use-CROSSPYTHONPATH-for-PYTHON_FOR_BUILD.patch" class="">file://python3-use-CROSSPYTHONPATH-for-PYTHON_FOR_BUILD.patch</a> \<br class="">+ <a href="file:///configure.ac-fix-LIBPL.patch" class="">file://configure.ac-fix-LIBPL.patch</a> \<br class="">+ <a href="file:///pass-missing-libraries-to-Extension-for-mul.patch" class="">file://pass-missing-libraries-to-Extension-for-mul.patch</a> \<br class="">+ <a href="file:///float-endian.patch" class="">file://float-endian.patch</a> \<br class="">+ <a href="file:///ftplib.patch" class="">file://ftplib.patch</a> \<br class="">+ <a href="file:///run-ptest" class="">file://run-ptest</a> \<br class="">+"<br class="">+<br class="">+inherit multilib_header python3native update-alternatives qemu ptest<br class="">+<br class="">+MULTILIB_SUFFIX = "${@d.getVar('base_libdir',1).split('/')[-1]}"<br class="">+<br class="">+ALTERNATIVE_${PN}-dev = "python-config"<br class="">+ALTERNATIVE_LINK_NAME[python-config] = "${bindir}/python${PYTHON_BINABI}-config"<br class="">+ALTERNATIVE_TARGET[python-config] = "${bindir}/python${PYTHON_BINABI}-config-${MULTILIB_SUFFIX}"<br class="">+<br class="">+CACHED_CONFIGUREVARS = "ac_cv_have_chflags=no \<br class="">+ ac_cv_have_lchflags=no \<br class="">+ ac_cv_have_long_long_format=yes \<br class="">+ ac_cv_buggy_getaddrinfo=no \<br class="">+ ac_cv_file__dev_ptmx=yes \<br class="">+ ac_cv_file__dev_ptc=no \<br class="">+"<br class="">+<br class="">+TARGET_CC_ARCH += "-DNDEBUG -fno-inline"<br class="">+SDK_CC_ARCH += "-DNDEBUG -fno-inline"<br class="">+EXTRA_OEMAKE += "CROSS_COMPILE=yes"<br class="">+EXTRA_OECONF += "CROSSPYTHONPATH=${STAGING_LIBDIR_NATIVE}/python${PYTHON_MAJMIN}/lib-dynload/ --without-ensurepip"<br class="">+PYTHON3_PROFILE_TASK ?= "./python -m test.regrtest --pgo test_grammar test_opcodes test_dict test_builtin test_exceptions test_types test_support"<br class="">+<br class="">+export CROSS_COMPILE = "${TARGET_PREFIX}"<br class="">+export CCSHARED = "-fPIC"<br class="">+<br class="">+# Fix cross compilation of different modules<br class="">+export CROSSPYTHONPATH = "${STAGING_LIBDIR_NATIVE}/python${PYTHON_MAJMIN}/lib-dynload/:${B}/build/lib.linux-${TARGET_ARCH}-${PYTHON_MAJMIN}:${S}/Lib:${S}/Lib/plat-linux"<br class="">+<br class="">+PACKAGECONFIG ??= "pgo readline ${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', 'bluetooth', '', d)}"<br class="">+PACKAGECONFIG[readline] = ",,readline"<br class="">+# Use profile guided optimisation by running PyBench inside qemu-user<br class="">+PACKAGECONFIG[pgo] = "--enable-optimizations"<br class="">+<br class="">+run_make() {<br class="">+ oe_runmake PGEN=${STAGING_BINDIR_NATIVE}/python3-native/pgen \<br class="">+ HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python3-native/python3 \<br class="">+ STAGING_LIBDIR=${STAGING_LIBDIR} \<br class="">+ STAGING_INCDIR=${STAGING_INCDIR} \<br class="">+ STAGING_BASELIBDIR=${STAGING_BASELIBDIR} \<br class="">+ LIB=${baselib} \<br class="">+ ARCH=${TARGET_ARCH} \<br class="">+ OPT="${CFLAGS}" \<br class="">+ "$@"<br class="">+}<br class="">+<br class="">+do_compile() {<br class="">+ # remove any bogus LD_LIBRARY_PATH<br class="">+ sed -i -e s,RUNSHARED=.*,RUNSHARED=, Makefile<br class="">+<br class="">+ if [ ! -f Makefile.orig ]; then<br class="">+ install -m 0644 Makefile Makefile.orig<br class="">+ fi<br class="">+ sed -i -e 's,^CONFIGURE_LDFLAGS=.*,CONFIGURE_LDFLAGS=-L. -L${STAGING_LIBDIR},g' \<br class="">+ -e 's,libdir=${libdir},libdir=${STAGING_LIBDIR},g' \<br class="">+ -e 's,libexecdir=${libexecdir},libexecdir=${STAGING_DIR_HOST}${libexecdir},g' \<br class="">+ -e 's,^LIBDIR=.*,LIBDIR=${STAGING_LIBDIR},g' \<br class="">+ -e 's,includedir=${includedir},includedir=${STAGING_INCDIR},g' \<br class="">+ -e 's,^INCLUDEDIR=.*,INCLUDE=${STAGING_INCDIR},g' \<br class="">+ -e 's,^CONFINCLUDEDIR=.*,CONFINCLUDE=${STAGING_INCDIR},g' \<br class="">+ Makefile<br class="">+<br class="">+ if ${@bb.utils.contains('PACKAGECONFIG', 'pgo', 'true', 'false', d)}; then<br class="">+ qemu_binary="${@qemu_wrapper_cmdline(d, '${STAGING_DIR_TARGET}', ['${B}', '${STAGING_DIR_TARGET}/${base_libdir}'])}"<br class="">+ cat > ${B}/pgo-wrapper << EOF<br class="">+#!/bin/sh<br class="">+set -x<br class="">+cd ${B}<br class="">+$qemu_binary "\$@"<br class="">+EOF<br class="">+ chmod +x ${B}/pgo-wrapper<br class="">+ bbnote Updating Makefile to gather profiling data during build<br class="">+ sed -i -e 's,$(LLVM_PROF_FILE) $(RUNSHARED) ./$(BUILDPYTHON) $(PROFILE_TASK),${B}/pgo-wrapper ./python $(PROFILE_TASK),' \<br class="">+ -e 's,PROFILE_TASK=.*,PROFILE_TASK=${PYTHON3_PROFILE_TASK},' \<br class="">+ Makefile<br class="">+ else<br class="">+ sed -i -e 's,$(LLVM_PROF_FILE) $(RUNSHARED) ./$(BUILDPYTHON) $(PROFILE_TASK),:,' \<br class="">+ Makefile<br class="">+ fi<br class="">+<br class="">+ # save copy of it now, because if we do it in do_install and<br class="">+ # then call do_install twice we get Makefile.orig == Makefile.sysroot<br class="">+ install -m 0644 Makefile Makefile.sysroot<br class="">+<br class="">+ run_make profile-opt<br class="">+}<br class="">+<br class="">+do_install() {<br class="">+ # make install needs the original Makefile, or otherwise the inclues would<br class="">+ # go to ${D}${STAGING...}/...<br class="">+ install -m 0644 Makefile.orig Makefile<br class="">+<br class="">+ install -d ${D}${libdir}/pkgconfig<br class="">+ install -d ${D}${libdir}/python${PYTHON_MAJMIN}/config<br class="">+<br class="">+ # rerun the build once again with original makefile this time<br class="">+ # run install in a separate step to avoid compile/install race<br class="">+ run_make DESTDIR=${D} LIBDIR=${libdir} build_all<br class="">+ run_make DESTDIR=${D} LIBDIR=${libdir} install<br class="">+<br class="">+ # avoid conflict with 2to3 from Python 2<br class="">+ rm -f ${D}/${bindir}/2to3<br class="">+<br class="">+ set -x<br class="">+ install -m 0644 Makefile.sysroot ${D}/${libdir}/python${PYTHON_MAJMIN}/config/Makefile<br class="">+ install -m 0644 Makefile.sysroot ${D}/${libdir}/python${PYTHON_MAJMIN}/config-${PYTHON_BINABI}-${MULTIARCH}/Makefile<br class="">+<br class="">+ if [ -e ${WORKDIR}/sitecustomize.py ]; then<br class="">+ install -m 0644 ${WORKDIR}/sitecustomize.py ${D}/${libdir}/python${PYTHON_MAJMIN}<br class="">+ fi<br class="">+<br class="">+ oe_multilib_header python${PYTHON_BINABI}/pyconfig.h<br class="">+}<br class="">+<br class="">+do_install_append_class-nativesdk () {<br class="">+ create_wrapper ${D}${bindir}/python${PYTHON_MAJMIN} PYTHONHOME='${prefix}' TERMINFO_DIRS='${sysconfdir}/terminfo:/etc/terminfo:/usr/share/terminfo:/usr/share/misc/terminfo:/lib/terminfo' PYTHONNOUSERSITE='1'<br class="">+}<br class="">+<br class="">+SSTATE_SCAN_FILES += "Makefile"<br class="">+PACKAGE_PREPROCESS_FUNCS += "py_package_preprocess"<br class="">+<br class="">+py_package_preprocess () {<br class="">+ MAKESETTINGS="$(egrep '^(ABIFLAGS|MULTIARCH)=' ${B}/Makefile | sed -E -e 's/[[:space:]]//g' -e 's/=/="/' -e 's/$/"/')"<br class="">+ eval ${MAKESETTINGS}<br class="">+ if test "${ABIFLAGS}" != "${PYTHON_ABI}"; then<br class="">+ die "do_install: configure determined ABIFLAGS '${ABIFLAGS}' != '${PYTHON_ABI}' from python3-dir.bbclass"<br class="">+ fi<br class="">+ if test "x${BUILD_OS}" = "x${TARGET_OS}"; then<br class="">+ # no cross-compile at all<br class="">+ _PYTHON_SYSCONFIGDATA_NAME=${PYTHON_ABI}_${TARGET_OS}_${MULTIARCH}<br class="">+ else<br class="">+ # at the very moment, it's the only available target<br class="">+ _PYTHON_SYSCONFIGDATA_NAME=${PYTHON_ABI}_linux_${MULTIARCH}<br class="">+ fi<br class="">+<br class="">+ # copy back the old Makefile to fix target package<br class="">+ install -m 0644 ${B}/Makefile.orig ${PKGD}/${libdir}/python${PYTHON_MAJMIN}/config/Makefile<br class="">+ install -m 0644 ${B}/Makefile.orig ${PKGD}/${libdir}/python${PYTHON_MAJMIN}/config-${PYTHON_BINABI}-${MULTIARCH}/Makefile<br class="">+ # Remove references to buildmachine paths in target Makefile and _sysconfigdata<br class="">+ sed -i -e 's:--sysroot=${STAGING_DIR_TARGET}::g' -e s:'--with-libtool-sysroot=${STAGING_DIR_TARGET}'::g \<br class="">+ -e 's|${DEBUG_PREFIX_MAP}||g' \<br class="">+ -e 's:${HOSTTOOLS_DIR}/::g' \<br class="">+ -e 's:${RECIPE_SYSROOT_NATIVE}::g' \<br class="">+ -e 's:${RECIPE_SYSROOT}::g' \<br class="">+ -e 's:${BASE_WORKDIR}/${MULTIMACH_TARGET_SYS}::g' \<br class="">+ ${PKGD}/${libdir}/python${PYTHON_MAJMIN}/config/Makefile \<br class="">+ ${PKGD}/${libdir}/python${PYTHON_MAJMIN}/config-${PYTHON_BINABI}-${MULTIARCH}/Makefile \<br class="">+ ${PKGD}/${libdir}/python${PYTHON_MAJMIN}/_sysconfigdata_${_PYTHON_SYSCONFIGDATA_NAME}.py \<br class="">+ ${PKGD}/${bindir}/python${PYTHON_BINABI}-config<br class="">+<br class="">+ # Recompile _sysconfigdata after modifying it<br class="">+ cd ${PKGD}<br class="">+ ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} \<br class="">+ -c "from py_compile import compile; compile('./${libdir}/python${PYTHON_MAJMIN}/_sysconfigdata_${_PYTHON_SYSCONFIGDATA_NAME}.py')"<br class="">+ ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} \<br class="">+ -c "from py_compile import compile; compile('./${libdir}/python${PYTHON_MAJMIN}/_sysconfigdata_${_PYTHON_SYSCONFIGDATA_NAME}.py', optimize=1)"<br class="">+ ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} \<br class="">+ -c "from py_compile import compile; compile('./${libdir}/python${PYTHON_MAJMIN}/_sysconfigdata_${_PYTHON_SYSCONFIGDATA_NAME}.py', optimize=2)"<br class="">+ cd -<br class="">+<br class="">+ mv ${PKGD}/${bindir}/python${PYTHON_BINABI}-config ${PKGD}/${bindir}/python${PYTHON_BINABI}-config-${MULTILIB_SUFFIX}<br class="">+}<br class="">+<br class="">+PACKAGES_remove = "${PN}"<br class="">+<br class="">+# manual dependency additions<br class="">+RPROVIDES_${PN}-modules = "${PN}"<br class="">+RRECOMMENDS_${PN}-core_append_class-nativesdk = " nativesdk-python3-modules"<br class="">+RRECOMMENDS_${PN}-crypt = "openssl ca-certificates"<br class="">+<br class="">+FILES_${PN}-2to3 += "${bindir}/2to3-${PYTHON_MAJMIN}"<br class="">+FILES_${PN}-pydoc += "${bindir}/pydoc${PYTHON_MAJMIN} ${bindir}/pydoc3"<br class="">+FILES_${PN}-idle += "${bindir}/idle3 ${bindir}/idle${PYTHON_MAJMIN}"<br class="">+<br class="">+PACKAGES =+ "${PN}-pyvenv"<br class="">+FILES_${PN}-pyvenv += "${bindir}/pyvenv-${PYTHON_MAJMIN} ${bindir}/pyvenv"<br class="">+<br class="">+# package libpython3<br class="">+PACKAGES =+ "libpython3 libpython3-staticdev"<br class="">+FILES_libpython3 = "${libdir}/libpython*.so.*"<br class="">+FILES_libpython3-staticdev += "${libdir}/python${PYTHON_MAJMIN}/config-${PYTHON_BINABI}*/libpython${PYTHON_BINABI}.a"<br class="">+INSANE_SKIP_${PN}-dev += "dev-elf"<br class="">+<br class="">+# catch all the rest (unsorted)<br class="">+PACKAGES += "${PN}-misc"<br class="">+RDEPENDS_${PN}-misc += "${PN}-core ${PN}-email ${PN}-codecs"<br class="">+RDEPENDS_${PN}-modules += "${PN}-misc"<br class="">+FILES_${PN}-misc = "${libdir}/python${PYTHON_MAJMIN}"<br class="">+<br class="">+# catch manpage<br class="">+PACKAGES += "${PN}-man"<br class="">+FILES_${PN}-man = "${datadir}/man"<br class="">+<br class="">+RDEPENDS_${PN}-ptest = "${PN}-modules ${PN}-tests unzip bzip2"<br class="">+<br class="">+RDEPENDS_${PN}-dev = ""<br class="">+<br class="">+BBCLASSEXTEND = "nativesdk"<br class="">+<br class="">+# We want bytecode precompiled .py files (.pyc's) by default<br class="">+# but the user may set it on their own conf<br class="">+INCLUDE_PYCS ?= "1"<br class="">+<br class="">+python(){<br class="">+ import collections, json<br class="">+<br class="">+ filename = os.path.join(d.getVar('THISDIR'), 'python3', 'python3-manifest.json')<br class="">+ # This python changes the datastore based on the contents of a file, so mark<br class="">+ # that dependency.<br class="">+ bb.parse.mark_dependency(d, filename)<br class="">+<br class="">+ with open(filename) as manifest_file:<br class="">+ python_manifest=json.load(manifest_file, object_pairs_hook=collections.OrderedDict)<br class="">+<br class="">+ include_pycs = d.getVar('INCLUDE_PYCS')<br class="">+<br class="">+ packages = d.getVar('PACKAGES').split()<br class="">+ pn = d.getVar('PN')<br class="">+<br class="">+ newpackages=[]<br class="">+ for key in python_manifest:<br class="">+ pypackage= pn + '-' + key<br class="">+<br class="">+ if pypackage not in packages:<br class="">+ # We need to prepend, otherwise python-misc gets everything<br class="">+ # so we use a new variable<br class="">+ newpackages.append(pypackage)<br class="">+<br class="">+ # "Build" python's manifest FILES, RDEPENDS and SUMMARY<br class="">+ d.setVar('FILES_' + pypackage, '')<br class="">+ for value in python_manifest[key]['files']:<br class="">+ d.appendVar('FILES_' + pypackage, ' ' + value)<br class="">+<br class="">+ # Add cached files<br class="">+ if include_pycs == '1':<br class="">+ for value in python_manifest[key]['cached']:<br class="">+ d.appendVar('FILES_' + pypackage, ' ' + value)<br class="">+<br class="">+ for value in python_manifest[key]['rdepends']:<br class="">+ # Make it work with or without $PN<br class="">+ if '${PN}' in value:<br class="">+ value=value.split('-')[1]<br class="">+ d.appendVar('RDEPENDS_' + pypackage, ' ' + pn + '-' + value)<br class="">+ d.setVar('SUMMARY_' + pypackage, python_manifest[key]['summary'])<br class="">+<br class="">+ # Prepending so to avoid python-misc getting everything<br class="">+ packages = newpackages + packages<br class="">+ d.setVar('PACKAGES', ' '.join(packages))<br class="">+ d.setVar('ALLOW_EMPTY_${PN}-modules', '1')<br class="">+}<br class="">+<br class="">+# Files needed to create a new manifest<br class="">+SRC_URI += "<a href="file://create_manifest3.py" class="">file://create_manifest3.py</a> <a href="file:///get_module_deps3.py" class="">file://get_module_deps3.py</a> <a href="file://python3-manifest.json" class="">file://python3-manifest.json</a>"<br class="">+<br class="">+do_create_manifest() {<br class="">+ # This task should be run with every new release of Python.<br class="">+ # We must ensure that PACKAGECONFIG enables everything when creating<br class="">+ # a new manifest, this is to base our new manifest on a complete<br class="">+ # native python build, containing all dependencies, otherwise the task<br class="">+ # wont be able to find the required files.<br class="">+ # e.g. BerkeleyDB is an optional build dependency so it may or may not<br class="">+ # be present, we must ensure it is.<br class="">+<br class="">+ cd ${WORKDIR}<br class="">+ # This needs to be executed by python-native and NOT by HOST's python<br class="">+ nativepython3 create_manifest3.py ${PYTHON_MAJMIN}<br class="">+ cp python3-manifest.json.new ${THISDIR}/python3/python3-manifest.json<br class="">+}<br class="">+<br class="">+# bitbake python -c create_manifest<br class="">+addtask do_create_manifest<br class="">+<br class="">+# Make sure we have native python ready when we create a new manifest<br class="">+do_create_manifest[depends] += "python3:do_prepare_recipe_sysroot"<br class="">+do_create_manifest[depends] += "python3:do_patch"<br class="">--<br class="">2.17.1<br class=""><br class="">--<br class="">_______________________________________________<br class="">Openembedded-core mailing list<br class=""><a href="mailto:Openembedded-core@lists.openembedded.org" class="">Openembedded-core@lists.openembedded.org</a><br class="">http://lists.openembedded.org/mailman/listinfo/openembedded-core<br class=""></blockquote>-- <br class="">_______________________________________________<br class="">Openembedded-core mailing list<br class=""><a href="mailto:Openembedded-core@lists.openembedded.org" class="">Openembedded-core@lists.openembedded.org</a><br class="">http://lists.openembedded.org/mailman/listinfo/openembedded-core<br class=""></div></div></blockquote></div><br class=""><div class="">
<div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">-- </div><div class="">Jens Rehsack - <a href="mailto:rehsack@gmail.com" class="">rehsack@gmail.com</a></div></div></div>
</div>
<br class=""></body></html>