summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/python/python-native_2.7.13.bb
diff options
context:
space:
mode:
authorDerek Straka <derek@asterius.io>2018-01-26 14:25:31 -0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-01-29 08:49:50 +0000
commit7ef064e80ccd6f7cf8df58e836d244e910c99270 (patch)
tree29fa1614c7e792ee7e3a06ca37f0bcef88fec9d5 /meta/recipes-devtools/python/python-native_2.7.13.bb
parentcb61f997c06213c8fc69491b2e456a6d0b61ce26 (diff)
downloadpoky-7ef064e80ccd6f7cf8df58e836d244e910c99270.tar.gz
python: Upgrade both python and python-native to 2.7.14
Rebased: - python/01-use-proper-tools-for-cross-build.patch - python/fix-makefile-for-ptest.patch - python/parallel-makeinst-create-bindir.patch Removed Upstreamed Patch: - python/Don-t-use-getentropy-on-Linux.patch Updated license checksum for changes in the copyright date. The license terms remain unchanged Added an extra do_compile item to create the native pgen that no longer gets compiled by default (From OE-Core rev: 9f2de4f9cf1eb6de75dc789bd0549f45c7a68c55) Signed-off-by: Derek Straka <derek@asterius.io> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/python/python-native_2.7.13.bb')
-rw-r--r--meta/recipes-devtools/python/python-native_2.7.13.bb79
1 files changed, 0 insertions, 79 deletions
diff --git a/meta/recipes-devtools/python/python-native_2.7.13.bb b/meta/recipes-devtools/python/python-native_2.7.13.bb
deleted file mode 100644
index 2b74003c79..0000000000
--- a/meta/recipes-devtools/python/python-native_2.7.13.bb
+++ /dev/null
@@ -1,79 +0,0 @@
1require python.inc
2EXTRANATIVEPATH += "bzip2-native"
3DEPENDS = "openssl-native bzip2-replacement-native zlib-native readline-native sqlite3-native expat-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 "
20
21S = "${WORKDIR}/Python-${PV}"
22
23FILESEXTRAPATHS =. "${FILE_DIRNAME}/${PN}:"
24
25inherit native
26
27EXTRA_OECONF_append = " --bindir=${bindir}/${PN} --with-system-expat=${STAGING_DIR_HOST}"
28
29EXTRA_OEMAKE = '\
30 LIBC="" \
31 STAGING_LIBDIR=${STAGING_LIBDIR_NATIVE} \
32 STAGING_INCDIR=${STAGING_INCDIR_NATIVE} \
33'
34
35do_configure_append() {
36 autoreconf --verbose --install --force --exclude=autopoint ../Python-${PV}/Modules/_ctypes/libffi
37}
38
39do_install() {
40 oe_runmake 'DESTDIR=${D}' install
41 install -d ${D}${bindir}/${PN}
42 install -m 0755 Parser/pgen ${D}${bindir}/${PN}
43
44 # Make sure we use /usr/bin/env python
45 for PYTHSCRIPT in `grep -rIl ${bindir}/${PN}/python ${D}${bindir}/${PN}`; do
46 sed -i -e '1s|^#!.*|#!/usr/bin/env python|' $PYTHSCRIPT
47 done
48
49 # Add a symlink to the native Python so that scripts can just invoke
50 # "nativepython" and get the right one without needing absolute paths
51 # (these often end up too long for the #! parser in the kernel as the
52 # buffer is 128 bytes long).
53 ln -s python-native/python ${D}${bindir}/nativepython
54
55 # We don't want modules in ~/.local being used in preference to those
56 # installed in the native sysroot, so disable user site support.
57 sed -i -e 's,^\(ENABLE_USER_SITE = \).*,\1False,' ${D}${libdir}/python${PYTHON_MAJMIN}/site.py
58}
59
60python(){
61
62 # Read JSON manifest
63 import json
64 pythondir = d.getVar('THISDIR',True)
65 with open(pythondir+'/python/python2-manifest.json') as manifest_file:
66 python_manifest=json.load(manifest_file)
67
68 rprovides = d.getVar('RPROVIDES').split()
69
70 # Hardcoded since it cant be python-native-foo, should be python-foo-native
71 pn = 'python'
72
73 for key in python_manifest:
74 pypackage = pn + '-' + key + '-native'
75 if pypackage not in rprovides:
76 rprovides.append(pypackage)
77
78 d.setVar('RPROVIDES', ' '.join(rprovides))
79}