summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/python/python3-native_3.5.0.bb
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/python/python3-native_3.5.0.bb')
-rw-r--r--meta/recipes-devtools/python/python3-native_3.5.0.bb75
1 files changed, 75 insertions, 0 deletions
diff --git a/meta/recipes-devtools/python/python3-native_3.5.0.bb b/meta/recipes-devtools/python/python3-native_3.5.0.bb
new file mode 100644
index 0000000000..198f93d1bf
--- /dev/null
+++ b/meta/recipes-devtools/python/python3-native_3.5.0.bb
@@ -0,0 +1,75 @@
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://000-cross-compile.patch \
11file://020-dont-compile-python-files.patch \
12file://030-fixup-include-dirs.patch \
13file://070-dont-clean-ipkg-install.patch \
14file://080-distutils-dont_adjust_files.patch \
15file://110-enable-zlib.patch \
16file://130-readline-setup.patch \
17file://150-fix-setupterm.patch \
18file://python-3.3-multilib.patch \
19file://03-fix-tkinter-detection.patch \
20file://avoid_warning_about_tkinter.patch \
21file://shutil-follow-symlink-fix.patch \
22file://0001-h2py-Fix-issue-13032-where-it-fails-with-UnicodeDeco.patch \
23file://sysroot-include-headers.patch \
24file://unixccompiler.patch \
25${DISTRO_SRC_URI} \
26file://sysconfig.py-add-_PYTHON_PROJECT_SRC.patch \
27file://setup.py-check-cross_compiling-when-get-FLAGS.patch \
28"
29SRC_URI[md5sum] = "d149d2812f10cbe04c042232e7964171"
30SRC_URI[sha256sum] = "d6d7aa1634a5eeeca6ed4fca266982a04f84bd8f3945a9179e20b24ad2e2be91"
31
32LIC_FILES_CHKSUM = "file://LICENSE;md5=dd98d01d471fac8d8dbdd975229dba03"
33
34S = "${WORKDIR}/Python-${PV}"
35
36EXTRANATIVEPATH += "bzip2-native"
37DEPENDS = "openssl-native bzip2-replacement-native zlib-native readline-native sqlite3-native"
38
39inherit native
40
41RPROVIDES += "python3-distutils-native python3-compression-native python3-textutils-native python3-core-native"
42
43EXTRA_OECONF_append = " --bindir=${bindir}/${PN} --without-ensurepip"
44
45EXTRA_OEMAKE = '\
46 BUILD_SYS="" \
47 HOST_SYS="" \
48 LIBC="" \
49 STAGING_LIBDIR=${STAGING_LIBDIR_NATIVE} \
50 STAGING_INCDIR=${STAGING_INCDIR_NATIVE} \
51 LIB=${baselib} \
52 ARCH=${TARGET_ARCH} \
53'
54
55# No ctypes option for python 3
56PYTHONLSBOPTS = ""
57
58do_configure_append() {
59 autoreconf --verbose --install --force --exclude=autopoint ../Python-${PV}/Modules/_ctypes/libffi
60}
61
62do_install() {
63 install -d ${D}${libdir}/pkgconfig
64 oe_runmake 'DESTDIR=${D}' install
65 if [ -e ${WORKDIR}/sitecustomize.py ]; then
66 install -m 0644 ${WORKDIR}/sitecustomize.py ${D}/${libdir}/python${PYTHON_MAJMIN}
67 fi
68 install -d ${D}${bindir}/${PN}
69 install -m 0755 Parser/pgen ${D}${bindir}/${PN}
70
71 # Make sure we use /usr/bin/env python
72 for PYTHSCRIPT in `grep -rIl ${bindir}/${PN}/python ${D}${bindir}/${PN}`; do
73 sed -i -e '1s|^#!.*|#!/usr/bin/env python3|' $PYTHSCRIPT
74 done
75}