Patchwork [13/24] python3: Add native recipe

login
register
mail settings
Submitter Khem Raj
Date June 28, 2013, 10:03 p.m.
Message ID <21b6c5c412ad8df8c0194e8b2b6d96c0569982cc.1372456294.git.raj.khem@gmail.com>
Download mbox | patch
Permalink /patch/52663/
State New
Headers show

Comments

Khem Raj - June 28, 2013, 10:03 p.m.
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 .../python/python3-native_3.3.0.bb                 |   68 ++++++++++++++++++++
 1 file changed, 68 insertions(+)
 create mode 100644 meta/recipes-devtools/python/python3-native_3.3.0.bb

Patch

diff --git a/meta/recipes-devtools/python/python3-native_3.3.0.bb b/meta/recipes-devtools/python/python3-native_3.3.0.bb
new file mode 100644
index 0000000..3486ca0
--- /dev/null
+++ b/meta/recipes-devtools/python/python3-native_3.3.0.bb
@@ -0,0 +1,68 @@ 
+require recipes-devtools/python/python.inc
+
+PR = "${INC_PR}.0"
+PYTHON_MAJMIN = "3.3"
+DISTRO_SRC_URI ?= "file://sitecustomize.py"
+DISTRO_SRC_URI_linuxstdbase = ""
+SRC_URI = "http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.bz2 \
+file://000-cross-compile.patch \
+file://020-dont-compile-python-files.patch \
+file://030-fixup-include-dirs.patch \
+file://070-dont-clean-ipkg-install.patch \
+file://080-distutils-dont_adjust_files.patch \
+file://110-enable-zlib.patch \
+file://130-readline-setup.patch \
+file://140-verbose-sharedmods.patch \
+file://150-fix-setupterm.patch \
+file://h2py-pr13032.patch \
+file://python-3.3-multilib.patch \
+file://03-fix-tkinter-detection.patch \
+file://avoid_warning_about_tkinter.patch \
+file://06-ctypes-libffi-fix-configure.patch \
+file://shutil-follow-symlink-fix.patch \
+${DISTRO_SRC_URI} \
+"
+SRC_URI[md5sum] = "b3b2524f72409d919a4137826a870a8f"
+SRC_URI[sha256sum] = "15c113fd6c058712f05d31b4eff149d4d823b8e39ef5e37228dc5dc4f8716df9"
+
+LIC_FILES_CHKSUM = "file://LICENSE;md5=d214581529e343354f8e23025bdf582d"
+
+S = "${WORKDIR}/Python-${PV}"
+
+EXTRANATIVEPATH += "bzip2-native"
+DEPENDS = "openssl-native bzip2-replacement-native zlib-native readline-native sqlite3-native"
+
+inherit native
+
+RPROVIDES += "python3-distutils-native python3-compression-native python3-textutils-native python3-core-native"
+
+EXTRA_OECONF_append = " --bindir=${bindir}/${PN}"
+
+EXTRA_OEMAKE = '\
+  BUILD_SYS="" \
+  HOST_SYS="" \
+  LIBC="" \
+  STAGING_LIBDIR=${STAGING_LIBDIR_NATIVE} \
+  STAGING_INCDIR=${STAGING_INCDIR_NATIVE} \
+  LIB=${baselib} \
+  ARCH=${TARGET_ARCH} \
+'
+
+do_configure_prepend() {
+	autoreconf --verbose --install --force --exclude=autopoint Modules/_ctypes/libffi || bbnote "_ctypes failed to autoreconf"
+}
+
+do_install() {
+	install -d ${D}${libdir}/pkgconfig
+	oe_runmake 'DESTDIR=${D}' install
+	if [ -e ${WORKDIR}/sitecustomize.py ]; then
+		install -m 0644 ${WORKDIR}/sitecustomize.py ${D}/${libdir}/python${PYTHON_MAJMIN}
+	fi
+	install -d ${D}${bindir}/${PN}
+	install -m 0755 Parser/pgen ${D}${bindir}/${PN}
+
+	# Make sure we use /usr/bin/env python
+	for PYTHSCRIPT in `grep -rIl ${bindir}/${PN}/python ${D}${bindir}/${PN}`; do
+		sed -i -e '1s|^#!.*|#!/usr/bin/env python|' $PYTHSCRIPT
+	done
+}