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