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