diff options
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.bb | 104 |
1 files changed, 0 insertions, 104 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 deleted file mode 100644 index c41ee8bbd9..0000000000 --- a/meta/recipes-devtools/python/python3-native_3.5.6.bb +++ /dev/null | |||
| @@ -1,104 +0,0 @@ | |||
| 1 | require recipes-devtools/python/python3.inc | ||
| 2 | |||
| 3 | DISTRO_SRC_URI ?= "file://sitecustomize.py" | ||
| 4 | DISTRO_SRC_URI_linuxstdbase = "" | ||
| 5 | SRC_URI = "http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.xz \ | ||
| 6 | file://12-distutils-prefix-is-inside-staging-area.patch \ | ||
| 7 | file://python-config.patch \ | ||
| 8 | file://030-fixup-include-dirs.patch \ | ||
| 9 | file://080-distutils-dont_adjust_files.patch \ | ||
| 10 | file://130-readline-setup.patch \ | ||
| 11 | file://150-fix-setupterm.patch \ | ||
| 12 | file://python-3.3-multilib.patch \ | ||
| 13 | file://03-fix-tkinter-detection.patch \ | ||
| 14 | ${@bb.utils.contains('PACKAGECONFIG', 'tk', '', 'file://avoid_warning_about_tkinter.patch', d)} \ | ||
| 15 | file://0001-h2py-Fix-issue-13032-where-it-fails-with-UnicodeDeco.patch \ | ||
| 16 | file://sysroot-include-headers.patch \ | ||
| 17 | file://unixccompiler.patch \ | ||
| 18 | ${DISTRO_SRC_URI} \ | ||
| 19 | file://sysconfig.py-add-_PYTHON_PROJECT_SRC.patch \ | ||
| 20 | file://setup.py-check-cross_compiling-when-get-FLAGS.patch \ | ||
| 21 | file://0001-Do-not-use-the-shell-version-of-python-config-that-w.patch \ | ||
| 22 | file://support_SOURCE_DATE_EPOCH_in_py_compile.patch \ | ||
| 23 | file://regen-all.patch \ | ||
| 24 | file://0001-Issue-28043-SSLContext-has-improved-default-settings.patch \ | ||
| 25 | file://0002-bpo-29136-Add-TLS-1.3-cipher-suites-and-OP_NO_TLSv1_.patch \ | ||
| 26 | file://0003-bpo-32947-Fixes-for-TLS-1.3-and-OpenSSL-1.1.1-GH-876.patch \ | ||
| 27 | file://0004-bpo-33570-TLS-1.3-ciphers-for-OpenSSL-1.1.1-GH-6976.patch \ | ||
| 28 | file://0005-bpo-30714-ALPN-changes-for-OpenSSL-1.1.0f-2305.patch \ | ||
| 29 | " | ||
| 30 | PACKAGECONFIG[tk] = ",,tk-native" | ||
| 31 | |||
| 32 | EXTRANATIVEPATH += "bzip2-native" | ||
| 33 | DEPENDS = "openssl-native bzip2-replacement-native zlib-native readline-native sqlite3-native gdbm-native" | ||
| 34 | |||
| 35 | inherit native | ||
| 36 | |||
| 37 | EXTRA_OECONF_append = " --bindir=${bindir}/${PN} --without-ensurepip" | ||
| 38 | |||
| 39 | EXTRA_OEMAKE = '\ | ||
| 40 | LIBC="" \ | ||
| 41 | STAGING_LIBDIR=${STAGING_LIBDIR_NATIVE} \ | ||
| 42 | STAGING_INCDIR=${STAGING_INCDIR_NATIVE} \ | ||
| 43 | LIB=${baselib} \ | ||
| 44 | ARCH=${TARGET_ARCH} \ | ||
| 45 | ' | ||
| 46 | |||
| 47 | do_configure_append() { | ||
| 48 | autoreconf --verbose --install --force --exclude=autopoint ../Python-${PV}/Modules/_ctypes/libffi | ||
| 49 | sed -i -e 's,#define HAVE_GETRANDOM 1,/\* #undef HAVE_GETRANDOM \*/,' ${B}/pyconfig.h | ||
| 50 | } | ||
| 51 | |||
| 52 | # Regenerate all of the generated files | ||
| 53 | # This ensures that pgen and friends get created during the compile phase | ||
| 54 | # | ||
| 55 | do_compile_prepend() { | ||
| 56 | # Assuming https://bugs.python.org/issue33080 has been addressed in Makefile. | ||
| 57 | oe_runmake regen-all | ||
| 58 | } | ||
| 59 | |||
| 60 | do_install() { | ||
| 61 | install -d ${D}${libdir}/pkgconfig | ||
| 62 | oe_runmake 'DESTDIR=${D}' install | ||
| 63 | if [ -e ${WORKDIR}/sitecustomize.py ]; then | ||
| 64 | install -m 0644 ${WORKDIR}/sitecustomize.py ${D}/${libdir}/python${PYTHON_MAJMIN} | ||
| 65 | fi | ||
| 66 | install -d ${D}${bindir}/${PN} | ||
| 67 | install -m 0755 Parser/pgen ${D}${bindir}/${PN} | ||
| 68 | |||
| 69 | # Make sure we use /usr/bin/env python | ||
| 70 | for PYTHSCRIPT in `grep -rIl ${bindir}/${PN}/python ${D}${bindir}/${PN}`; do | ||
| 71 | sed -i -e '1s|^#!.*|#!/usr/bin/env python3|' $PYTHSCRIPT | ||
| 72 | done | ||
| 73 | |||
| 74 | # Add a symlink to the native Python so that scripts can just invoke | ||
| 75 | # "nativepython" and get the right one without needing absolute paths | ||
| 76 | # (these often end up too long for the #! parser in the kernel as the | ||
| 77 | # buffer is 128 bytes long). | ||
| 78 | ln -s python3-native/python3 ${D}${bindir}/nativepython3 | ||
| 79 | } | ||
| 80 | |||
| 81 | python(){ | ||
| 82 | |||
| 83 | # Read JSON manifest | ||
| 84 | import json | ||
| 85 | pythondir = d.getVar('THISDIR') | ||
| 86 | with open(pythondir+'/python3/python3-manifest.json') as manifest_file: | ||
| 87 | manifest_str = manifest_file.read() | ||
| 88 | json_start = manifest_str.find('# EOC') + 6 | ||
| 89 | manifest_file.seek(json_start) | ||
| 90 | manifest_str = manifest_file.read() | ||
| 91 | python_manifest = json.loads(manifest_str) | ||
| 92 | |||
| 93 | rprovides = d.getVar('RPROVIDES').split() | ||
| 94 | |||
| 95 | # Hardcoded since it cant be python3-native-foo, should be python3-foo-native | ||
| 96 | pn = 'python3' | ||
| 97 | |||
| 98 | for key in python_manifest: | ||
| 99 | pypackage = pn + '-' + key + '-native' | ||
| 100 | if pypackage not in rprovides: | ||
| 101 | rprovides.append(pypackage) | ||
| 102 | |||
| 103 | d.setVar('RPROVIDES', ' '.join(rprovides)) | ||
| 104 | } | ||
