summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/python/python_2.7.2.bb
diff options
context:
space:
mode:
authorNitin A Kamble <nitin.a.kamble@intel.com>2011-10-14 07:06:13 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-10-31 22:03:20 +0000
commit01103b2f299fd9aa05ecae40760c2011f235f710 (patch)
tree43ebed3560003af61dccfefeb2d3da4932ad7167 /meta/recipes-devtools/python/python_2.7.2.bb
parent0d18f03b225ffaffb1e17b40ff909f4948880647 (diff)
downloadpoky-01103b2f299fd9aa05ecae40760c2011f235f710.tar.gz
python, python-native: upgrade from 2.6.6 to 2.7.2
Rebased these patches to the newer code modified: python-native/nohostlibs.patch modified: python/01-use-proper-tools-for-cross-build.patch modified: python/06-avoid_usr_lib_termcap_path_in_linking.patch modified: python/06-ctypes-libffi-fix-configure.patch modified: python/multilib.patch Deleted these patches are the are now upstream deleted: python/02-remove-test-for-cross.patch deleted: python/security_issue_2254_fix.patch Added this patch to python-native new file: python-native/multilib.patch Updated site config file for python modified: ../../site/common-linux : add ac_cv_have_long_long_format for python avoid this error in python: Include/pyport.h:243:13: error: #error "This platform's pyconfig.h needs to define PY_FORMAT_LONG_LONG" Updated default python version modified: ../../conf/distro/include/default-versions.inc (From OE-Core rev: b284e9a512860b8a8380be80f96cebce6b92ff80) Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/python/python_2.7.2.bb')
-rw-r--r--meta/recipes-devtools/python/python_2.7.2.bb144
1 files changed, 144 insertions, 0 deletions
diff --git a/meta/recipes-devtools/python/python_2.7.2.bb b/meta/recipes-devtools/python/python_2.7.2.bb
new file mode 100644
index 0000000000..af14adbbb3
--- /dev/null
+++ b/meta/recipes-devtools/python/python_2.7.2.bb
@@ -0,0 +1,144 @@
1require python.inc
2DEPENDS = "python-native db gdbm openssl readline sqlite3 zlib"
3DEPENDS_sharprom = "python-native db readline zlib gdbm openssl"
4PR = "${INC_PR}.0"
5
6DISTRO_SRC_URI ?= "file://sitecustomize.py"
7DISTRO_SRC_URI_linuxstdbase = ""
8SRC_URI += "\
9 file://01-use-proper-tools-for-cross-build.patch \
10 file://03-fix-tkinter-detection.patch \
11 file://04-default-is-optimized.patch \
12 file://05-enable-ctypes-cross-build.patch \
13 file://06-ctypes-libffi-fix-configure.patch \
14 file://06-avoid_usr_lib_termcap_path_in_linking.patch \
15 file://07-linux3-regen-fix.patch \
16 file://99-ignore-optimization-flag.patch \
17 ${DISTRO_SRC_URI} \
18 file://multilib.patch \
19 file://cgi_py.patch \
20 file://remove_sqlite_rpath.patch \
21"
22
23S = "${WORKDIR}/Python-${PV}"
24
25inherit autotools
26
27# The 3 lines below are copied from the libffi recipe, ctypes ships its own copy of the libffi sources
28#Somehow gcc doesn't set __SOFTFP__ when passing -mfloatabi=softp :(
29TARGET_CC_ARCH_append_armv6 = " -D__SOFTFP__"
30TARGET_CC_ARCH_append_armv7a = " -D__SOFTFP__"
31
32do_configure_prepend() {
33 autoreconf -Wcross --verbose --install --force --exclude=autopoint Modules/_ctypes/libffi || bbnote "_ctypes failed to autoreconf"
34}
35
36do_compile() {
37 #
38 # Copy config.h and an appropriate Makefile for distutils.sysconfig,
39 # which laters uses the information out of these to compile extensions
40 #
41 # The following part (until python compilation) should probably moved to an
42 # -initial recipe to handle staging better
43 #
44 install -d ${STAGING_INCDIR}/python${PYTHON_MAJMIN}/
45 install -d ${STAGING_LIBDIR}/python${PYTHON_MAJMIN}/config/
46 install -m 0644 pyconfig.h ${STAGING_INCDIR}/python${PYTHON_MAJMIN}/
47
48 # remove hardcoded ccache, see http://bugs.openembedded.net/show_bug.cgi?id=4144
49 sed -i -e s,ccache,'$(CCACHE)', Makefile
50
51 install -m 0644 Makefile Makefile.orig
52 sed -i -e 's,${includedir},${STAGING_INCDIR},' Makefile
53 sed -i -e 's,${libdir},${STAGING_LIBDIR},' Makefile
54 install -m 0644 Makefile ${STAGING_LIBDIR}/python${PYTHON_MAJMIN}/config/
55 # save copy of it now, because if we do it in do_install and
56 # then call do_install twice we get Makefile.orig == Makefile.sysroot
57 install -m 0644 Makefile Makefile.sysroot
58
59 oe_runmake HOSTPGEN=${STAGING_BINDIR_NATIVE}/pgen \
60 HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python \
61 STAGING_LIBDIR=${STAGING_LIBDIR} \
62 STAGING_INCDIR=${STAGING_INCDIR} \
63 BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \
64 OPT="${CFLAGS}" libpython${PYTHON_MAJMIN}.so
65
66 oe_libinstall -so libpython${PYTHON_MAJMIN} ${STAGING_LIBDIR}
67
68 oe_runmake HOSTPGEN=${STAGING_BINDIR_NATIVE}/pgen \
69 HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python \
70 STAGING_LIBDIR=${STAGING_LIBDIR} \
71 STAGING_INCDIR=${STAGING_INCDIR} \
72 BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \
73 OPT="${CFLAGS}"
74}
75
76do_install() {
77 # make install needs the original Makefile, or otherwise the inclues would
78 # go to ${D}${STAGING...}/...
79 install -m 0644 Makefile.orig Makefile
80
81 oe_runmake HOSTPGEN=${STAGING_BINDIR_NATIVE}/pgen \
82 HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python \
83 STAGING_LIBDIR=${STAGING_LIBDIR} \
84 STAGING_INCDIR=${STAGING_INCDIR} \
85 BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \
86 DESTDIR=${D} LIBDIR=${libdir} install
87
88 install -m 0644 Makefile.sysroot ${D}/${libdir}/python${PYTHON_MAJMIN}/config/Makefile
89
90 if [ -e ${WORKDIR}/sitecustomize.py ]; then
91 install -m 0644 ${WORKDIR}/sitecustomize.py ${D}/${libdir}/python${PYTHON_MAJMIN}
92 fi
93}
94
95PACKAGE_PREPROCESS_FUNCS += "py_package_preprocess"
96
97py_package_preprocess () {
98 # copy back the old Makefile to fix target package
99 install -m 0644 Makefile.orig ${PKGD}/${libdir}/python${PYTHON_MAJMIN}/config/Makefile
100}
101
102require python-${PYTHON_MAJMIN}-manifest.inc
103
104# manual dependency additions
105RPROVIDES_${PN}-core = "${PN}"
106RRECOMMENDS_${PN}-core = "${PN}-readline"
107RRECOMMENDS_${PN}-crypt = "openssl"
108
109# add sitecustomize
110FILES_${PN}-core += "${libdir}/python${PYTHON_MAJMIN}/sitecustomize.py"
111# ship 2to3
112FILES_${PN}-core += "${bindir}/2to3"
113
114# package libpython2
115PACKAGES =+ "lib${BPN}2"
116FILES_lib${BPN}2 = "${libdir}/libpython*.so.*"
117
118# additional stuff -dev
119
120FILES_${PN}-dev = "\
121 ${includedir} \
122 ${libdir}/lib*${SOLIBSDEV} \
123 ${libdir}/*.la \
124 ${libdir}/*.a \
125 ${libdir}/*.o \
126 ${libdir}/pkgconfig \
127 ${base_libdir}/*.a \
128 ${base_libdir}/*.o \
129 ${datadir}/aclocal \
130 ${datadir}/pkgconfig \
131"
132
133# catch debug extensions (isn't that already in python-core-dbg?)
134FILES_${PN}-dbg += "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/.debug"
135
136# catch all the rest (unsorted)
137PACKAGES += "${PN}-misc"
138FILES_${PN}-misc = "${libdir}/python${PYTHON_MAJMIN}"
139
140# catch manpage
141PACKAGES += "${PN}-man"
142FILES_${PN}-man = "${datadir}/man"
143
144BBCLASSEXTEND = "nativesdk"