diff options
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.bb | 79 |
1 files changed, 79 insertions, 0 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 new file mode 100644 index 0000000000..250697fbbc --- /dev/null +++ b/meta/recipes-devtools/python/python3-native_3.5.3.bb | |||
@@ -0,0 +1,79 @@ | |||
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://0001-cross-compile-support.patch \ | ||
11 | file://030-fixup-include-dirs.patch \ | ||
12 | file://070-dont-clean-ipkg-install.patch \ | ||
13 | file://080-distutils-dont_adjust_files.patch \ | ||
14 | file://130-readline-setup.patch \ | ||
15 | file://150-fix-setupterm.patch \ | ||
16 | file://python-3.3-multilib.patch \ | ||
17 | file://03-fix-tkinter-detection.patch \ | ||
18 | file://avoid_warning_about_tkinter.patch \ | ||
19 | file://shutil-follow-symlink-fix.patch \ | ||
20 | file://0001-h2py-Fix-issue-13032-where-it-fails-with-UnicodeDeco.patch \ | ||
21 | file://sysroot-include-headers.patch \ | ||
22 | file://unixccompiler.patch \ | ||
23 | ${DISTRO_SRC_URI} \ | ||
24 | file://sysconfig.py-add-_PYTHON_PROJECT_SRC.patch \ | ||
25 | file://setup.py-check-cross_compiling-when-get-FLAGS.patch \ | ||
26 | file://0001-Do-not-use-the-shell-version-of-python-config-that-w.patch \ | ||
27 | " | ||
28 | |||
29 | SRC_URI[md5sum] = "57d1f8bfbabf4f2500273fb0706e6f21" | ||
30 | SRC_URI[sha256sum] = "eefe2ad6575855423ab630f5b51a8ef6e5556f774584c06beab4926f930ddbb0" | ||
31 | |||
32 | LIC_FILES_CHKSUM = "file://LICENSE;md5=b680ed99aa60d350c65a65914494207e" | ||
33 | |||
34 | # exclude pre-releases for both python 2.x and 3.x | ||
35 | UPSTREAM_CHECK_REGEX = "[Pp]ython-(?P<pver>\d+(\.\d+)+).tar" | ||
36 | |||
37 | S = "${WORKDIR}/Python-${PV}" | ||
38 | |||
39 | EXTRANATIVEPATH += "bzip2-native" | ||
40 | DEPENDS = "openssl-native bzip2-replacement-native zlib-native readline-native sqlite3-native" | ||
41 | |||
42 | inherit native | ||
43 | |||
44 | require python-native-${PYTHON_MAJMIN}-manifest.inc | ||
45 | |||
46 | EXTRA_OECONF_append = " --bindir=${bindir}/${PN} --without-ensurepip" | ||
47 | |||
48 | EXTRA_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 | ||
57 | PYTHONLSBOPTS = "" | ||
58 | |||
59 | do_configure_append() { | ||
60 | autoreconf --verbose --install --force --exclude=autopoint ../Python-${PV}/Modules/_ctypes/libffi | ||
61 | } | ||
62 | |||
63 | do_install() { | ||
64 | install -d ${D}${libdir}/pkgconfig | ||
65 | oe_runmake 'DESTDIR=${D}' install | ||
66 | if [ -e ${WORKDIR}/sitecustomize.py ]; then | ||
67 | install -m 0644 ${WORKDIR}/sitecustomize.py ${D}/${libdir}/python${PYTHON_MAJMIN} | ||
68 | fi | ||
69 | install -d ${D}${bindir}/${PN} | ||
70 | install -m 0755 Parser/pgen ${D}${bindir}/${PN} | ||
71 | |||
72 | # Make sure we use /usr/bin/env python | ||
73 | for PYTHSCRIPT in `grep -rIl ${bindir}/${PN}/python ${D}${bindir}/${PN}`; do | ||
74 | sed -i -e '1s|^#!.*|#!/usr/bin/env python3|' $PYTHSCRIPT | ||
75 | done | ||
76 | |||
77 | # Tests are large and we don't need them in the native sysroot | ||
78 | rm ${D}${libdir}/python${PYTHON_MAJMIN}/test -rf | ||
79 | } | ||