summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/python/python3_3.4.3.bb
diff options
context:
space:
mode:
authorAlejandro Hernandez <alejandro.hernandez@linux.intel.com>2015-05-12 15:09:50 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-05-15 17:44:59 +0100
commit79a2fc2f6c84265baefcdb6bb74c4da3b8b600d4 (patch)
treeeb57ba6cbcac9168cd726154346db009dbdde6f0 /meta/recipes-devtools/python/python3_3.4.3.bb
parent1237db6ee335f5b4cbdad98da3fff5284afb603b (diff)
downloadpoky-79a2fc2f6c84265baefcdb6bb74c4da3b8b600d4.tar.gz
python3: Upgrade from 3.4.2 to 3.4.3
Modifies: python3-native_3.4.2.bb -> python3-native_3.4.3.bb: Updates checksums, LICENSE did not change, dates were updated. python3_3.4.2.bb -> python3_3.4.3.bb: Updates checksums, LICENSE did not change, dates were updated. generate-manifest-3.4.py: fixes asyncio and net-tools. python-3.4-manifest.inc: fixes asyncio and net-tools. This upgrade contains a fix for CVE-2014-9365. (From OE-Core rev: 94fc3b199c169b1da850c0aade530ddcf1544d81) 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/python3_3.4.3.bb')
-rw-r--r--meta/recipes-devtools/python/python3_3.4.3.bb218
1 files changed, 218 insertions, 0 deletions
diff --git a/meta/recipes-devtools/python/python3_3.4.3.bb b/meta/recipes-devtools/python/python3_3.4.3.bb
new file mode 100644
index 0000000000..bee9e6f8ec
--- /dev/null
+++ b/meta/recipes-devtools/python/python3_3.4.3.bb
@@ -0,0 +1,218 @@
1require recipes-devtools/python/python.inc
2
3DEPENDS = "python3-native libffi bzip2 db gdbm openssl readline sqlite3 zlib virtual/libintl xz"
4PR = "${INC_PR}.0"
5PYTHON_MAJMIN = "3.4"
6PYTHON_BINABI= "${PYTHON_MAJMIN}m"
7DISTRO_SRC_URI ?= "file://sitecustomize.py"
8DISTRO_SRC_URI_linuxstdbase = ""
9SRC_URI = "http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.xz \
10file://12-distutils-prefix-is-inside-staging-area.patch \
11file://python-config.patch \
12file://000-cross-compile.patch \
13file://020-dont-compile-python-files.patch \
14file://030-fixup-include-dirs.patch \
15file://070-dont-clean-ipkg-install.patch \
16file://080-distutils-dont_adjust_files.patch \
17file://110-enable-zlib.patch \
18file://130-readline-setup.patch \
19file://150-fix-setupterm.patch \
20file://0001-h2py-Fix-issue-13032-where-it-fails-with-UnicodeDeco.patch \
21file://makerace.patch \
22${DISTRO_SRC_URI} \
23"
24
25SRC_URI += "\
26 file://03-fix-tkinter-detection.patch \
27 file://04-default-is-optimized.patch \
28 file://avoid_warning_about_tkinter.patch \
29 file://cgi_py.patch \
30 file://host_include_contamination.patch \
31 file://python-3.3-multilib.patch \
32 file://shutil-follow-symlink-fix.patch \
33 file://sysroot-include-headers.patch \
34 file://unixccompiler.patch \
35 file://avoid-ncursesw-include-path.patch \
36 file://python3-use-CROSSPYTHONPATH-for-PYTHON_FOR_BUILD.patch \
37 file://python3-setup.py-no-host-headers-libs.patch \
38 file://sysconfig.py-add-_PYTHON_PROJECT_SRC.patch \
39 file://setup.py-check-cross_compiling-when-get-FLAGS.patch \
40 "
41SRC_URI[md5sum] = "7d092d1bba6e17f0d9bd21b49e441dd5"
42SRC_URI[sha256sum] = "b5b3963533768d5fc325a4d7a6bd6f666726002d696f1d399ec06b043ea996b8"
43
44LIC_FILES_CHKSUM = "file://LICENSE;md5=dd98d01d471fac8d8dbdd975229dba03"
45
46S = "${WORKDIR}/Python-${PV}"
47
48inherit autotools multilib_header python3native pkgconfig
49
50CONFIGUREOPTS += " --with-system-ffi "
51
52CACHED_CONFIGUREVARS = "ac_cv_have_chflags=no \
53 ac_cv_have_lchflags=no \
54 ac_cv_have_long_long_format=yes \
55 ac_cv_buggy_getaddrinfo=no \
56 ac_cv_file__dev_ptmx=yes \
57 ac_cv_file__dev_ptc=no \
58"
59# The 3 lines below are copied from the libffi recipe, ctypes ships its own copy of the libffi sources
60#Somehow gcc doesn't set __SOFTFP__ when passing -mfloatabi=softp :(
61TARGET_CC_ARCH_append_armv6 = " -D__SOFTFP__"
62TARGET_CC_ARCH_append_armv7a = " -D__SOFTFP__"
63TARGET_CC_ARCH += "-DNDEBUG -fno-inline"
64EXTRA_OEMAKE += "CROSS_COMPILE=yes"
65EXTRA_OECONF += "CROSSPYTHONPATH=${STAGING_LIBDIR_NATIVE}/python${PYTHON_MAJMIN}/lib-dynload/ --without-ensurepip"
66
67export CROSS_COMPILE = "${TARGET_PREFIX}"
68export _PYTHON_PROJECT_BASE = "${B}"
69export _PYTHON_PROJECT_SRC = "${S}"
70
71# No ctypes option for python 3
72PYTHONLSBOPTS = ""
73
74do_configure_append() {
75 rm -f ${S}/Makefile.orig
76 autoreconf -Wcross --verbose --install --force --exclude=autopoint ../Python-${PV}/Modules/_ctypes/libffi
77}
78
79do_compile() {
80 # regenerate platform specific files, because they depend on system headers
81 cd ${S}/Lib/plat-linux*
82 include=${STAGING_INCDIR} ${STAGING_BINDIR_NATIVE}/python3-native/python3 \
83 ${S}/Tools/scripts/h2py.py -i '(u_long)' \
84 ${STAGING_INCDIR}/dlfcn.h \
85 ${STAGING_INCDIR}/linux/cdrom.h \
86 ${STAGING_INCDIR}/netinet/in.h \
87 ${STAGING_INCDIR}/sys/types.h
88 sed -e 's,${STAGING_DIR_HOST},,g' -i *.py
89 cd -
90
91 # remove hardcoded ccache, see http://bugs.openembedded.net/show_bug.cgi?id=4144
92 sed -i -e s,ccache\ ,'$(CCACHE) ', Makefile
93
94 # remove any bogus LD_LIBRARY_PATH
95 sed -i -e s,RUNSHARED=.*,RUNSHARED=, Makefile
96
97 if [ ! -f Makefile.orig ]; then
98 install -m 0644 Makefile Makefile.orig
99 fi
100 sed -i -e 's,^CONFIGURE_LDFLAGS=.*,CONFIGURE_LDFLAGS=-L. -L${STAGING_LIBDIR},g' \
101 -e 's,libdir=${libdir},libdir=${STAGING_LIBDIR},g' \
102 -e 's,libexecdir=${libexecdir},libexecdir=${STAGING_DIR_HOST}${libexecdir},g' \
103 -e 's,^LIBDIR=.*,LIBDIR=${STAGING_LIBDIR},g' \
104 -e 's,includedir=${includedir},includedir=${STAGING_INCDIR},g' \
105 -e 's,^INCLUDEDIR=.*,INCLUDE=${STAGING_INCDIR},g' \
106 -e 's,^CONFINCLUDEDIR=.*,CONFINCLUDE=${STAGING_INCDIR},g' \
107 Makefile
108 # save copy of it now, because if we do it in do_install and
109 # then call do_install twice we get Makefile.orig == Makefile.sysroot
110 install -m 0644 Makefile Makefile.sysroot
111
112 oe_runmake HOSTPGEN=${STAGING_BINDIR_NATIVE}/python3-native/pgen \
113 HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python3-native/python3 \
114 STAGING_LIBDIR=${STAGING_LIBDIR} \
115 STAGING_BASELIBDIR=${STAGING_BASELIBDIR} \
116 STAGING_INCDIR=${STAGING_INCDIR} \
117 BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \
118 LIB=${baselib} \
119 ARCH=${TARGET_ARCH} \
120 OPT="${CFLAGS}" libpython3.so
121
122 oe_runmake HOSTPGEN=${STAGING_BINDIR_NATIVE}/python3-native/pgen \
123 HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python3-native/python3 \
124 STAGING_LIBDIR=${STAGING_LIBDIR} \
125 STAGING_INCDIR=${STAGING_INCDIR} \
126 STAGING_BASELIBDIR=${STAGING_BASELIBDIR} \
127 BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \
128 LIB=${baselib} \
129 ARCH=${TARGET_ARCH} \
130 OPT="${CFLAGS}"
131}
132
133do_install() {
134 # make install needs the original Makefile, or otherwise the inclues would
135 # go to ${D}${STAGING...}/...
136 install -m 0644 Makefile.orig Makefile
137
138 install -d ${D}${libdir}/pkgconfig
139 install -d ${D}${libdir}/python${PYTHON_MAJMIN}/config
140
141 # rerun the build once again with original makefile this time
142 # run install in a separate step to avoid compile/install race
143 oe_runmake HOSTPGEN=${STAGING_BINDIR_NATIVE}/python3-native/pgen \
144 HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python3-native/python3 \
145 STAGING_LIBDIR=${STAGING_LIBDIR} \
146 STAGING_INCDIR=${STAGING_INCDIR} \
147 STAGING_BASELIBDIR=${STAGING_BASELIBDIR} \
148 BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \
149 LIB=${baselib} \
150 ARCH=${TARGET_ARCH} \
151 DESTDIR=${D} LIBDIR=${libdir}
152
153 oe_runmake HOSTPGEN=${STAGING_BINDIR_NATIVE}/python3-native/pgen \
154 HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python3-native/python3 \
155 STAGING_LIBDIR=${STAGING_LIBDIR} \
156 STAGING_INCDIR=${STAGING_INCDIR} \
157 STAGING_BASELIBDIR=${STAGING_BASELIBDIR} \
158 BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \
159 LIB=${baselib} \
160 ARCH=${TARGET_ARCH} \
161 DESTDIR=${D} LIBDIR=${libdir} install
162
163 install -m 0644 Makefile.sysroot ${D}/${libdir}/python${PYTHON_MAJMIN}/config/Makefile
164
165 if [ -e ${WORKDIR}/sitecustomize.py ]; then
166 install -m 0644 ${WORKDIR}/sitecustomize.py ${D}/${libdir}/python${PYTHON_MAJMIN}
167 fi
168
169 oe_multilib_header python${PYTHON_BINABI}/pyconfig.h
170}
171
172do_install_append_class-nativesdk () {
173 create_wrapper ${D}${bindir}/python${PYTHON_MAJMIN} TERMINFO_DIRS='${sysconfdir}/terminfo:/etc/terminfo:/usr/share/terminfo:/usr/share/misc/terminfo:/lib/terminfo'
174}
175
176SSTATE_SCAN_FILES += "Makefile"
177PACKAGE_PREPROCESS_FUNCS += "py_package_preprocess"
178
179py_package_preprocess () {
180 # copy back the old Makefile to fix target package
181 install -m 0644 Makefile.orig ${PKGD}/${libdir}/python${PYTHON_MAJMIN}/config/Makefile
182 # Remove references to buildmachine paths in target Makefile
183 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
184}
185
186require python-${PYTHON_MAJMIN}-manifest.inc
187
188# manual dependency additions
189RPROVIDES_${PN}-core = "${PN}"
190RRECOMMENDS_${PN}-core = "${PN}-readline"
191RRECOMMENDS_${PN}-crypt = "openssl"
192RRECOMMENDS_${PN}-crypt_class-nativesdk = "nativesdk-openssl"
193
194FILES_${PN}-2to3 += "${bindir}/2to3-${PYTHON_MAJMIN}"
195FILES_${PN}-pydoc += "${bindir}/pydoc${PYTHON_MAJMIN} ${bindir}/pydoc3"
196FILES_${PN}-idle += "${bindir}/idle3 ${bindir}/idle${PYTHON_MAJMIN}"
197
198PACKAGES =+ "${PN}-pyvenv"
199FILES_${PN}-pyvenv += "${bindir}/pyvenv-${PYTHON_MAJMIN} ${bindir}/pyvenv"
200
201# package libpython3
202PACKAGES =+ "libpython3 libpython3-staticdev"
203FILES_libpython3 = "${libdir}/libpython*.so.*"
204FILES_libpython3-staticdev += "${libdir}/python${PYTHON_MAJMIN}/config-${PYTHON_BINABI}/libpython${PYTHON_BINABI}.a"
205
206# catch debug extensions (isn't that already in python-core-dbg?)
207FILES_${PN}-dbg += "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/.debug"
208
209# catch all the rest (unsorted)
210PACKAGES += "${PN}-misc"
211RDEPENDS_${PN}-misc += "${PN}-core"
212FILES_${PN}-misc = "${libdir}/python${PYTHON_MAJMIN}"
213
214# catch manpage
215PACKAGES += "${PN}-man"
216FILES_${PN}-man = "${datadir}/man"
217
218BBCLASSEXTEND = "nativesdk"