summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/python/python_2.7.3.bb
diff options
context:
space:
mode:
authorAlejandro Hernandez <alejandro.hernandez@linux.intel.com>2015-02-11 17:57:49 -0600
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-02-23 17:35:29 +0000
commitcb02ecb507ddad3cb17c78020b42c004aa2903ae (patch)
tree0f30353b3c8a3aaf6294f8db9c8fb7cff5575ab9 /meta/recipes-devtools/python/python_2.7.3.bb
parent122ee11bd1817f776336e54898cb36162fe527df (diff)
downloadpoky-cb02ecb507ddad3cb17c78020b42c004aa2903ae.tar.gz
Python: Upgrade from 2.7.3 to 2.7.9:
- Based on Paul Eggletons work to partially upgrade to Python 2.7.6 Modified: default-versions.inc: switched to python 2.7.9 generate-manifest-2.7.py: fixed _sysconfigdata python-2.7-manifest.inc: fixed _sysconfigdata python.inc: Updated checksums and source, no LICENSE change just updated some dates python-native_2.7.3 -> python-native_2.7.9 and updated patches python_2.7.3 -> python_2.7.9, and added ac_cv_file__dev_ptmx=no ac_cv_file__dev_ptc=no in EXTRA_OECONF to solve python issue #3754, only needed when cross compiling, also updated patches use_sysroot_ncurses_instead_of_host.patch: New patch to use ncursesw from sysroot instead of hosts, introduced by fix for python issue #15268 Rebased: 01-use-proper-tools-for-cross-build.patch 03-fix-tkinter-detection.patch 05-enable-ctypes-cross-build.patch 06-avoid_usr_lib_termcap_path_in_linking.patch avoid_warning_about_tkinter.patch builddir.patch fix_for_using_different_libdir.patch host_include_contamination.patch multilib.patch nohostlibs.patch search_db_h_in_inc_dirs_and_avoid_warning.patch Deleted (fixed on upstream): 06-ctypes-libffi-fix-configure.patch CVE-2013-4073_py27.patch gcc-4.8-fix-configure-Wformat.patch json-flaw-fix.patch posix_close.patch pypirc-secure.patch python-2.7.3-CVE-2012-2135.patch python-2.7.3-CVE-2013-1752-smtplib-fix.patch python-2.7.3-CVE-2014-1912.patch python-2.7.3-CVE-2014-7185.patch python-2.7.3-berkeley-db-5.3.patch python-fix-build-error-with-Readline-6.3.patch remove-BOM-insection-code.patch remove_sqlite_rpath.patch python2.7.3-nossl3.patch [YOCTO #7059] (From OE-Core rev: d4ad95f0d5f08891637c644e85b09da9c4585059) Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/python/python_2.7.3.bb')
-rw-r--r--meta/recipes-devtools/python/python_2.7.3.bb194
1 files changed, 0 insertions, 194 deletions
diff --git a/meta/recipes-devtools/python/python_2.7.3.bb b/meta/recipes-devtools/python/python_2.7.3.bb
deleted file mode 100644
index a4c95c18e0..0000000000
--- a/meta/recipes-devtools/python/python_2.7.3.bb
+++ /dev/null
@@ -1,194 +0,0 @@
1require python.inc
2DEPENDS = "python-native bzip2 db gdbm openssl readline sqlite3 zlib"
3PR = "${INC_PR}.3"
4
5DISTRO_SRC_URI ?= "file://sitecustomize.py"
6DISTRO_SRC_URI_linuxstdbase = ""
7SRC_URI += "\
8 file://01-use-proper-tools-for-cross-build.patch \
9 file://03-fix-tkinter-detection.patch \
10 file://05-enable-ctypes-cross-build.patch \
11 file://06-ctypes-libffi-fix-configure.patch \
12 file://06-avoid_usr_lib_termcap_path_in_linking.patch \
13 ${DISTRO_SRC_URI} \
14 file://multilib.patch \
15 file://cgi_py.patch \
16 file://remove_sqlite_rpath.patch \
17 file://setup_py_skip_cross_import_check.patch \
18 file://add-md5module-support.patch \
19 file://host_include_contamination.patch \
20 file://fix_for_using_different_libdir.patch \
21 file://setuptweaks.patch \
22 file://check-if-target-is-64b-not-host.patch \
23 file://search_db_h_in_inc_dirs_and_avoid_warning.patch \
24 file://avoid_warning_about_tkinter.patch \
25 file://avoid_warning_for_sunos_specific_module.patch \
26 file://python-2.7.3-berkeley-db-5.3.patch \
27 file://python-2.7.3-remove-bsdb-rpath.patch \
28 file://builddir.patch \
29 file://python-2.7.3-CVE-2012-2135.patch \
30 file://gcc-4.8-fix-configure-Wformat.patch \
31 file://fix-makefile-for-ptest.patch \
32 file://run-ptest \
33 file://CVE-2013-4073_py27.patch \
34 file://pypirc-secure.patch \
35 file://parallel-makeinst-create-bindir.patch \
36 file://python-2.7.3-CVE-2013-1752-smtplib-fix.patch \
37 file://python-fix-build-error-with-Readline-6.3.patch \
38 file://python-2.7.3-CVE-2014-1912.patch \
39 file://json-flaw-fix.patch \
40 file://posix_close.patch \
41 file://remove-BOM-insection-code.patch \
42 file://python-2.7.3-CVE-2014-7185.patch \
43 file://python2.7.3-nossl3.patch \
44"
45
46S = "${WORKDIR}/Python-${PV}"
47
48inherit autotools multilib_header python-dir pythonnative
49
50# The 3 lines below are copied from the libffi recipe, ctypes ships its own copy of the libffi sources
51#Somehow gcc doesn't set __SOFTFP__ when passing -mfloatabi=softp :(
52TARGET_CC_ARCH_append_armv6 = " -D__SOFTFP__"
53TARGET_CC_ARCH_append_armv7a = " -D__SOFTFP__"
54
55# The following is a hack until we drop ac_cv_sizeof_off_t from site files
56EXTRA_OECONF += "${@bb.utils.contains('DISTRO_FEATURES', 'largefile', 'ac_cv_sizeof_off_t=8', '', d)}"
57
58do_configure_prepend() {
59 rm -f ${S}/Makefile.orig
60 autoreconf -Wcross --verbose --install --force --exclude=autopoint Modules/_ctypes/libffi || bbnote "_ctypes failed to autoreconf"
61}
62
63do_compile() {
64 # regenerate platform specific files, because they depend on system headers
65 cd ${S}/Lib/plat-linux2
66 include=${STAGING_INCDIR} ${STAGING_BINDIR_NATIVE}/python-native/python \
67 ${S}/Tools/scripts/h2py.py -i '(u_long)' \
68 ${STAGING_INCDIR}/dlfcn.h \
69 ${STAGING_INCDIR}/linux/cdrom.h \
70 ${STAGING_INCDIR}/netinet/in.h \
71 ${STAGING_INCDIR}/sys/types.h
72 sed -e 's,${STAGING_DIR_HOST},,g' -i *.py
73 cd -
74
75 # remove hardcoded ccache, see http://bugs.openembedded.net/show_bug.cgi?id=4144
76 sed -i -e s,ccache\ ,'$(CCACHE) ', Makefile
77
78 # remove any bogus LD_LIBRARY_PATH
79 sed -i -e s,RUNSHARED=.*,RUNSHARED=, Makefile
80
81 if [ ! -f Makefile.orig ]; then
82 install -m 0644 Makefile Makefile.orig
83 fi
84 sed -i -e 's#^LDFLAGS=.*#LDFLAGS=${LDFLAGS} -L. -L${STAGING_LIBDIR}#g' \
85 -e 's,libdir=${libdir},libdir=${STAGING_LIBDIR},g' \
86 -e 's,libexecdir=${libexecdir},libexecdir=${STAGING_DIR_HOST}${libexecdir},g' \
87 -e 's,^LIBDIR=.*,LIBDIR=${STAGING_LIBDIR},g' \
88 -e 's,includedir=${includedir},includedir=${STAGING_INCDIR},g' \
89 -e 's,^INCLUDEDIR=.*,INCLUDE=${STAGING_INCDIR},g' \
90 -e 's,^CONFINCLUDEDIR=.*,CONFINCLUDE=${STAGING_INCDIR},g' \
91 Makefile
92 # save copy of it now, because if we do it in do_install and
93 # then call do_install twice we get Makefile.orig == Makefile.sysroot
94 install -m 0644 Makefile Makefile.sysroot
95
96 export CROSS_COMPILE="${TARGET_PREFIX}"
97 export PYTHONBUILDDIR="${B}"
98
99 oe_runmake HOSTPGEN=${STAGING_BINDIR_NATIVE}/python-native/pgen \
100 HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python-native/python \
101 STAGING_LIBDIR=${STAGING_LIBDIR} \
102 STAGING_INCDIR=${STAGING_INCDIR} \
103 STAGING_BASELIBDIR=${STAGING_BASELIBDIR} \
104 BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \
105 OPT="${CFLAGS}"
106}
107
108do_install() {
109 # make install needs the original Makefile, or otherwise the inclues would
110 # go to ${D}${STAGING...}/...
111 install -m 0644 Makefile.orig Makefile
112
113 export CROSS_COMPILE="${TARGET_PREFIX}"
114 export PYTHONBUILDDIR="${B}"
115
116 # After swizzling the makefile, we need to run the build again.
117 # install can race with the build so we have to run this first, then install
118 oe_runmake HOSTPGEN=${STAGING_BINDIR_NATIVE}/python-native/pgen \
119 HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python-native/python \
120 CROSSPYTHONPATH=${STAGING_LIBDIR_NATIVE}/python${PYTHON_MAJMIN}/lib-dynload/ \
121 STAGING_LIBDIR=${STAGING_LIBDIR} \
122 STAGING_INCDIR=${STAGING_INCDIR} \
123 STAGING_BASELIBDIR=${STAGING_BASELIBDIR} \
124 BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \
125 DESTDIR=${D} LIBDIR=${libdir}
126
127 oe_runmake HOSTPGEN=${STAGING_BINDIR_NATIVE}/python-native/pgen \
128 HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python-native/python \
129 CROSSPYTHONPATH=${STAGING_LIBDIR_NATIVE}/python${PYTHON_MAJMIN}/lib-dynload/ \
130 STAGING_LIBDIR=${STAGING_LIBDIR} \
131 STAGING_INCDIR=${STAGING_INCDIR} \
132 STAGING_BASELIBDIR=${STAGING_BASELIBDIR} \
133 BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \
134 DESTDIR=${D} LIBDIR=${libdir} install
135
136 install -m 0644 Makefile.sysroot ${D}/${libdir}/python${PYTHON_MAJMIN}/config/Makefile
137
138 if [ -e ${WORKDIR}/sitecustomize.py ]; then
139 install -m 0644 ${WORKDIR}/sitecustomize.py ${D}/${libdir}/python${PYTHON_MAJMIN}
140 fi
141
142 oe_multilib_header python${PYTHON_MAJMIN}/pyconfig.h
143}
144
145do_install_append_class-nativesdk () {
146 create_wrapper ${D}${bindir}/python2.7 TERMINFO_DIRS='${sysconfdir}/terminfo:/etc/terminfo:/usr/share/terminfo:/usr/share/misc/terminfo:/lib/terminfo'
147}
148
149SSTATE_SCAN_FILES += "Makefile"
150PACKAGE_PREPROCESS_FUNCS += "py_package_preprocess"
151
152py_package_preprocess () {
153 # copy back the old Makefile to fix target package
154 install -m 0644 Makefile.orig ${PKGD}/${libdir}/python${PYTHON_MAJMIN}/config/Makefile
155
156 # Remove references to buildmachine paths in target Makefile
157 sed -i -e 's:--sysroot=${STAGING_DIR_TARGET}::g' -e s:'--with-libtool-sysroot=${STAGING_DIR_TARGET}'::g ${PKGD}/${libdir}/python${PYTHON_MAJMIN}/config/Makefile
158}
159
160require python-${PYTHON_MAJMIN}-manifest.inc
161
162# manual dependency additions
163RPROVIDES_${PN}-core = "${PN}"
164RRECOMMENDS_${PN}-core = "${PN}-readline"
165RRECOMMENDS_${PN}-core_append_class-nativesdk = " nativesdk-python-modules"
166RRECOMMENDS_${PN}-crypt = "openssl"
167
168# package libpython2
169PACKAGES =+ "lib${BPN}2"
170FILES_lib${BPN}2 = "${libdir}/libpython*.so.*"
171
172# catch debug extensions (isn't that already in python-core-dbg?)
173FILES_${PN}-dbg += "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/.debug"
174
175# catch all the rest (unsorted)
176PACKAGES += "${PN}-misc"
177FILES_${PN}-misc = "${libdir}/python${PYTHON_MAJMIN}"
178RDEPENDS_${PN}-ptest = "${PN}-modules ${PN}-misc"
179#inherit ptest after "require python-${PYTHON_MAJMIN}-manifest.inc" so PACKAGES doesn't get overwritten
180inherit ptest
181
182# This must come after inherit ptest for the override to take effect
183do_install_ptest() {
184 cp ${B}/Makefile ${D}${PTEST_PATH}
185 sed -e s:LIBDIR/python/ptest:${PTEST_PATH}:g \
186 -e s:LIBDIR:${libdir}:g \
187 -i ${D}${PTEST_PATH}/run-ptest
188}
189
190# catch manpage
191PACKAGES += "${PN}-man"
192FILES_${PN}-man = "${datadir}/man"
193
194BBCLASSEXTEND = "nativesdk"