diff options
author | Nitin A Kamble <nitin.a.kamble@intel.com> | 2012-05-01 10:23:29 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-05-03 15:48:04 +0100 |
commit | 7b08f6a9a11c76aa6b0910feb49accae5db25de3 (patch) | |
tree | d5333890dd7a553eef6b8a32a16e5ff446fb4fbb /meta/recipes-devtools/python/python_2.7.2.bb | |
parent | 4f4ab8bfe33283105112e81ee242a2e72527dd18 (diff) | |
download | poky-7b08f6a9a11c76aa6b0910feb49accae5db25de3.tar.gz |
python: upgrade from 2.7.2 to 2.7.3
bin/python2 link is provided by the python install process,
so no need to create it.
rebase these patches to the newer code:
fix_for_using_different_libdir.patch
04-default-is-optimized.patch
remove this patch as it is upstream now:
sys_platform_is_now_always_linux2.patch
Change default python version to 2.7.3 in the distro config
(From OE-Core rev: 5d92a95ea9b480235b7c9ca5949a681376eba725)
Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.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.bb | 170 |
1 files changed, 0 insertions, 170 deletions
diff --git a/meta/recipes-devtools/python/python_2.7.2.bb b/meta/recipes-devtools/python/python_2.7.2.bb deleted file mode 100644 index bd5c1ffde8..0000000000 --- a/meta/recipes-devtools/python/python_2.7.2.bb +++ /dev/null | |||
@@ -1,170 +0,0 @@ | |||
1 | require python.inc | ||
2 | DEPENDS = "python-native bzip2 db gdbm openssl readline sqlite3 zlib" | ||
3 | PR = "${INC_PR}.20" | ||
4 | |||
5 | DISTRO_SRC_URI ?= "file://sitecustomize.py" | ||
6 | DISTRO_SRC_URI_linuxstdbase = "" | ||
7 | SRC_URI += "\ | ||
8 | file://01-use-proper-tools-for-cross-build.patch \ | ||
9 | file://03-fix-tkinter-detection.patch \ | ||
10 | file://04-default-is-optimized.patch \ | ||
11 | file://05-enable-ctypes-cross-build.patch \ | ||
12 | file://06-ctypes-libffi-fix-configure.patch \ | ||
13 | file://06-avoid_usr_lib_termcap_path_in_linking.patch \ | ||
14 | file://99-ignore-optimization-flag.patch \ | ||
15 | ${DISTRO_SRC_URI} \ | ||
16 | file://multilib.patch \ | ||
17 | file://cgi_py.patch \ | ||
18 | file://remove_sqlite_rpath.patch \ | ||
19 | file://setup_py_skip_cross_import_check.patch \ | ||
20 | file://add-md5module-support.patch \ | ||
21 | file://host_include_contamination.patch \ | ||
22 | file://sys_platform_is_now_always_linux2.patch \ | ||
23 | file://fix_for_using_different_libdir.patch \ | ||
24 | file://setuptweaks.patch \ | ||
25 | file://check-if-target-is-64b-not-host.patch \ | ||
26 | file://search_db_h_in_inc_dirs_and_avoid_warning.patch \ | ||
27 | file://avoid_warning_about_bsddb.patch \ | ||
28 | file://avoid_warning_about_tkinter.patch \ | ||
29 | file://avoid_warning_for_sunos_specific_module.patch \ | ||
30 | " | ||
31 | |||
32 | S = "${WORKDIR}/Python-${PV}" | ||
33 | |||
34 | inherit autotools multilib_header | ||
35 | |||
36 | # The 3 lines below are copied from the libffi recipe, ctypes ships its own copy of the libffi sources | ||
37 | #Somehow gcc doesn't set __SOFTFP__ when passing -mfloatabi=softp :( | ||
38 | TARGET_CC_ARCH_append_armv6 = " -D__SOFTFP__" | ||
39 | TARGET_CC_ARCH_append_armv7a = " -D__SOFTFP__" | ||
40 | |||
41 | do_configure_prepend() { | ||
42 | rm -f ${S}/Makefile.orig | ||
43 | autoreconf -Wcross --verbose --install --force --exclude=autopoint Modules/_ctypes/libffi || bbnote "_ctypes failed to autoreconf" | ||
44 | } | ||
45 | |||
46 | do_compile() { | ||
47 | # regenerate platform specific files, because they depend on system headers | ||
48 | cd Lib/plat-linux2 | ||
49 | include=${STAGING_INCDIR} ${STAGING_BINDIR_NATIVE}/python \ | ||
50 | ${S}/Tools/scripts/h2py.py -i '(u_long)' \ | ||
51 | ${STAGING_INCDIR}/dlfcn.h \ | ||
52 | ${STAGING_INCDIR}/linux/cdrom.h \ | ||
53 | ${STAGING_INCDIR}/netinet/in.h \ | ||
54 | ${STAGING_INCDIR}/sys/types.h | ||
55 | sed -e 's,${STAGING_DIR_HOST},,g' -i *.py | ||
56 | cd - | ||
57 | |||
58 | # | ||
59 | # Copy config.h and an appropriate Makefile for distutils.sysconfig, | ||
60 | # which laters uses the information out of these to compile extensions | ||
61 | # | ||
62 | # The following part (until python compilation) should probably moved to an | ||
63 | # -initial recipe to handle staging better | ||
64 | # | ||
65 | install -d ${STAGING_INCDIR}/python${PYTHON_MAJMIN}/ | ||
66 | install -d ${STAGING_LIBDIR}/python${PYTHON_MAJMIN}/config/ | ||
67 | install -m 0644 pyconfig.h ${STAGING_INCDIR}/python${PYTHON_MAJMIN}/ | ||
68 | |||
69 | # remove hardcoded ccache, see http://bugs.openembedded.net/show_bug.cgi?id=4144 | ||
70 | sed -i -e s,ccache,'$(CCACHE)', Makefile | ||
71 | |||
72 | # remove any bogus LD_LIBRARY_PATH | ||
73 | sed -i -e s,RUNSHARED=.*,RUNSHARED=, Makefile | ||
74 | |||
75 | if [ ! -f Makefile.orig ]; then | ||
76 | install -m 0644 Makefile Makefile.orig | ||
77 | fi | ||
78 | sed -i -e 's,^LDFLAGS=.*,LDFLAGS=-L. -L${STAGING_LIBDIR},g' \ | ||
79 | -e 's,libdir=${libdir},libdir=${STAGING_LIBDIR},g' \ | ||
80 | -e 's,libexecdir=${libexecdir},libexecdir=${STAGING_DIR_HOST}${libexecdir},g' \ | ||
81 | -e 's,^LIBDIR=.*,LIBDIR=${STAGING_LIBDIR},g' \ | ||
82 | -e 's,includedir=${includedir},includedir=${STAGING_INCDIR},g' \ | ||
83 | -e 's,^INCLUDEDIR=.*,INCLUDE=${STAGING_INCDIR},g' \ | ||
84 | -e 's,^CONFINCLUDEDIR=.*,CONFINCLUDE=${STAGING_INCDIR},g' \ | ||
85 | Makefile | ||
86 | install -m 0644 Makefile ${STAGING_LIBDIR}/python${PYTHON_MAJMIN}/config/ | ||
87 | # save copy of it now, because if we do it in do_install and | ||
88 | # then call do_install twice we get Makefile.orig == Makefile.sysroot | ||
89 | install -m 0644 Makefile Makefile.sysroot | ||
90 | |||
91 | export CROSS_COMPILE="${TARGET_PREFIX}" | ||
92 | |||
93 | oe_runmake HOSTPGEN=${STAGING_BINDIR_NATIVE}/pgen \ | ||
94 | HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python \ | ||
95 | STAGING_LIBDIR=${STAGING_LIBDIR} \ | ||
96 | STAGING_BASELIBDIR=${STAGING_BASELIBDIR} \ | ||
97 | STAGING_INCDIR=${STAGING_INCDIR} \ | ||
98 | BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \ | ||
99 | OPT="${CFLAGS}" libpython${PYTHON_MAJMIN}.so | ||
100 | |||
101 | oe_libinstall -so libpython${PYTHON_MAJMIN} ${STAGING_LIBDIR} | ||
102 | |||
103 | oe_runmake HOSTPGEN=${STAGING_BINDIR_NATIVE}/pgen \ | ||
104 | HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python \ | ||
105 | STAGING_LIBDIR=${STAGING_LIBDIR} \ | ||
106 | STAGING_INCDIR=${STAGING_INCDIR} \ | ||
107 | STAGING_BASELIBDIR=${STAGING_BASELIBDIR} \ | ||
108 | BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \ | ||
109 | OPT="${CFLAGS}" | ||
110 | } | ||
111 | |||
112 | do_install() { | ||
113 | # make install needs the original Makefile, or otherwise the inclues would | ||
114 | # go to ${D}${STAGING...}/... | ||
115 | install -m 0644 Makefile.orig Makefile | ||
116 | |||
117 | export CROSS_COMPILE="${TARGET_PREFIX}" | ||
118 | |||
119 | oe_runmake HOSTPGEN=${STAGING_BINDIR_NATIVE}/pgen \ | ||
120 | HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python \ | ||
121 | CROSSPYTHONPATH=${STAGING_LIBDIR_NATIVE}/python${PYTHON_MAJMIN}/lib-dynload/ \ | ||
122 | STAGING_LIBDIR=${STAGING_LIBDIR} \ | ||
123 | STAGING_INCDIR=${STAGING_INCDIR} \ | ||
124 | STAGING_BASELIBDIR=${STAGING_BASELIBDIR} \ | ||
125 | BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \ | ||
126 | DESTDIR=${D} LIBDIR=${libdir} install | ||
127 | |||
128 | install -m 0644 Makefile.sysroot ${D}/${libdir}/python${PYTHON_MAJMIN}/config/Makefile | ||
129 | |||
130 | if [ -e ${WORKDIR}/sitecustomize.py ]; then | ||
131 | install -m 0644 ${WORKDIR}/sitecustomize.py ${D}/${libdir}/python${PYTHON_MAJMIN} | ||
132 | fi | ||
133 | |||
134 | oe_multilib_header python${PYTHON_MAJMIN}/pyconfig.h | ||
135 | } | ||
136 | |||
137 | SSTATE_SCAN_FILES += "Makefile" | ||
138 | PACKAGE_PREPROCESS_FUNCS += "py_package_preprocess" | ||
139 | |||
140 | py_package_preprocess () { | ||
141 | # copy back the old Makefile to fix target package | ||
142 | install -m 0644 Makefile.orig ${PKGD}/${libdir}/python${PYTHON_MAJMIN}/config/Makefile | ||
143 | } | ||
144 | |||
145 | require python-${PYTHON_MAJMIN}-manifest.inc | ||
146 | |||
147 | # manual dependency additions | ||
148 | RPROVIDES_${PN}-core = "${PN}" | ||
149 | RRECOMMENDS_${PN}-core = "${PN}-readline" | ||
150 | RRECOMMENDS_${PN}-crypt = "openssl" | ||
151 | |||
152 | # package libpython2 | ||
153 | PACKAGES =+ "lib${BPN}2${PKGSUFFIX}" | ||
154 | FILES_lib${BPN}2${PKGSUFFIX} = "${libdir}/libpython*.so.*" | ||
155 | |||
156 | # catch debug extensions (isn't that already in python-core-dbg?) | ||
157 | FILES_${PN}-dbg += "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/.debug" | ||
158 | |||
159 | # catch all the rest (unsorted) | ||
160 | PACKAGES += "${PN}-misc" | ||
161 | FILES_${PN}-misc = "${libdir}/python${PYTHON_MAJMIN}" | ||
162 | |||
163 | # catch manpage | ||
164 | PACKAGES += "${PN}-man" | ||
165 | FILES_${PN}-man = "${datadir}/man" | ||
166 | |||
167 | BBCLASSEXTEND = "nativesdk" | ||
168 | |||
169 | PKGSUFFIX = "" | ||
170 | PKGSUFFIX_virtclass-nativesdk = "-nativesdk" | ||