aboutsummaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/python/python3
AgeCommit message (Collapse)Author
2017-05-18python3: remove two setup.py cross-compile hacksmarquiz/fixes-9338-v3Markus Lehtonen
Remove two unneeded hacks. The first hack ("setup.py: no host headers libs" patch) is not needed because we use cross-compiler (e.g. i586-oe-linux-gcc) which has not been configured with any host system include or library directories, and thus, we don't get any host system directories when running "gcc -E -v". The second hack becomes useless after the first hack has been removed and we get the standard include and lib directories normally from gcc. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2017-05-18python3: fix profile-optimized build of modulesMarkus Lehtonen
Without this the pgo-related compiler flags are not used in cross-builds. [YOCTO #9338] Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2017-05-17python3: add python3-profile-opt recipeMarkus Lehtonen
This patch adds a new recipe that builds a special version of python3 that produces profile data used for optimization. The new recipe directly includes the base python recipe so that they are build in as similar way as possible and this hopefully decreases the recipe maintenance burden, too. Also, its files clash with the "normal" python3 so they cannot be installed in an image at the same time. Normally, profile-guided-optimization in Python is done simply by doing "make profile-opt" which first builds python with profile instrumentation enabled, then runs a profile task to get the profile data, and last, re-builds python with profile data guiding the optimization. However, in our cross-build environment this gets a lot trickier. We need to split out the steps as building is done on the build host but we need to run the second step (i.e. run the profile task) on the target hardware. This patch enables the first step, i.e. building python with profile instrumentation enabled [YOCTO #9338] Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2017-05-17python3-native: support profile optimized buildMarkus Lehtonen
Make it possible to build python3-native with profile directed optimization enabled. The feature is enabled by specifying PYTHON3_NATIVE_PROFILE_OPT = "1" in local.conf. The profile task to be run may be specified with PYTHON3_NATIVE_PROFILE_TASK variable in local.conf, e.g. PYTHON3_NATIVE_PROFILE_TASK = "${S}/Tools/pybench/pybench.py -n 2 --with-gc --with-syscheck" [YOCTO #9338] Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2017-03-28python3: do not hardcode "lib" into site-packages search pathAlexander Kanavin
This was not working in multilib or x32 setups and amazingly, was not noticed until now. The actual modification is in Lib/site.py, the rest is just devtool moving things around in the patch. Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-21python-3.3-multilib.patch: Fixes getpath on multilib configurationsJose Lamego
When using multilib configurations either on arm/arm64 and x86/x86-64 python3 failed to execute due to a failure when looking for its platform independent and dependent libraries. This patch fixes this issue by assigning lib_python to the appropriate macro. [YOCTO #10812] Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com> Signed-off-by: Jose Lamego <jose.a.lamego@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-03-16python3: Remove unused patchesJussi Kukkonen
CVE-2016-5636.patch and use_packed_importlib.patch were removed from SRC_URI as handled in upstream in b192bc02bbf91. Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-01-23python3: Add upstream random.c fixes for recent glibcRichard Purdie
python3 fails to work with recent glibc versions on older hosts, giving errors like: Fatal Python error: getentropy() failed Aborted This breaks buildtools-tarball and hence eSDK. This patch backports the changes to random.c from upstream that address the problem. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-11-30python3: Build and package precompiled modulesDominic Sacré
Remove the patch that was applied in the python3 and python3-native recipes to skip compilation of python modules. Modify generate-manifest-3.5.py to match '__pycache__' directories in FILES_*. This is necessary because Python3 puts .pyc files in '__pycache__' subdirectories one level below the corresponding .py files, whereas in Python2 they used to be right next to the sources. This change significantly reduces the startup overhead of Python3 scripts. For example, on a Cortex-A9, "python3 -c pass" took 0.40s before, and 0.19s after. Signed-off-by: Dominic Sacré <dominic.sacre@gmx.de> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-09-28python: fix CVE-2016-1000110Mingli Yu
Backport patch to fix CVE-2016-1000110 from python upstream: for python2.7 https://hg.python.org/cpython/rev/ba915d561667/ for python3 https://hg.python.org/cpython/rev/a0ac52ed8f79 Signed-off-by: Mingli Yu <Mingli.Yu@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-08-10python3-native: Upgrade from 3.5.1 to 3.5.2Alejandro Hernandez
LICENSE did not change, only dates were changed Rebases: - 000-cross-compile.patch - python-3.3-multilib.patch Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-07-20python3: Security fix CVE-2016-5636Armin Kuster
Affects python3 < 3.5.1 Base Score (4.4) Medium Signed-off-by: Armin Kuster <akuster@mvista.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-07-08meta: update patch metadataRoss Burton
Enforce the correct tag names across all of oe-core for consistency. Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-06-02python3: drop 110-enable-zlib.patchAlexander Kanavin
With the patch, the zlib extension wasn't built at all. Without the patch, it gets build just fine. Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-06-01python3: add = to -L linking option only when the path is absoluteAlexander Kanavin
Previously it was added also when the path was relative and not prefixed with ./, which was causing issues with building numpy. Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
2016-05-30python-native, python3-native: remove the use of exported HOST_SYS and ↵Alexander Kanavin
BUILD_SYS variables The code that utilized them was superseded by the code (in the same patch!) that is utilizing STAGING_LIBDIR/STAGING_INCDIR, and wasn't correct in the first place as HOST_SYS is not necessarily the same as the sysroot directory name. Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
2016-03-23python(3): Disable tkinterMartin Jansa
* restore changes from: http://git.openembedded.org/openembedded-core/commit/?id=53ae544cfdac22c82af452b8c7ebe6664296bd9b * which were shamelessly removed in upgrade to 2.7.9: http://git.openembedded.org/openembedded-core/commit/?id=d4ad95f0d5f08891637c644e85b09da9c4585059 and then spread to python3 as well * fixes following issues reported by test-dependencies WARN: python3: python3-tkinter rdepends on glibc, but it isn't a build dependency? WARN: python3: python3-tkinter rdepends on libpython3, but it isn't a build dependency? WARN: python3: python3-tkinter rdepends on tcl-lib, but it isn't a build dependency? WARN: python: python-tkinter rdepends on glibc, but it isn't a build dependency? WARN: python: python-tkinter rdepends on libpython2, but it isn't a build dependency? WARN: python: python-tkinter rdepends on tcl-lib, but it isn't a build dependency? and following QA warnings in normal builds: python-2.7.11: python-tkinter rdepends on tcl-lib, but it isn't a build dependency, missing tcl in DEPENDS or PACKAGECONFIG? [build-deps] python-2.7.11: /usr/lib/python2.7/lib-dynload/_tkinter.so contained in package python-tkinter requires libtk8.6.so, but no providers found in RDEPENDS_python-tkinter? [file-rdeps] python3-3.5.1: python3-tkinter rdepends on tcl-lib, but it isn't a build dependency, missing tcl in DEPENDS or PACKAGECONFIG? [build-deps] python3-3.5.1: /usr/lib/python3.5/lib-dynload/_tkinter.cpython-35m-arm-linux-gnueabi.so contained in package python3-tkinter requires libtk8.6.so, but no providers found in RDEPENDS_python3-tkinter? [file-rdeps] Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-12python3: fix do_configure check platform triplet errorHongxu Jia
For p1022ds bsp, the MULTIARCH is powerpc-linux-gnuspev1 and python3 did not recognize the extra 'v1' which caused python3 configure error for the platform triplet. Q:Why Python3 check platform triplet? A:Under Linux, GNU/KFreeBSD and the Hurd, C extensions now include the architecture triplet in the extension name, to make it easy to test builds for different ABIs in the same working tree. vim config.log ... EXT_SUFFIX='.cpython-35m-powerpc-linux-gnuspe.so' ... Here is the generated C extensions which take platform triplet into account. ... |image/usr/lib/python3.5/lib-dynload/_datetime.cpython-35m-powerpc-linux-gnuspe.so ... https://bugs.python.org/issue22980 https://www.python.org/dev/peps/pep-3149/ https://bugs.python.org/review/22980/patch/14593/54808 [YOCTO #9226] Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-09python3: fix patching get_python_lib() in distutils/sysconfig.pyAlexander Kanavin
Previous, two things were wrong: 1) lib_basename was set from STAGING_LIBDIR only if prefix parameter was empty or missing 2) if prefix was not empty, lib_basename reverted to sys.lib, even if STAGING_LIBDIR should've overriden it Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-09python3-native: use the previous version of python-config scriptAlexander Kanavin
In python 3.4 python-config was rewritten in shell, ironically to support cross-compilation: https://bugs.python.org/issue16235 This new shell version is broken in several ways, and doesn't have our oe-specific tweaks. Let's revert to the old script, which is still provided. Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-07python3: remove optimize by default patchRoss Burton
Python 3 resurrected the default to optimised patch, on the rationale that embedded systems want all the performance they can get. Unfortunately the only impact Python "optimisation" has is to remove all asserts which can be actively harmful, so remove this patch. Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-01-20python3: Minor upgrade 3.5.0 -> 3.5.1Alejandro Hernandez
Rebased: - 000-cross-compile.patch Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-07python3: fix installed-vs-shipped when 64bit + multilibRobert Yang
Fixed: python3-3.5.0: python3: Files/directories were installed but not shipped in any package: /usr/lib /usr/lib/python3.5 /usr/lib/python3.5/config-3.5m /usr/lib/python3.5/config-3.5m/python.o /usr/lib/python3.5/config-3.5m/Setup.local /usr/lib/python3.5/config-3.5m/Setup /usr/lib/python3.5/config-3.5m/python-config.py /usr/lib/python3.5/config-3.5m/install-sh /usr/lib/python3.5/config-3.5m/config.c.in /usr/lib/python3.5/config-3.5m/makesetup /usr/lib/python3.5/config-3.5m/Setup.config /usr/lib/python3.5/config-3.5m/config.c /usr/lib/python3.5/config-3.5m/Makefile /usr/lib/python3.5/config-3.5m/libpython3.5m.a Please set FILES such that these items are packaged. Alternatively if they are unneeded, avoid installing them or delete them within do_install. python3: 14 installed and not shipped files. [installed-vs-shipped] Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-12-01python3: Upgrade from 3.4.3 to 3.5Alejandro Hernandez
python3-native_3.4.3.bb -> python3-native_3.5.0.bb: - changed version - changed cheksum - no license change, just dates python3_3.4.3.bb -> python3_3.5.0.bb: - changed version - changed cheksum - no license change, just dates New: - use_packed_importlib.patch: Fixes importlib on cross-compile environments Rebased: - Manifest - 000-cross-compile.patch - 020-dont-compile-python-files.patch - 04-default-is-optimized.patch - python-3.3-multilib.patch - distutils3-base.bbclass - distutils3-native-base.bbclass - python3native.bbclass Upstream: - makerace.patch Misc: - pip2 is handled as default on major distros, modified python3-pip to leave /usr/bin/pip available for pip2 - Fixed importing pip3 from python3 interpreter Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-09-12meta: Fix Upstream-Status statementsRoss Burton
Fix a variety of problems such as typos, bad punctuations, or incorrect Upstream-Status values. Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-01python3: delete patches that don't get applied anywhereDominic Sacré
These patches are not referenced in any of the Python recipes. Signed-off-by: Dominic Sacré <dominic.sacre@gmx.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-01python3: detect libraries in STAGING_LIBDIRDominic Sacré
Patch setup.py so that the detect_modules() function looks for required libraries and headers in STAGING_LIBDIR / STAGING_INCDIR. Without this patch, several extension modules are not built, even though their dependencies are present in the compiler's search paths. The result is the following warning, and ultimately incomplete packages: | The necessary bits to build these optional modules were not found: | _bz2 _curses_panel _dbm | _gdbm _lzma _sqlite3 | nis readline zlib | To find the necessary bits, look in setup.py in detect_modules() for the module's name. With the Python 3.3 version of the recipe, at least some of these modules were built, because STAGING_LIBDIR happened to be in the search path by coincidence. Due to changes to distutils in Python 3.4, this is no longer the case. A previous patch that only affects the search paths for SSL is dropped, as this one is a more complete fix for [YOCTO #7768]. Part of the fix for [YOCTO #8048]. Signed-off-by: Dominic Sacré <dominic.sacre@gmx.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-06-08python3-io: Fixes compilation of python3 ssl moduleAlejandro Hernandez
During python3 compilation, the module ssl was being skippped due to the fact that the compilation script couldnt find the required files, this patch fixes setup.py so it looks for the files in the correct directory, hence fixing its compilation and installation. [YOCTO #7768] Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com>
2015-05-05python3-native: Fix pip install issue due to unclean build directoryAlejandro Hernandez
When installing python3-native sometimes pips default build directory (which is on the host and is user dependant) is left unclean, due to this, when python3-core is being installed it tries to use the same directory producing an error, this explicitly removes what the previous installation might have left behind, fixing the issue. Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-05-05python3: Upgrade from 3.3.3 to 3.4.2Alejandro Hernandez
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] Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com>
2015-04-30python3: remove sys_platform_is_now_always_linux2.patchRobert Yang
It is aready in the source. Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-01-23python3: fix for cross compilingRobert Yang
Fixed: * python3 has introduced _PYTHON_PROJECT_BASE which is used for separate B and S, but it doesn't work when compile Modules, the target python3 runs python3-native's sysconfig to get srcdir which is the native's, there would be errors when native's srcdir has been removed, add _PYTHON_PROJECT_SRC to fix the problem. * Check cross_compiling when get FLAGS Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
2014-11-25python3: several fixes for cross compilingJackie Huang
* Add a patch to use CROSSPYTHONPATH as PYTHONPATH for PYTHON_FOR_BUILD, otherwise CROSSPYTHONPATH is never used, and it use the path in target builds to find libraries. * Add a patch to avoid finding host headers and libs * Fix a typo: s/python-native3/python3-native/ Signed-off-by: Jackie Huang <jackie.huang@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2014-06-30python3: fix builtins importsRoxana
The intent of this code is to generate things like -L=/usr/lib/foo so for paths which start with "/" we should appent the "=". We should not do this for ".". On some recent versions of binutils or patchsets on some recent distros this appears to work differently and causes build failures, for example on Ubuntu 14.04 LTS. The simple fix is to check for "." as the path prefix. [YOCTO #6467]. Signed-off-by: Roxana <roxana.ciobanu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-05-08python3: Revert python-config to distutils.sysconfigTyler Hall
The newer sysconfig module shares some code with distutils.sysconfig, but the same modifications as in 12-distutils-prefix-is-inside-staging-area.patch makes distutils.sysconfig affect the native runtime as well as cross building. Use the old, patched implementation which returns paths in the staging directory and for the target, as appropriate. This change reverts this upstream patch http://hg.python.org/cpython/diff/712970b019f7/Misc/python-config.in Signed-off-by: Tyler Hall <tylerwhall@gmail.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2014-05-07python3/gcc/autoconf: Fix Upstream-Status in some patches I authoredRichard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-04-04python: fix build error with Readline 6.3Chong Lu
Backport two patches from upstream: use new readline function types (closes #20374) Issue #20374: Avoid compiler warnings when compiling readline with libedit. [YOCTO #6107] Signed-off-by: Chong Lu <Chong.Lu@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-02-28python3: Fix make raceRichard Purdie
This fixes a race which was showing up on the autobuilder (see patch header). Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-02-28python3: Fix race condition at high parallelism factorKhem Raj
Backport a patch to fix race condition as reported here https://bugzilla.yoctoproject.org/show_bug.cgi?id=5884 [YOCTO #5884] Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2014-02-02python3: Add target and native recipesKhem Raj
3.3.3 is latest bugfix release in 3.3 series License text is changed to reflect year and prev releases +++ ../Python-3.3.2/LICENSE 2013-05-15 09:32:54.000000000 -0700 @@ -74,7 +74,9 @@ 3.2.1 3.2 2011 PSF yes 3.2.2 3.2.1 2011 PSF yes 3.2.3 3.2.2 2012 PSF yes + 3.2.4 3.2.3 2013 PSF yes 3.3.0 3.2 2012 PSF yes + 3.3.1 3.3.0 2013 PSF yes Footnotes: @@ -110,8 +112,8 @@ distribute, and otherwise use Python alone or in any derivative version, provided, however, that PSF's License Agreement and PSF's notice of copyright, i.e., "Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, -2011, 2012 Python Software Foundation; All Rights Reserved" are retained in Python -alone or in any derivative version prepared by Licensee. +2011, 2012, 2013 Python Software Foundation; All Rights Reserved" are retained +in Python alone or in any derivative version prepared by Licensee. We use native python in disutils bbclass and this needs to peek into target sysroot when building plugins in cross environment. Otherwise anything that inherits distutils3.bbclass will not build. Fix host include contamination issue Let compiler append sysroot to include path if it can Fix the compiler invocation and linker flags when cross compiling The details are in patch header. This should fix the QA errors about host contamination Add virtual/libintl to dep list There is use of libintl.h but we dont express the dependency Add lzma dependency for python3-misc Fixes and from test-dependencies.sh run there is undeterministic lzma dependency: WARN: packages/armv5te-oe-linux-gnueabi/python3/python3-misc/latest lost dependency on liblzma Fix staging warnings due to duplicate install WARNING: The recipe python3 is trying to install files into a shared area when those files already exist. Those files and their manifest location are: builds/world/tmp/sysroots/qemux86-64/usr/include/python3.3m/pyconfig.h builds/world/tmp/sysroots/qemux86-64/usr/lib/libpython3.3m.so.1.0 builds/world/tmp/sysroots/qemux86-64/usr/lib/libpython3.3m.so builds/world/tmp/sysroots/qemux86-64/usr/lib/python3.3/config/Makefile Let compiler search includes relative to sysroot This makes it cross compilable and assumption on hardcoded paths is fixed. Errors like below would appear if ncursesw is installed on build host cc1: warning: include location "/usr/include/ncursesw" is unsafe for cross-compilation [-Wpoison-system-directories] Signed-off-by: Khem Raj <raj.khem@gmail.com> Fix linking not happening issue in modules We need to tweak CONFIGURE_LDFLAGS for python3 instead of LDFLAGS directly Add second compile stage which uses original makefile Signed-off-by: Khem Raj <raj.khem@gmail.com>