diff options
| author | Richard Purdie <rpurdie@linux.intel.com> | 2009-12-03 12:08:52 +0000 |
|---|---|---|
| committer | Richard Purdie <rpurdie@linux.intel.com> | 2009-12-03 12:08:52 +0000 |
| commit | ba1c4fa94426f8e46bf0e9ab1d225039bdb78158 (patch) | |
| tree | 1a279f092f44d36c8218ee2430005b6a772a83d3 /meta/packages/python/python_2.6.2.bb | |
| parent | 3b5336f7cf1c01c23e2fd81b54fbf89558fc2cd4 (diff) | |
| download | poky-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.bb | 130 |
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 @@ | |||
| 1 | require python.inc | ||
| 2 | DEPENDS = "python-native db gdbm openssl readline sqlite3 zlib" | ||
| 3 | DEPENDS_sharprom = "python-native db readline zlib gdbm openssl" | ||
| 4 | # set to .0 on every increase of INC_PR | ||
| 5 | PR = "${INC_PR}.0" | ||
| 6 | |||
| 7 | SRC_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 | " | ||
| 27 | S = "${WORKDIR}/Python-${PV}" | ||
| 28 | |||
| 29 | inherit 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 :( | ||
| 33 | TARGET_CC_ARCH_append_armv6 = " -D__SOFTFP__" | ||
| 34 | TARGET_CC_ARCH_append_armv7a = " -D__SOFTFP__" | ||
| 35 | |||
| 36 | do_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 | # | ||
| 44 | do_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 | |||
| 56 | do_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 | |||
| 74 | do_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 | |||
| 90 | require python-${PYTHON_MAJMIN}-manifest.inc | ||
| 91 | |||
| 92 | # manual dependency additions | ||
| 93 | RPROVIDES_python-core = "python" | ||
| 94 | RRECOMMENDS_python-core = "python-readline" | ||
| 95 | RRECOMMENDS_python-crypt = "openssl" | ||
| 96 | |||
| 97 | # add sitecustomize | ||
| 98 | FILES_python-core += "${libdir}/python${PYTHON_MAJMIN}/sitecustomize.py" | ||
| 99 | # ship 2to3 | ||
| 100 | FILES_python-core += "${bindir}/2to3" | ||
| 101 | |||
| 102 | # package libpython2 | ||
| 103 | PACKAGES =+ "libpython2" | ||
| 104 | FILES_libpython2 = "${libdir}/libpython*.so*" | ||
| 105 | |||
| 106 | # additional stuff -dev | ||
| 107 | |||
| 108 | FILES_${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?) | ||
| 122 | FILES_python-dbg += "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/.debug" | ||
| 123 | |||
| 124 | # catch all the rest (unsorted) | ||
| 125 | PACKAGES += "python-misc" | ||
| 126 | FILES_python-misc = "${libdir}/python${PYTHON_MAJMIN}" | ||
| 127 | |||
| 128 | # catch manpage | ||
| 129 | PACKAGES += "python-man" | ||
| 130 | FILES_python-man = "${datadir}/man" | ||
