summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/python/python3-native_3.5.3.bb
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/python/python3-native_3.5.3.bb')
-rw-r--r--meta/recipes-devtools/python/python3-native_3.5.3.bb104
1 files changed, 0 insertions, 104 deletions
diff --git a/meta/recipes-devtools/python/python3-native_3.5.3.bb b/meta/recipes-devtools/python/python3-native_3.5.3.bb
deleted file mode 100644
index 12f9f2404f..0000000000
--- a/meta/recipes-devtools/python/python3-native_3.5.3.bb
+++ /dev/null
@@ -1,104 +0,0 @@
1require recipes-devtools/python/python.inc
2
3PR = "${INC_PR}.0"
4PYTHON_MAJMIN = "3.5"
5DISTRO_SRC_URI ?= "file://sitecustomize.py"
6DISTRO_SRC_URI_linuxstdbase = ""
7SRC_URI = "http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.xz \
8file://12-distutils-prefix-is-inside-staging-area.patch \
9file://python-config.patch \
10file://0001-cross-compile-support.patch \
11file://030-fixup-include-dirs.patch \
12file://070-dont-clean-ipkg-install.patch \
13file://080-distutils-dont_adjust_files.patch \
14file://130-readline-setup.patch \
15file://150-fix-setupterm.patch \
16file://python-3.3-multilib.patch \
17file://03-fix-tkinter-detection.patch \
18file://avoid_warning_about_tkinter.patch \
19file://shutil-follow-symlink-fix.patch \
20file://0001-h2py-Fix-issue-13032-where-it-fails-with-UnicodeDeco.patch \
21file://sysroot-include-headers.patch \
22file://unixccompiler.patch \
23${DISTRO_SRC_URI} \
24file://sysconfig.py-add-_PYTHON_PROJECT_SRC.patch \
25file://setup.py-check-cross_compiling-when-get-FLAGS.patch \
26file://0001-Do-not-use-the-shell-version-of-python-config-that-w.patch \
27file://support_SOURCE_DATE_EPOCH_in_py_compile.patch \
28"
29
30SRC_URI[md5sum] = "57d1f8bfbabf4f2500273fb0706e6f21"
31SRC_URI[sha256sum] = "eefe2ad6575855423ab630f5b51a8ef6e5556f774584c06beab4926f930ddbb0"
32
33LIC_FILES_CHKSUM = "file://LICENSE;md5=b680ed99aa60d350c65a65914494207e"
34
35# exclude pre-releases for both python 2.x and 3.x
36UPSTREAM_CHECK_REGEX = "[Pp]ython-(?P<pver>\d+(\.\d+)+).tar"
37
38S = "${WORKDIR}/Python-${PV}"
39
40EXTRANATIVEPATH += "bzip2-native"
41DEPENDS = "openssl-native bzip2-replacement-native zlib-native readline-native sqlite3-native gdbm-native"
42
43inherit native
44
45# uninative may be used on pre glibc 2.25 systems which don't have getentropy
46EXTRA_OECONF_append = " --bindir=${bindir}/${PN} --without-ensurepip ac_cv_func_getentropy=no"
47
48EXTRA_OEMAKE = '\
49 LIBC="" \
50 STAGING_LIBDIR=${STAGING_LIBDIR_NATIVE} \
51 STAGING_INCDIR=${STAGING_INCDIR_NATIVE} \
52 LIB=${baselib} \
53 ARCH=${TARGET_ARCH} \
54'
55
56# No ctypes option for python 3
57PYTHONLSBOPTS = ""
58
59do_configure_append() {
60 autoreconf --verbose --install --force --exclude=autopoint ../Python-${PV}/Modules/_ctypes/libffi
61 sed -i -e 's,#define HAVE_GETRANDOM 1,/\* #undef HAVE_GETRANDOM \*/,' ${B}/pyconfig.h
62}
63
64do_install() {
65 install -d ${D}${libdir}/pkgconfig
66 oe_runmake 'DESTDIR=${D}' install
67 if [ -e ${WORKDIR}/sitecustomize.py ]; then
68 install -m 0644 ${WORKDIR}/sitecustomize.py ${D}/${libdir}/python${PYTHON_MAJMIN}
69 fi
70 install -d ${D}${bindir}/${PN}
71 install -m 0755 Parser/pgen ${D}${bindir}/${PN}
72
73 # Make sure we use /usr/bin/env python
74 for PYTHSCRIPT in `grep -rIl ${bindir}/${PN}/python ${D}${bindir}/${PN}`; do
75 sed -i -e '1s|^#!.*|#!/usr/bin/env python3|' $PYTHSCRIPT
76 done
77
78 # Add a symlink to the native Python so that scripts can just invoke
79 # "nativepython" and get the right one without needing absolute paths
80 # (these often end up too long for the #! parser in the kernel as the
81 # buffer is 128 bytes long).
82 ln -s python3-native/python3 ${D}${bindir}/nativepython3
83}
84
85python(){
86
87 # Read JSON manifest
88 import json
89 pythondir = d.getVar('THISDIR',True)
90 with open(pythondir+'/python3/python3-manifest.json') as manifest_file:
91 python_manifest=json.load(manifest_file)
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}