summaryrefslogtreecommitdiff
path: root/poky/meta/recipes-devtools/python/python-native_2.7.15.bb
diff options
context:
space:
mode:
authorBrad Bishop <bradleyb@fuzziesquirrel.com>2018-10-16 05:47:12 +0300
committerBrad Bishop <bradleyb@fuzziesquirrel.com>2018-11-19 04:46:35 +0300
commit6f8dcde58e2226d5a46f41ab53225134d0e60b4e (patch)
treedfbdf8de08982b93dfd42921b548cffc73b4a153 /poky/meta/recipes-devtools/python/python-native_2.7.15.bb
parent10719a5be4799cf3961bdb4754cb389e8e45ede5 (diff)
downloadopenbmc-6f8dcde58e2226d5a46f41ab53225134d0e60b4e.tar.xz
poky: sumo refresh d240b885f2..eebbc00b25
Update poky to sumo HEAD. Anuj Mittal (1): perl: skip tests that are not useful Armin Kuster (4): tzcode-native: updatet to 2018e tzdata: update to 2018e tzcode: update to 2018f tzdata: update to 2018f Bruce Ashfield (10): kernel-yocto/cfg: configuration warning fixes linux-yocto/4.14/4.18: address kernel configuration warnings linux-yocto: configuration warning fixes linux-yocto: tweak RTC configuration linux-yocto/4.14: fix kernel configuration audit warnings linux-yocto/4.14: update to v4.14.71 linux-yocto: enable pci and CRYPTO_DEV_VIRTIO linux-yocto/4.14: fix beaglebone configuration warnings linux-yocto-rt: fixup 4.14 merge issues linux-yocto/4.14: update to v4.14.76 Changqing Li (1): apt: update SRC_URI Chen Qi (2): python: backport patch to fix CVE-2018-1000802 python: backport patch to fix CVE-2018-14647 Dan McGregor (2): os-release: move to nonarch_libdir base-files: change permissions on /sys and /proc Derek Straka (1): python: update to version 2.7.15 Grygorii Tertychnyi (2): cve-check: Allow multiple entries in CVE_PRODUCT curl: extend CVE_PRODUCT Hongxu Jia (2): valgrind: fix compile ptest failure on mips32 nasm: fix CVE-2018-1000667 Hongzhi.Song (1): linux-yocto-rt: Add paravirt_kvm support for qemux86-64 Jagadeesh Krishnanjanappa (1): valgrind: fix ptest compilation for PowerPC64 Peter Kjellerstedt (1): curl: Include the complete license information Richard Purdie (2): yocto-uninative: Upgrade to verson 2.3 which includes glibc 2.28 oeqa/selftest/runtime_test: Ensure we build/use gnupg-native Ross Burton (2): python: clean up ptest python: don't use runtime checks to identify float endianism Zhixiong Chi (1): curl: CVE-2018-14618 Change-Id: I4b7aa481ed2a57c3551c4a45d30350f2376444cc Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
Diffstat (limited to 'poky/meta/recipes-devtools/python/python-native_2.7.15.bb')
-rw-r--r--poky/meta/recipes-devtools/python/python-native_2.7.15.bb85
1 files changed, 85 insertions, 0 deletions
diff --git a/poky/meta/recipes-devtools/python/python-native_2.7.15.bb b/poky/meta/recipes-devtools/python/python-native_2.7.15.bb
new file mode 100644
index 000000000..7c491fa3e
--- /dev/null
+++ b/poky/meta/recipes-devtools/python/python-native_2.7.15.bb
@@ -0,0 +1,85 @@
+require python.inc
+EXTRANATIVEPATH += "bzip2-native"
+DEPENDS = "openssl-native bzip2-replacement-native zlib-native readline-native sqlite3-native expat-native gdbm-native db-native"
+PR = "${INC_PR}.1"
+
+SRC_URI += "\
+ file://05-enable-ctypes-cross-build.patch \
+ file://10-distutils-fix-swig-parameter.patch \
+ file://11-distutils-never-modify-shebang-line.patch \
+ file://0001-distutils-set-the-prefix-to-be-inside-staging-direct.patch \
+ file://debug.patch \
+ file://unixccompiler.patch \
+ file://nohostlibs.patch \
+ file://multilib.patch \
+ file://add-md5module-support.patch \
+ file://builddir.patch \
+ file://parallel-makeinst-create-bindir.patch \
+ file://revert_use_of_sysconfigdata.patch \
+ "
+
+S = "${WORKDIR}/Python-${PV}"
+
+FILESEXTRAPATHS =. "${FILE_DIRNAME}/${PN}:"
+
+inherit native
+
+EXTRA_OECONF_append = " --bindir=${bindir}/${PN} --with-system-expat=${STAGING_DIR_HOST}"
+
+EXTRA_OEMAKE = '\
+ LIBC="" \
+ STAGING_LIBDIR=${STAGING_LIBDIR_NATIVE} \
+ STAGING_INCDIR=${STAGING_INCDIR_NATIVE} \
+'
+
+do_configure_append() {
+ autoreconf --verbose --install --force --exclude=autopoint ../Python-${PV}/Modules/_ctypes/libffi
+}
+
+# Regenerate all of the generated files
+# This ensures that pgen and friends get created during the compile phase
+do_compile_prepend() {
+ oe_runmake regen-all
+}
+
+do_install() {
+ oe_runmake 'DESTDIR=${D}' install
+ install -d ${D}${bindir}/${PN}
+ install -m 0755 Parser/pgen ${D}${bindir}/${PN}
+
+ # Make sure we use /usr/bin/env python
+ for PYTHSCRIPT in `grep -rIl ${bindir}/${PN}/python ${D}${bindir}/${PN}`; do
+ sed -i -e '1s|^#!.*|#!/usr/bin/env python|' $PYTHSCRIPT
+ done
+
+ # Add a symlink to the native Python so that scripts can just invoke
+ # "nativepython" and get the right one without needing absolute paths
+ # (these often end up too long for the #! parser in the kernel as the
+ # buffer is 128 bytes long).
+ ln -s python-native/python ${D}${bindir}/nativepython
+
+ # We don't want modules in ~/.local being used in preference to those
+ # installed in the native sysroot, so disable user site support.
+ sed -i -e 's,^\(ENABLE_USER_SITE = \).*,\1False,' ${D}${libdir}/python${PYTHON_MAJMIN}/site.py
+}
+
+python(){
+
+ # Read JSON manifest
+ import json
+ pythondir = d.getVar('THISDIR',True)
+ with open(pythondir+'/python/python2-manifest.json') as manifest_file:
+ python_manifest=json.load(manifest_file)
+
+ rprovides = d.getVar('RPROVIDES').split()
+
+ # Hardcoded since it cant be python-native-foo, should be python-foo-native
+ pn = 'python'
+
+ for key in python_manifest:
+ pypackage = pn + '-' + key + '-native'
+ if pypackage not in rprovides:
+ rprovides.append(pypackage)
+
+ d.setVar('RPROVIDES', ' '.join(rprovides))
+}