summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/python/python3-native_3.5.6.bb
diff options
context:
space:
mode:
authorAnuj Mittal <anuj.mittal@intel.com>2018-09-12 17:44:11 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-09-13 07:42:28 +0100
commit55f36a4045b44e644887bc4316d6d3aae5d12e22 (patch)
tree0f082c7f9cac4d481c158eaa5604d4683d855e22 /meta/recipes-devtools/python/python3-native_3.5.6.bb
parent37be2ed7a94363b94cde413341a3795c9754994a (diff)
downloadpoky-55f36a4045b44e644887bc4316d6d3aae5d12e22.tar.gz
python3{,native}: update to 3.5.6
Includes changes: 76aa2c0a9a bpo-33216: Clarify the documentation for CALL_FUNCTION_* (#8338) 1b141b9553 Doc: Backport language switcher (bpo-33700, bpo-31045) (#8048) f381cfe07d [3.5] bpo-33001: Prevent buffer overrun in os.symlink (GH-5989) (#5991) 937ac1fe06 [3.5] bpo-32981: Fix catastrophic backtracking vulns (GH-5955) (#6034) (From OE-Core rev: e38ff96cc2217df403ea2c5abcd35d42969689d4) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/python/python3-native_3.5.6.bb')
-rw-r--r--meta/recipes-devtools/python/python3-native_3.5.6.bb110
1 files changed, 110 insertions, 0 deletions
diff --git a/meta/recipes-devtools/python/python3-native_3.5.6.bb b/meta/recipes-devtools/python/python3-native_3.5.6.bb
new file mode 100644
index 0000000000..46b3cf398d
--- /dev/null
+++ b/meta/recipes-devtools/python/python3-native_3.5.6.bb
@@ -0,0 +1,110 @@
1require recipes-devtools/python/python.inc
2
3PR = "${INC_PR}.0"
4PYTHON_MAJMIN = "3.5"
5DISTRO_SRC_URI ?= "file://sitecustomize.py"
6DISTRO_SRC_URI_linuxstdbase = ""
7SRC_URI = "http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.xz \
8file://12-distutils-prefix-is-inside-staging-area.patch \
9file://python-config.patch \
10file://030-fixup-include-dirs.patch \
11file://070-dont-clean-ipkg-install.patch \
12file://080-distutils-dont_adjust_files.patch \
13file://130-readline-setup.patch \
14file://150-fix-setupterm.patch \
15file://python-3.3-multilib.patch \
16file://03-fix-tkinter-detection.patch \
17file://avoid_warning_about_tkinter.patch \
18file://0001-h2py-Fix-issue-13032-where-it-fails-with-UnicodeDeco.patch \
19file://sysroot-include-headers.patch \
20file://unixccompiler.patch \
21${DISTRO_SRC_URI} \
22file://sysconfig.py-add-_PYTHON_PROJECT_SRC.patch \
23file://setup.py-check-cross_compiling-when-get-FLAGS.patch \
24file://0001-Do-not-use-the-shell-version-of-python-config-that-w.patch \
25file://support_SOURCE_DATE_EPOCH_in_py_compile.patch \
26file://regen-all.patch \
27"
28
29SRC_URI[md5sum] = "f5a99f765e765336a3ebbb2a24ca2be3"
30SRC_URI[sha256sum] = "f55cde04f521f273c7cba08912921cc5642cfc15ca7b22d5829f0aff4371155f"
31
32LIC_FILES_CHKSUM = "file://LICENSE;md5=b6ec515b22618f55fa07276b897bacea"
33
34# exclude pre-releases for both python 2.x and 3.x
35UPSTREAM_CHECK_REGEX = "[Pp]ython-(?P<pver>\d+(\.\d+)+).tar"
36
37S = "${WORKDIR}/Python-${PV}"
38
39EXTRANATIVEPATH += "bzip2-native"
40DEPENDS = "openssl-native bzip2-replacement-native zlib-native readline-native sqlite3-native gdbm-native"
41
42inherit native
43
44EXTRA_OECONF_append = " --bindir=${bindir}/${PN} --without-ensurepip"
45
46EXTRA_OEMAKE = '\
47 LIBC="" \
48 STAGING_LIBDIR=${STAGING_LIBDIR_NATIVE} \
49 STAGING_INCDIR=${STAGING_INCDIR_NATIVE} \
50 LIB=${baselib} \
51 ARCH=${TARGET_ARCH} \
52'
53
54# No ctypes option for python 3
55PYTHONLSBOPTS = ""
56
57do_configure_append() {
58 autoreconf --verbose --install --force --exclude=autopoint ../Python-${PV}/Modules/_ctypes/libffi
59 sed -i -e 's,#define HAVE_GETRANDOM 1,/\* #undef HAVE_GETRANDOM \*/,' ${B}/pyconfig.h
60}
61
62# Regenerate all of the generated files
63# This ensures that pgen and friends get created during the compile phase
64#
65do_compile_prepend() {
66 # Assuming https://bugs.python.org/issue33080 has been addressed in Makefile.
67 oe_runmake regen-all
68}
69
70do_install() {
71 install -d ${D}${libdir}/pkgconfig
72 oe_runmake 'DESTDIR=${D}' install
73 if [ -e ${WORKDIR}/sitecustomize.py ]; then
74 install -m 0644 ${WORKDIR}/sitecustomize.py ${D}/${libdir}/python${PYTHON_MAJMIN}
75 fi
76 install -d ${D}${bindir}/${PN}
77 install -m 0755 Parser/pgen ${D}${bindir}/${PN}
78
79 # Make sure we use /usr/bin/env python
80 for PYTHSCRIPT in `grep -rIl ${bindir}/${PN}/python ${D}${bindir}/${PN}`; do
81 sed -i -e '1s|^#!.*|#!/usr/bin/env python3|' $PYTHSCRIPT
82 done
83
84 # Add a symlink to the native Python so that scripts can just invoke
85 # "nativepython" and get the right one without needing absolute paths
86 # (these often end up too long for the #! parser in the kernel as the
87 # buffer is 128 bytes long).
88 ln -s python3-native/python3 ${D}${bindir}/nativepython3
89}
90
91python(){
92
93 # Read JSON manifest
94 import json
95 pythondir = d.getVar('THISDIR',True)
96 with open(pythondir+'/python3/python3-manifest.json') as manifest_file:
97 python_manifest=json.load(manifest_file)
98
99 rprovides = d.getVar('RPROVIDES').split()
100
101 # Hardcoded since it cant be python3-native-foo, should be python3-foo-native
102 pn = 'python3'
103
104 for key in python_manifest:
105 pypackage = pn + '-' + key + '-native'
106 if pypackage not in rprovides:
107 rprovides.append(pypackage)
108
109 d.setVar('RPROVIDES', ' '.join(rprovides))
110}