diff options
Diffstat (limited to 'meta/recipes-devtools/python/python3-native_3.5.2.bb')
-rw-r--r-- | meta/recipes-devtools/python/python3-native_3.5.2.bb | 77 |
1 files changed, 77 insertions, 0 deletions
diff --git a/meta/recipes-devtools/python/python3-native_3.5.2.bb b/meta/recipes-devtools/python/python3-native_3.5.2.bb new file mode 100644 index 0000000000..061b5951d1 --- /dev/null +++ b/meta/recipes-devtools/python/python3-native_3.5.2.bb | |||
@@ -0,0 +1,77 @@ | |||
1 | require recipes-devtools/python/python.inc | ||
2 | |||
3 | PR = "${INC_PR}.0" | ||
4 | PYTHON_MAJMIN = "3.5" | ||
5 | DISTRO_SRC_URI ?= "file://sitecustomize.py" | ||
6 | DISTRO_SRC_URI_linuxstdbase = "" | ||
7 | SRC_URI = "http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.xz \ | ||
8 | file://12-distutils-prefix-is-inside-staging-area.patch \ | ||
9 | file://python-config.patch \ | ||
10 | file://000-cross-compile.patch \ | ||
11 | file://020-dont-compile-python-files.patch \ | ||
12 | file://030-fixup-include-dirs.patch \ | ||
13 | file://070-dont-clean-ipkg-install.patch \ | ||
14 | file://080-distutils-dont_adjust_files.patch \ | ||
15 | file://130-readline-setup.patch \ | ||
16 | file://150-fix-setupterm.patch \ | ||
17 | file://python-3.3-multilib.patch \ | ||
18 | file://03-fix-tkinter-detection.patch \ | ||
19 | file://avoid_warning_about_tkinter.patch \ | ||
20 | file://shutil-follow-symlink-fix.patch \ | ||
21 | file://0001-h2py-Fix-issue-13032-where-it-fails-with-UnicodeDeco.patch \ | ||
22 | file://sysroot-include-headers.patch \ | ||
23 | file://unixccompiler.patch \ | ||
24 | ${DISTRO_SRC_URI} \ | ||
25 | file://sysconfig.py-add-_PYTHON_PROJECT_SRC.patch \ | ||
26 | file://setup.py-check-cross_compiling-when-get-FLAGS.patch \ | ||
27 | file://0001-Do-not-use-the-shell-version-of-python-config-that-w.patch \ | ||
28 | " | ||
29 | |||
30 | SRC_URI[md5sum] = "8906efbacfcdc7c3c9198aeefafd159e" | ||
31 | SRC_URI[sha256sum] = "0010f56100b9b74259ebcd5d4b295a32324b58b517403a10d1a2aa7cb22bca40" | ||
32 | |||
33 | LIC_FILES_CHKSUM = "file://LICENSE;md5=6b60258130e4ed10d3101517eb5b9385" | ||
34 | |||
35 | # exclude pre-releases for both python 2.x and 3.x | ||
36 | UPSTREAM_CHECK_REGEX = "[Pp]ython-(?P<pver>\d+(\.\d+)+).tar" | ||
37 | |||
38 | S = "${WORKDIR}/Python-${PV}" | ||
39 | |||
40 | EXTRANATIVEPATH += "bzip2-native" | ||
41 | DEPENDS = "openssl-native bzip2-replacement-native zlib-native readline-native sqlite3-native" | ||
42 | |||
43 | inherit native | ||
44 | |||
45 | RPROVIDES += "python3-distutils-native python3-compression-native python3-textutils-native python3-core-native python3-importlib-native python3-io-native" | ||
46 | |||
47 | EXTRA_OECONF_append = " --bindir=${bindir}/${PN} --without-ensurepip" | ||
48 | |||
49 | EXTRA_OEMAKE = '\ | ||
50 | LIBC="" \ | ||
51 | STAGING_LIBDIR=${STAGING_LIBDIR_NATIVE} \ | ||
52 | STAGING_INCDIR=${STAGING_INCDIR_NATIVE} \ | ||
53 | LIB=${baselib} \ | ||
54 | ARCH=${TARGET_ARCH} \ | ||
55 | ' | ||
56 | |||
57 | # No ctypes option for python 3 | ||
58 | PYTHONLSBOPTS = "" | ||
59 | |||
60 | do_configure_append() { | ||
61 | autoreconf --verbose --install --force --exclude=autopoint ../Python-${PV}/Modules/_ctypes/libffi | ||
62 | } | ||
63 | |||
64 | do_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 | } | ||