summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/python/python-native_2.7.15.bb
diff options
context:
space:
mode:
authorAlexander Kanavin <alex.kanavin@gmail.com>2019-04-15 12:54:54 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-04-16 11:10:02 +0100
commit0ee1b6d0c934944c0b6dba69e4c16d8e848b85bd (patch)
tree6d952de325df29a087789c74fc8bb4abadc69249 /meta/recipes-devtools/python/python-native_2.7.15.bb
parent24597588d29388ab4fc9485fcf27f8b580a4f5e8 (diff)
downloadpoky-0ee1b6d0c934944c0b6dba69e4c16d8e848b85bd.tar.gz
python: update to 2.7.16
Drop backported patches License-update: copyright years (From OE-Core rev: 061dfcdf062d64e4e1e50e28edfacb14e41b7d74) Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/python/python-native_2.7.15.bb')
-rw-r--r--meta/recipes-devtools/python/python-native_2.7.15.bb91
1 files changed, 0 insertions, 91 deletions
diff --git a/meta/recipes-devtools/python/python-native_2.7.15.bb b/meta/recipes-devtools/python/python-native_2.7.15.bb
deleted file mode 100644
index 26d67df6b8..0000000000
--- a/meta/recipes-devtools/python/python-native_2.7.15.bb
+++ /dev/null
@@ -1,91 +0,0 @@
1require python.inc
2EXTRANATIVEPATH += "bzip2-native"
3DEPENDS = "openssl-native bzip2-replacement-native zlib-native readline-native sqlite3-native expat-native gdbm-native db-native"
4PR = "${INC_PR}.1"
5
6SRC_URI += "\
7 file://05-enable-ctypes-cross-build.patch \
8 file://10-distutils-fix-swig-parameter.patch \
9 file://11-distutils-never-modify-shebang-line.patch \
10 file://0001-distutils-set-the-prefix-to-be-inside-staging-direct.patch \
11 file://debug.patch \
12 file://unixccompiler.patch \
13 file://nohostlibs.patch \
14 file://multilib.patch \
15 file://add-md5module-support.patch \
16 file://builddir.patch \
17 file://parallel-makeinst-create-bindir.patch \
18 file://revert_use_of_sysconfigdata.patch \
19 file://0001-python-native-fix-one-do_populate_sysroot-warning.patch \
20 file://0001-2.7-bpo-34623-Use-XML_SetHashSalt-in-_elementtree-GH.patch \
21 "
22
23S = "${WORKDIR}/Python-${PV}"
24
25FILESEXTRAPATHS =. "${FILE_DIRNAME}/${PN}:"
26
27inherit native
28
29EXTRA_OECONF_append = " --bindir=${bindir}/${PN} --with-system-expat=${STAGING_DIR_HOST}"
30
31EXTRA_OEMAKE = '\
32 LIBC="" \
33 STAGING_LIBDIR=${STAGING_LIBDIR_NATIVE} \
34 STAGING_INCDIR=${STAGING_INCDIR_NATIVE} \
35'
36
37do_configure_append() {
38 autoreconf --verbose --install --force --exclude=autopoint ../Python-${PV}/Modules/_ctypes/libffi
39}
40
41# Regenerate all of the generated files
42# This ensures that pgen and friends get created during the compile phase
43do_compile_prepend() {
44 oe_runmake regen-all
45}
46
47do_install() {
48 oe_runmake 'DESTDIR=${D}' install
49 install -d ${D}${bindir}/${PN}
50 install -m 0755 Parser/pgen ${D}${bindir}/${PN}
51
52 # Make sure we use /usr/bin/env python
53 for PYTHSCRIPT in `grep -rIl ${bindir}/${PN}/python ${D}${bindir}/${PN}`; do
54 sed -i -e '1s|^#!.*|#!/usr/bin/env python|' $PYTHSCRIPT
55 done
56
57 # Add a symlink to the native Python so that scripts can just invoke
58 # "nativepython" and get the right one without needing absolute paths
59 # (these often end up too long for the #! parser in the kernel as the
60 # buffer is 128 bytes long).
61 ln -s python-native/python ${D}${bindir}/nativepython
62
63 # We don't want modules in ~/.local being used in preference to those
64 # installed in the native sysroot, so disable user site support.
65 sed -i -e 's,^\(ENABLE_USER_SITE = \).*,\1False,' ${D}${libdir}/python${PYTHON_MAJMIN}/site.py
66}
67
68python(){
69
70 # Read JSON manifest
71 import json
72 pythondir = d.getVar('THISDIR')
73 with open(pythondir+'/python/python2-manifest.json') as manifest_file:
74 manifest_str = manifest_file.read()
75 json_start = manifest_str.find('# EOC') + 6
76 manifest_file.seek(json_start)
77 manifest_str = manifest_file.read()
78 python_manifest = json.loads(manifest_str)
79
80 rprovides = d.getVar('RPROVIDES').split()
81
82 # Hardcoded since it cant be python-native-foo, should be python-foo-native
83 pn = 'python'
84
85 for key in python_manifest:
86 pypackage = pn + '-' + key + '-native'
87 if pypackage not in rprovides:
88 rprovides.append(pypackage)
89
90 d.setVar('RPROVIDES', ' '.join(rprovides))
91}