summaryrefslogtreecommitdiffstats
path: root/meta/packages/python/python_2.6.1.bb
diff options
context:
space:
mode:
authorRichard Purdie <rpurdie@linux.intel.com>2009-12-03 12:08:52 +0000
committerRichard Purdie <rpurdie@linux.intel.com>2009-12-03 12:08:52 +0000
commitba1c4fa94426f8e46bf0e9ab1d225039bdb78158 (patch)
tree1a279f092f44d36c8218ee2430005b6a772a83d3 /meta/packages/python/python_2.6.1.bb
parent3b5336f7cf1c01c23e2fd81b54fbf89558fc2cd4 (diff)
downloadpoky-ba1c4fa94426f8e46bf0e9ab1d225039bdb78158.tar.gz
python: Update 2.5 -> 2.6 (from OE.dev)
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'meta/packages/python/python_2.6.1.bb')
-rw-r--r--meta/packages/python/python_2.6.1.bb113
1 files changed, 113 insertions, 0 deletions
diff --git a/meta/packages/python/python_2.6.1.bb b/meta/packages/python/python_2.6.1.bb
new file mode 100644
index 0000000000..46e14f84e7
--- /dev/null
+++ b/meta/packages/python/python_2.6.1.bb
@@ -0,0 +1,113 @@
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
6SRC_URI = "\
7 http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.bz2 \
8 file://00-fix-bindir-libdir-for-cross.patch;patch=1 \
9 file://01-use-proper-tools-for-cross-build.patch;patch=1 \
10 file://02-remove-test-for-cross.patch;patch=1 \
11 file://03-fix-tkinter-detection.patch;patch=1 \
12 file://04-default-is-optimized.patch;patch=1 \
13 file://05-enable-ctypes-cross-build.patch;patch=1 \
14 file://06-libffi-enable-default-mips.patch;patch=1 \
15 file://07-export-grammer.patch;patch=1 \
16 file://99-ignore-optimization-flag.patch;patch=1 \
17 \
18# not yet pushed forward
19# sitecustomize, sitebranding
20 \
21# file://05-install.patch;patch=1 \
22# file://06-fix-urllib-exception.patch;patch=1 \
23# file://16-bug1179-imageop.patch;patch=1 \
24# file://13-set-wakeup-fix.patch;patch=1 \
25 \
26 file://sitecustomize.py \
27"
28S = "${WORKDIR}/Python-${PV}"
29
30inherit autotools
31
32# The 3 lines below are copied from the libffi recipe, ctypes ships its own copy of the libffi sources
33#Somehow gcc doesn't set __SOFTFP__ when passing -mfloatabi=softp :(
34TARGET_CC_ARCH_append_armv6 = " -D__SOFTFP__"
35TARGET_CC_ARCH_append_armv7a = " -D__SOFTFP__"
36
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#
41do_compile_prepend() {
42 install -d ${STAGING_INCDIR}/python${PYTHON_MAJMIN}/
43 install -d ${STAGING_LIBDIR}/python${PYTHON_MAJMIN}/config/
44 install -m 0644 pyconfig.h ${STAGING_INCDIR}/python${PYTHON_MAJMIN}/
45 install -m 0644 Makefile Makefile.orig
46 install -m 0644 Makefile Makefile.backup
47 sed -e 's,${includedir},${STAGING_INCDIR},' < Makefile.backup > Makefile
48 install -m 0644 Makefile Makefile.backup
49 sed -e 's,${libdir},${STAGING_LIBDIR},' < Makefile.backup > Makefile
50 install -m 0644 Makefile ${STAGING_LIBDIR}/python${PYTHON_MAJMIN}/config/
51}
52
53do_compile() {
54 oe_runmake HOSTPGEN=${STAGING_BINDIR_NATIVE}/pgen \
55 HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python \
56 STAGING_LIBDIR=${STAGING_LIBDIR} \
57 STAGING_INCDIR=${STAGING_INCDIR} \
58 BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \
59 OPT="${CFLAGS}" libpython${PYTHON_MAJMIN}.so
60
61 oe_libinstall -so libpython${PYTHON_MAJMIN} ${STAGING_LIBDIR}
62
63 oe_runmake HOSTPGEN=${STAGING_BINDIR_NATIVE}/pgen \
64 HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python \
65 STAGING_LIBDIR=${STAGING_LIBDIR} \
66 STAGING_INCDIR=${STAGING_INCDIR} \
67 BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \
68 OPT="${CFLAGS}"
69}
70
71do_install() {
72 install -m 0644 Makefile.orig Makefile
73
74 oe_runmake HOSTPGEN=${STAGING_BINDIR_NATIVE}/pgen \
75 HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python \
76 STAGING_LIBDIR=${STAGING_LIBDIR} \
77 STAGING_INCDIR=${STAGING_INCDIR} \
78 BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \
79 DESTDIR=${D} LIBDIR=${libdir} install
80
81 install -m 0644 ${WORKDIR}/sitecustomize.py ${D}/${libdir}/python${PYTHON_MAJMIN}
82
83 # remove hardcoded ccache, see http://bugs.openembedded.net/show_bug.cgi?id=4144
84 sed -i -e s,ccache,'$(CCACHE)', ${D}/${libdir}/python${PYTHON_MAJMIN}/config/Makefile
85}
86
87require python-${PYTHON_MAJMIN}-manifest.inc
88
89# manual dependency additions
90RPROVIDES_python-core = "python"
91RRECOMMENDS_python-core = "python-readline"
92RRECOMMENDS_python-crypt = "openssl"
93
94# add sitecustomize
95FILES_python-core += "${libdir}/python${PYTHON_MAJMIN}/sitecustomize.py"
96
97# 2to3
98FILES_python-core += "${bindir}/2to3"
99
100# package libpython
101PACKAGES =+ "libpython2"
102FILES_libpython2 = "${libdir}/libpython*.so.*"
103
104# catch debug extensions (isn't that already in python-core-dbg?)
105FILES_python-dbg += "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/.debug"
106
107# catch all the rest (unsorted)
108PACKAGES += "python-misc"
109FILES_python-misc = "${libdir}/python${PYTHON_MAJMIN}"
110
111# catch manpage
112PACKAGES += "python-man"
113FILES_python-man = "${datadir}/man"