summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/python/python_2.7.11.bb
diff options
context:
space:
mode:
authorAlejandro Hernandez <alejandro.hernandez@linux.intel.com>2016-08-03 18:49:42 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-08-10 10:46:30 +0100
commitadf4266524d0d1a7814d31496c3ecc6470644ec6 (patch)
tree12f5e4f1dbbdc8ba53bc02012b12848c006efdc2 /meta/recipes-devtools/python/python_2.7.11.bb
parentdb9508891b6985d3467ce7a04e12f75a07fa756f (diff)
downloadpoky-adf4266524d0d1a7814d31496c3ecc6470644ec6.tar.gz
python: upgrade from 2.7.11 to 2.7.12
LICENSE did not change, only dates were changed Rebases: - multilib.patch - 01-use-proper-tools-for-cross-build.patch Upstream: - avoid_parallel_make_races_on_pgen.patch - CVE-2016-5636.patch (From OE-Core rev: 2e64fdc99a0e00bd0a4b4bf09a128e56fd8e9f8b) Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/python/python_2.7.11.bb')
-rw-r--r--meta/recipes-devtools/python/python_2.7.11.bb171
1 files changed, 0 insertions, 171 deletions
diff --git a/meta/recipes-devtools/python/python_2.7.11.bb b/meta/recipes-devtools/python/python_2.7.11.bb
deleted file mode 100644
index 1e4a30d1ff..0000000000
--- a/meta/recipes-devtools/python/python_2.7.11.bb
+++ /dev/null
@@ -1,171 +0,0 @@
1require python.inc
2DEPENDS = "python-native libffi bzip2 db gdbm openssl readline sqlite3 zlib"
3PR = "${INC_PR}"
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://06-avoid_usr_lib_termcap_path_in_linking.patch \
11 ${DISTRO_SRC_URI} \
12 file://multilib.patch \
13 file://cgi_py.patch \
14 file://setup_py_skip_cross_import_check.patch \
15 file://add-md5module-support.patch \
16 file://host_include_contamination.patch \
17 file://fix_for_using_different_libdir.patch \
18 file://setuptweaks.patch \
19 file://check-if-target-is-64b-not-host.patch \
20 file://search_db_h_in_inc_dirs_and_avoid_warning.patch \
21 file://avoid_warning_about_tkinter.patch \
22 file://avoid_warning_for_sunos_specific_module.patch \
23 file://python-2.7.3-remove-bsdb-rpath.patch \
24 file://fix-makefile-for-ptest.patch \
25 file://run-ptest \
26 file://parallel-makeinst-create-bindir.patch \
27 file://use_sysroot_ncurses_instead_of_host.patch \
28 file://avoid_parallel_make_races_on_pgen.patch \
29 file://add-CROSSPYTHONPATH-for-PYTHON_FOR_BUILD.patch \
30 file://CVE-2016-5636.patch \
31"
32
33S = "${WORKDIR}/Python-${PV}"
34
35inherit autotools multilib_header python-dir pythonnative
36
37CONFIGUREOPTS += " --with-system-ffi "
38
39EXTRA_OECONF += "ac_cv_file__dev_ptmx=yes ac_cv_file__dev_ptc=no"
40
41do_configure_append() {
42 rm -f ${S}/Makefile.orig
43 autoreconf -Wcross --verbose --install --force --exclude=autopoint ../Python-${PV}/Modules/_ctypes/libffi
44}
45
46do_compile() {
47 # regenerate platform specific files, because they depend on system headers
48 cd ${S}/Lib/plat-linux2
49 include=${STAGING_INCDIR} ${STAGING_BINDIR_NATIVE}/python-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 # remove any bogus LD_LIBRARY_PATH
59 sed -i -e s,RUNSHARED=.*,RUNSHARED=, Makefile
60
61 if [ ! -f Makefile.orig ]; then
62 install -m 0644 Makefile Makefile.orig
63 fi
64 sed -i -e 's#^LDFLAGS=.*#LDFLAGS=${LDFLAGS} -L. -L${STAGING_LIBDIR}#g' \
65 -e 's,libdir=${libdir},libdir=${STAGING_LIBDIR},g' \
66 -e 's,libexecdir=${libexecdir},libexecdir=${STAGING_DIR_HOST}${libexecdir},g' \
67 -e 's,^LIBDIR=.*,LIBDIR=${STAGING_LIBDIR},g' \
68 -e 's,includedir=${includedir},includedir=${STAGING_INCDIR},g' \
69 -e 's,^INCLUDEDIR=.*,INCLUDE=${STAGING_INCDIR},g' \
70 -e 's,^CONFINCLUDEDIR=.*,CONFINCLUDE=${STAGING_INCDIR},g' \
71 Makefile
72 # save copy of it now, because if we do it in do_install and
73 # then call do_install twice we get Makefile.orig == Makefile.sysroot
74 install -m 0644 Makefile Makefile.sysroot
75
76 export CROSS_COMPILE="${TARGET_PREFIX}"
77 export PYTHONBUILDDIR="${B}"
78
79 oe_runmake HOSTPGEN=${STAGING_BINDIR_NATIVE}/python-native/pgen \
80 HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python-native/python \
81 STAGING_LIBDIR=${STAGING_LIBDIR} \
82 STAGING_INCDIR=${STAGING_INCDIR} \
83 STAGING_BASELIBDIR=${STAGING_BASELIBDIR} \
84 OPT="${CFLAGS}"
85}
86
87do_install() {
88 # make install needs the original Makefile, or otherwise the inclues would
89 # go to ${D}${STAGING...}/...
90 install -m 0644 Makefile.orig Makefile
91
92 export CROSS_COMPILE="${TARGET_PREFIX}"
93 export PYTHONBUILDDIR="${B}"
94
95 # After swizzling the makefile, we need to run the build again.
96 # install can race with the build so we have to run this first, then install
97 oe_runmake HOSTPGEN=${STAGING_BINDIR_NATIVE}/python-native/pgen \
98 HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python-native/python \
99 CROSSPYTHONPATH=${STAGING_LIBDIR_NATIVE}/python${PYTHON_MAJMIN}/lib-dynload/ \
100 STAGING_LIBDIR=${STAGING_LIBDIR} \
101 STAGING_INCDIR=${STAGING_INCDIR} \
102 STAGING_BASELIBDIR=${STAGING_BASELIBDIR} \
103 DESTDIR=${D} LIBDIR=${libdir}
104
105 oe_runmake HOSTPGEN=${STAGING_BINDIR_NATIVE}/python-native/pgen \
106 HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python-native/python \
107 CROSSPYTHONPATH=${STAGING_LIBDIR_NATIVE}/python${PYTHON_MAJMIN}/lib-dynload/ \
108 STAGING_LIBDIR=${STAGING_LIBDIR} \
109 STAGING_INCDIR=${STAGING_INCDIR} \
110 STAGING_BASELIBDIR=${STAGING_BASELIBDIR} \
111 DESTDIR=${D} LIBDIR=${libdir} install
112
113 install -m 0644 Makefile.sysroot ${D}/${libdir}/python${PYTHON_MAJMIN}/config/Makefile
114
115 if [ -e ${WORKDIR}/sitecustomize.py ]; then
116 install -m 0644 ${WORKDIR}/sitecustomize.py ${D}/${libdir}/python${PYTHON_MAJMIN}
117 fi
118
119 oe_multilib_header python${PYTHON_MAJMIN}/pyconfig.h
120}
121
122do_install_append_class-nativesdk () {
123 create_wrapper ${D}${bindir}/python2.7 PYTHONHOME='${prefix}' TERMINFO_DIRS='${sysconfdir}/terminfo:/etc/terminfo:/usr/share/terminfo:/usr/share/misc/terminfo:/lib/terminfo'
124}
125
126SSTATE_SCAN_FILES += "Makefile"
127PACKAGE_PREPROCESS_FUNCS += "py_package_preprocess"
128
129py_package_preprocess () {
130 # copy back the old Makefile to fix target package
131 install -m 0644 ${B}/Makefile.orig ${PKGD}/${libdir}/python${PYTHON_MAJMIN}/config/Makefile
132
133 # Remove references to buildmachine paths in target Makefile and _sysconfigdata
134 sed -i -e 's:--sysroot=${STAGING_DIR_TARGET}::g' -e s:'--with-libtool-sysroot=${STAGING_DIR_TARGET}'::g \
135 ${PKGD}/${libdir}/python${PYTHON_MAJMIN}/config/Makefile \
136 ${PKGD}/${libdir}/python${PYTHON_MAJMIN}/_sysconfigdata.py
137}
138
139require python-${PYTHON_MAJMIN}-manifest.inc
140
141# manual dependency additions
142RPROVIDES_${PN}-core = "${PN}"
143RRECOMMENDS_${PN}-core = "${PN}-readline"
144RRECOMMENDS_${PN}-core_append_class-nativesdk = " nativesdk-python-modules"
145RRECOMMENDS_${PN}-crypt = "openssl"
146
147# package libpython2
148PACKAGES =+ "lib${BPN}2"
149FILES_lib${BPN}2 = "${libdir}/libpython*.so.*"
150
151# catch all the rest (unsorted)
152PACKAGES += "${PN}-misc"
153FILES_${PN}-misc = "${libdir}/python${PYTHON_MAJMIN}"
154RDEPENDS_${PN}-modules += "${PN}-misc"
155RDEPENDS_${PN}-ptest = "${PN}-modules"
156#inherit ptest after "require python-${PYTHON_MAJMIN}-manifest.inc" so PACKAGES doesn't get overwritten
157inherit ptest
158
159# This must come after inherit ptest for the override to take effect
160do_install_ptest() {
161 cp ${B}/Makefile ${D}${PTEST_PATH}
162 sed -e s:LIBDIR/python/ptest:${PTEST_PATH}:g \
163 -e s:LIBDIR:${libdir}:g \
164 -i ${D}${PTEST_PATH}/run-ptest
165}
166
167# catch manpage
168PACKAGES += "${PN}-man"
169FILES_${PN}-man = "${datadir}/man"
170
171BBCLASSEXTEND = "nativesdk"