diff options
Diffstat (limited to 'meta/recipes-devtools/python/python-native_2.7.14.bb')
| -rw-r--r-- | meta/recipes-devtools/python/python-native_2.7.14.bb | 86 |
1 files changed, 0 insertions, 86 deletions
diff --git a/meta/recipes-devtools/python/python-native_2.7.14.bb b/meta/recipes-devtools/python/python-native_2.7.14.bb deleted file mode 100644 index b822583c53..0000000000 --- a/meta/recipes-devtools/python/python-native_2.7.14.bb +++ /dev/null | |||
| @@ -1,86 +0,0 @@ | |||
| 1 | require python.inc | ||
| 2 | EXTRANATIVEPATH += "bzip2-native" | ||
| 3 | DEPENDS = "openssl-native bzip2-replacement-native zlib-native readline-native sqlite3-native expat-native gdbm-native db-native" | ||
| 4 | PR = "${INC_PR}.1" | ||
| 5 | |||
| 6 | SRC_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://fix-gc-alignment.patch \ | ||
| 20 | " | ||
| 21 | |||
| 22 | S = "${WORKDIR}/Python-${PV}" | ||
| 23 | |||
| 24 | FILESEXTRAPATHS =. "${FILE_DIRNAME}/${PN}:" | ||
| 25 | |||
| 26 | inherit native | ||
| 27 | |||
| 28 | EXTRA_OECONF_append = " --bindir=${bindir}/${PN} --with-system-expat=${STAGING_DIR_HOST}" | ||
| 29 | |||
| 30 | EXTRA_OEMAKE = '\ | ||
| 31 | LIBC="" \ | ||
| 32 | STAGING_LIBDIR=${STAGING_LIBDIR_NATIVE} \ | ||
| 33 | STAGING_INCDIR=${STAGING_INCDIR_NATIVE} \ | ||
| 34 | ' | ||
| 35 | |||
| 36 | do_configure_append() { | ||
| 37 | autoreconf --verbose --install --force --exclude=autopoint ../Python-${PV}/Modules/_ctypes/libffi | ||
| 38 | } | ||
| 39 | |||
| 40 | # Regenerate all of the generated files | ||
| 41 | # This ensures that pgen and friends get created during the compile phase | ||
| 42 | do_compile_prepend() { | ||
| 43 | oe_runmake regen-all | ||
| 44 | } | ||
| 45 | |||
| 46 | do_install() { | ||
| 47 | oe_runmake 'DESTDIR=${D}' install | ||
| 48 | install -d ${D}${bindir}/${PN} | ||
| 49 | install -m 0755 Parser/pgen ${D}${bindir}/${PN} | ||
| 50 | |||
| 51 | # Make sure we use /usr/bin/env python | ||
| 52 | for PYTHSCRIPT in `grep -rIl ${bindir}/${PN}/python ${D}${bindir}/${PN}`; do | ||
| 53 | sed -i -e '1s|^#!.*|#!/usr/bin/env python|' $PYTHSCRIPT | ||
| 54 | done | ||
| 55 | |||
| 56 | # Add a symlink to the native Python so that scripts can just invoke | ||
| 57 | # "nativepython" and get the right one without needing absolute paths | ||
| 58 | # (these often end up too long for the #! parser in the kernel as the | ||
| 59 | # buffer is 128 bytes long). | ||
| 60 | ln -s python-native/python ${D}${bindir}/nativepython | ||
| 61 | |||
| 62 | # We don't want modules in ~/.local being used in preference to those | ||
| 63 | # installed in the native sysroot, so disable user site support. | ||
| 64 | sed -i -e 's,^\(ENABLE_USER_SITE = \).*,\1False,' ${D}${libdir}/python${PYTHON_MAJMIN}/site.py | ||
| 65 | } | ||
| 66 | |||
| 67 | python(){ | ||
| 68 | |||
| 69 | # Read JSON manifest | ||
| 70 | import json | ||
| 71 | pythondir = d.getVar('THISDIR',True) | ||
| 72 | with open(pythondir+'/python/python2-manifest.json') as manifest_file: | ||
| 73 | python_manifest=json.load(manifest_file) | ||
| 74 | |||
| 75 | rprovides = d.getVar('RPROVIDES').split() | ||
| 76 | |||
| 77 | # Hardcoded since it cant be python-native-foo, should be python-foo-native | ||
| 78 | pn = 'python' | ||
| 79 | |||
| 80 | for key in python_manifest: | ||
| 81 | pypackage = pn + '-' + key + '-native' | ||
| 82 | if pypackage not in rprovides: | ||
| 83 | rprovides.append(pypackage) | ||
| 84 | |||
| 85 | d.setVar('RPROVIDES', ' '.join(rprovides)) | ||
| 86 | } | ||
