summaryrefslogtreecommitdiffstats
path: root/meta/packages/python/python_2.6.2.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.2.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.2.bb')
-rw-r--r--meta/packages/python/python_2.6.2.bb130
1 files changed, 130 insertions, 0 deletions
diff --git a/meta/packages/python/python_2.6.2.bb b/meta/packages/python/python_2.6.2.bb
new file mode 100644
index 0000000000..c996b0b5c4
--- /dev/null
+++ b/meta/packages/python/python_2.6.2.bb
@@ -0,0 +1,130 @@
1require python.inc
2DEPENDS = "python-native db gdbm openssl readline sqlite3 zlib"
3DEPENDS_sharprom = "python-native db readline zlib gdbm openssl"
4# set to .0 on every increase of INC_PR
5PR = "${INC_PR}.0"
6
7SRC_URI = "\
8 http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.bz2 \
9 file://00-fix-bindir-libdir-for-cross.patch;patch=1 \
10 file://01-use-proper-tools-for-cross-build.patch;patch=1 \
11 file://02-remove-test-for-cross.patch;patch=1 \
12 file://03-fix-tkinter-detection.patch;patch=1 \
13 file://04-default-is-optimized.patch;patch=1 \
14 file://05-enable-ctypes-cross-build.patch;patch=1 \
15 file://99-ignore-optimization-flag.patch;patch=1 \
16 \
17# not yet pushed forward
18# sitebranding
19 \
20# file://05-install.patch;patch=1 \
21# file://06-fix-urllib-exception.patch;patch=1 \
22# file://16-bug1179-imageop.patch;patch=1 \
23# file://13-set-wakeup-fix.patch;patch=1 \
24 \
25 file://sitecustomize.py \
26"
27S = "${WORKDIR}/Python-${PV}"
28
29inherit autotools
30
31# The 3 lines below are copied from the libffi recipe, ctypes ships its own copy of the libffi sources
32#Somehow gcc doesn't set __SOFTFP__ when passing -mfloatabi=softp :(
33TARGET_CC_ARCH_append_armv6 = " -D__SOFTFP__"
34TARGET_CC_ARCH_append_armv7a = " -D__SOFTFP__"
35
36do_configure_prepend() {
37 autoreconf -Wcross --verbose --install --force --exclude=autopoint Modules/_ctypes/libffi || oenote "_ctypes failed to autoreconf"
38}
39
40#
41# Copy config.h and an appropriate Makefile for distutils.sysconfig,
42# which laters uses the information out of these to compile extensions
43#
44do_compile_prepend() {
45 install -d ${STAGING_INCDIR}/python${PYTHON_MAJMIN}/
46 install -d ${STAGING_LIBDIR}/python${PYTHON_MAJMIN}/config/
47 install -m 0644 pyconfig.h ${STAGING_INCDIR}/python${PYTHON_MAJMIN}/
48 install -m 0644 Makefile Makefile.orig
49 install -m 0644 Makefile Makefile.backup
50 sed -e 's,${includedir},${STAGING_INCDIR},' < Makefile.backup > Makefile
51 install -m 0644 Makefile Makefile.backup
52 sed -e 's,${libdir},${STAGING_LIBDIR},' < Makefile.backup > Makefile
53 install -m 0644 Makefile ${STAGING_LIBDIR}/python${PYTHON_MAJMIN}/config/
54}
55
56do_compile() {
57 oe_runmake HOSTPGEN=${STAGING_BINDIR_NATIVE}/pgen \
58 HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python \
59 STAGING_LIBDIR=${STAGING_LIBDIR} \
60 STAGING_INCDIR=${STAGING_INCDIR} \
61 BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \
62 OPT="${CFLAGS}" libpython${PYTHON_MAJMIN}.so
63
64 oe_libinstall -so libpython${PYTHON_MAJMIN} ${STAGING_LIBDIR}
65
66 oe_runmake HOSTPGEN=${STAGING_BINDIR_NATIVE}/pgen \
67 HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python \
68 STAGING_LIBDIR=${STAGING_LIBDIR} \
69 STAGING_INCDIR=${STAGING_INCDIR} \
70 BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \
71 OPT="${CFLAGS}"
72}
73
74do_install() {
75 install -m 0644 Makefile.orig Makefile
76
77 oe_runmake HOSTPGEN=${STAGING_BINDIR_NATIVE}/pgen \
78 HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python \
79 STAGING_LIBDIR=${STAGING_LIBDIR} \
80 STAGING_INCDIR=${STAGING_INCDIR} \
81 BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \
82 DESTDIR=${D} LIBDIR=${libdir} install
83
84 install -m 0644 ${WORKDIR}/sitecustomize.py ${D}/${libdir}/python${PYTHON_MAJMIN}
85
86 # remove hardcoded ccache, see http://bugs.openembedded.net/show_bug.cgi?id=4144
87 sed -i -e s,ccache,'$(CCACHE)', ${D}/${libdir}/python${PYTHON_MAJMIN}/config/Makefile
88}
89
90require python-${PYTHON_MAJMIN}-manifest.inc
91
92# manual dependency additions
93RPROVIDES_python-core = "python"
94RRECOMMENDS_python-core = "python-readline"
95RRECOMMENDS_python-crypt = "openssl"
96
97# add sitecustomize
98FILES_python-core += "${libdir}/python${PYTHON_MAJMIN}/sitecustomize.py"
99# ship 2to3
100FILES_python-core += "${bindir}/2to3"
101
102# package libpython2
103PACKAGES =+ "libpython2"
104FILES_libpython2 = "${libdir}/libpython*.so*"
105
106# additional stuff -dev
107
108FILES_${PN}-dev = "\
109 ${includedir} \
110 ${libdir}/lib*${SOLIBSDEV} \
111 ${libdir}/*.la \
112 ${libdir}/*.a \
113 ${libdir}/*.o \
114 ${libdir}/pkgconfig \
115 ${base_libdir}/*.a \
116 ${base_libdir}/*.o \
117 ${datadir}/aclocal \
118 ${datadir}/pkgconfig \
119"
120
121# catch debug extensions (isn't that already in python-core-dbg?)
122FILES_python-dbg += "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/.debug"
123
124# catch all the rest (unsorted)
125PACKAGES += "python-misc"
126FILES_python-misc = "${libdir}/python${PYTHON_MAJMIN}"
127
128# catch manpage
129PACKAGES += "python-man"
130FILES_python-man = "${datadir}/man"