aboutsummaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/python
AgeCommit message (Collapse)Author
2018-09-13python: we use system ffi so no need to autoreconf in-tree libffiRoss Burton
For target Python we use the libffi that we build, so we don't need to autoreconf the in-tree libffi. Signed-off-by: Ross Burton <ross.burton@intel.com>
2018-09-13python3: remove redundant assignmentsRoss Burton
_PYTHON_PROJECT_BASE and _PYTHON_PROJECT_SRC appear to be set in setup.py from the source directory and build directory correctly, so this is redundant. Signed-off-by: Ross Burton <ross.burton@intel.com>
2018-09-13python3: split common assignments into a dedicated python3.incRoss Burton
Instead of including the Py2 python.inc and having to undo some of the assignments, create a new python3.inc to hold the common configuration. Over time we can move more from the recipes into this file to unify the target and native recipes. Signed-off-by: Ross Burton <ross.burton@intel.com>
2018-09-13python3{,-native}: backport openssl 1.1.1 compatibility changesAnuj Mittal
Backport changes from 3.7/3.6 to fix failing python3 ssl test suite. Fixes [YOCTO #12919] Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
2018-09-13python3{,native}: update to 3.5.6Anuj Mittal
Includes changes: 76aa2c0a9a bpo-33216: Clarify the documentation for CALL_FUNCTION_* (#8338) 1b141b9553 Doc: Backport language switcher (bpo-33700, bpo-31045) (#8048) f381cfe07d [3.5] bpo-33001: Prevent buffer overrun in os.symlink (GH-5989) (#5991) 937ac1fe06 [3.5] bpo-32981: Fix catastrophic backtracking vulns (GH-5955) (#6034) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
2018-09-11python3: fix multiprocessingRoss Burton
glibc 2.28 slightly changed the behaviour of sigaddset() which broke multiprocessing. Backport a patch from Python 3.6 to solve this. Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-09-11python3: remove patch that inadvertently disables xattrsRoss Burton
This patch dates back to the addition of the Python 3 recipe to oe-core, and as listxattr is never added to supports_follow_symlinks the extended attribute support will never be enabled. Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-09-11python3: remove redundant patchRoss Burton
None of the Python invocations that this changes are actually called, and there's no need to provide a HOSTPGEN variable when the recipe can just override PGEN directly. Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-09-11python3: fix ftplib with TLS 1.3Ross Burton
With OpenSSL 1.1.x TLS 1.3 can be used, so backport a patch from Python 3.6 to fix the ftplib unit test. Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-09-07python3: use regrtest instead of PyBench for profile-guided-optimisationRoss Burton
PyBench takes a long time to run, also upstream have removed it from Python and instead use test.regrtest —pgo to profile the interpreter. The results are good: not only does Python compile faster (~300s vs ~600s on my machine) but Phoronix’s PyBench test runs in 2130ms compared to 2229ms when using PyBench to train (and 2345ms with PGO disabled). Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-09-07python3: don't use runtime checks to identify float endianismRoss Burton
Python uses AC_RUN_IFELSE to determine the byte order for floats and doubles, and falls back onto "I don't know" if it can't run code. This results in crippled floating point numbers in Python, and the regression tests fail. Instead of running code, take a macro from autoconf-archive which compiles C with a special double in which has an ASCII representation, and then greps the binary to identify the format. Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-09-06python3: trim PGO patchRoss Burton
There's no need to delete the line that removes the profile data, as we're not using it after the build. This reduces the size of the patch, making it easier to maintain. Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-09-06python3: add toggle for profile-guided-optimisationRoss Burton
Add a PACKAGECONFIG for profile-guided-optimisation, and default to whether qemu-usermode is available. Move --enable-optimizations to the pgo optimisation as all this currently does is use the PGO rules, causing a performance hit if PGO isn't actually used. Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-09-06python3: generalise make commandsRoss Burton
We're repeating the same make invocation over and over, twice without setting OPT=${CFLAGS} which doesn't seem right. Centralise the make invocation to clean up the tasks. Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-09-06python3: fix indentation on create_manifest3Alejandro Enedino Hernandez Samaniego
Signed-off-by: Alejandro Enedino Hernandez Samaniego <alejandr@xilinx.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-09-06python3-manifest: Avoid duplicate modulesAlejandro Enedino Hernandez Samaniego
There was a bug where modules were being added twice to the core package, this patches the manifest to reflect the fix on the create_manifest script. Signed-off-by: Alejandro Enedino Hernandez Samaniego <alejandr@xilinx.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-09-06python3: Clean up create manifest scriptAlejandro Enedino Hernandez Samaniego
This patch intends to clean up the whole create_manifest script/task for python3. This is an effort to make the code more human friendly and facilitate adoption, it not only cleans up the code but it also improves comments, it should also be easier to upgrade the manifest after each python3 upgrade now, with these fixes the transition to python 3.7 should be seamless. It fixes a rather harmless bug where module dependencies were being added twice to the core package and adds tests and sqlite3-tests as special packages since we want specific dependencies on those. It also fixes a bug that happened on a few packages that contained a directory with the same name as the module itself e.g. asyncio, where the script avoided checking that module for dependencies. Lastly, it improves the output, it errors out if a module is found on more than one package, which is what usually happens when python upstream introduces a new file, hence why the current manifest is unaware of, it is better to exit with an error because otherwise the user wouldnt know if anything went wrong unless the output of the script was checked manually. Signed-off-by: Alejandro Enedino Hernandez Samaniego <alejandr@xilinx.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-09-06python3: Modify create_manifest to make it versionlessAlejandro Enedino Hernandez Samaniego
This patch improves the create_manifest script by making it use PYTHON_MAJMIN instead of hard coded paths containing the version number when looking at the necessary modules for every package, the script should now be independent of the python(3) version on which were working Signed-off-by: Alejandro Enedino Hernandez Samaniego <alejandr@xilinx.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-09-06python3-manifest: Use PYTHON_MAJMIN instead of hard coded versionAlejandro Enedino Hernandez Samaniego
Currently the manifest contains hard coded paths with the version number, e.g. python3.5, this patch changes the paths to use the variable PYTHON_MAJMIN instead, this should make the python upgrades easier Signed-off-by: Alejandro Enedino Hernandez Samaniego <alejandr@xilinx.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-09-05python: Run pybench once for optimisation task in pgoRoss Burton
There is no good reason to loop 10 times on the test since the profile optimisation won't change between runs, we don't need/want a statistical average. This is just burning cpu cycles, just make 1 run. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-08-21python/python3: add virtual/crypt to DEPENDSHongxu Jia
Since `6146b8c glibc: Disable crypt support in glibc' in oe-core, python2/3 could not find symbol crypt which caused import crypt failed. [snip] >>> import crypt Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/lib64/python3.5/crypt.py", line 3, in <module> import _crypt ImportError: /usr/lib64/python3.5/lib-dynload/_crypt.cpython-35m-x86_64-linux-gnu.so: undefined symbol: crypt [snip] Add virtual/crypt to DEPENDS, and python's build system (setup.py) will search libcrypt.so in recipe-sysroot and add `-lcrypt' if it exists. Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-08-20python3-git: update to version 2.1.11Derek Straka
Update to the latest stable release Signed-off-by: Derek Straka <derek@asterius.io> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-08-20python3-gitdb: update to version 2.0.4Derek Straka
Update to the latest stable release Signed-off-by: Derek Straka <derek@asterius.io> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-08-20python3-pip: update to version 18.0Derek Straka
License-Update: Update checksum for copyright year changes Update to the latest stable version Signed-off-by: Derek Straka <derek@asterius.io> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-08-16python3: enable profile optimized buildsAnuj Mittal
Enable profile guided optimization (pgo) for python3. Enabling pgo in python is generally as simple as invoking the target profile-opt which: - builds python binaries with profile instrumentation enabled, - runs a specific profile task using that python to get the profile data and, - feeds the compiler with this profile data and rebuilds python. This change invokes qemu-user for the second step of running a profile task using target python. Depending on how long profile task takes to run, this might add a significant time to compilation (which would be true for native builds too). The default profile task can be changed by the users depending on what makes sense for their use case (or can be left empty). In case qemu-user isn't supported, profile task won't be run. Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-08-02python3-testtools: 2.2.0 -> 2.3.0Robert Yang
Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-08-02python3-subunit: 1.1.0 -> 1.3.0Robert Yang
The license file changes from README to README.rst, and the lines which contains license info is from 1 to 20. The license is still Apache-2.0. Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-08-02python-pbr: 3.1.1 -> 4.2.0Robert Yang
Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-07-31python3: fix depends of python3-testsMarkus Lehtonen
Make the tests subpackage depend on all modules as test.regrtest uses most (if not all) of them. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2018-07-30python3-subunit: add it for oeqaRobert Yang
- It is required by oeqa, add it so that we can add nativesdk-python3-subunit to buildtools-tarball. - The original one is python-subunit_1.1.0.bb which is from meta-openstack layer, I divided it into python-subunit.inc and python3-subunit_1.1.0.bb and extended to nativesdk. Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2018-07-30python3-testtools: add it for oeqaRobert Yang
- It is required by oeqa, add it so that we can add nativesdk-python3-testtools to buildtools-tarball. - The original one is python-testtools_2.3.0.bb which is from meta-openstack layer, I divided it into python-testtools.inc and python3-testtools_2.2.0.bb, and extended to nativesdk. Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2018-07-30python3-pbr: add it for python3-testtoolsRobert Yang
- The python3-testtools RDEPENDS on it. - It is from meta-python, I extended it to nativesdk. Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2018-07-30python3-extras: add it for python3-testtoolsRobert Yang
- The python3-testtools RDEPENDS on it. - The original one is python-extras_1.0.0.bb which is from meta-openstack layer, I divided it into python-extras.inc and python3-extras_1.0.0.bb, and extended to nativesdk. Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2018-07-26python3-pip: clean up obsoleteHongxu Jia
Since unify var-DISTUTILS_INSTALL_ARGS in distutils and setuptools, - The local DISTUTILS_INSTALL_ARGS assignment is obsolete; - The site.py is not be generated any more; - The layout is in a standard pip dir (such as /usr/lib/python3.5/site- packages/pip rather than /lib/python3.5/site-packages/pip-10.0.1- py3.5.egg/pip), the pth file is not required; `#!/usr/bin/env python3' is already used, do not manually sed. [YOCTO #8446] Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2018-07-26python-setuptools.inc: clean up useless local var-DISTUTILS_INSTALL_ARGSHongxu Jia
Since unify var-DISTUTILS_INSTALL_ARGS in distutils and setuptools, The local var-DISTUTILS_INSTALL_ARGS broke do_install ... error: option --script-dir not recognized ERROR: python3 setup.py install execution failed. ... [YOCTO #8446] Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2018-07-26distutils/setuptools-native, distutils3/setuptools3-native: do not try to ↵Hongxu Jia
fetch code during do_compile If a python recipe is using setuptools and the setup_requires argument, where setuptools will use easy_install to fetch the module if it isn't present. The build failed on a machine where a proxy was required, but succeeded on a machine which had direct access to the internet Add var-NO_FETCH_BUILD, and set it in distutils_do_compile which does not allow to fetch code from internet during do_compile. Example result: ... ERROR: Do not try to fetch `pytest-runner1' for building. Please add its native recipe to DEPENDS. Traceback (most recent call last): File "setup.py", line 56, in <module> ... The improvement is flexible for test_requirements argument (used at `setup.py test'), where use easy_install also. [YOCTO #12084] Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2018-07-18python-setuptools: rationalise dependenciesRoss Burton
There's no need to do native- and nativesdk-specific DEPENDS as the BBCLASSEXTENDs handles those renames for us. There's no need to have a subset of RDEPENDS for class-native as all with the new manifest the python-native PROVIDES are complete. Signed-off-by: Ross Burton <ross.burton@intel.com>
2018-07-18python-setuptools.inc: avoid using += with an over-rideAndre McCurdy
An over-ride replaces the original value regardless of whether or not it's set up with +=. As replacing the original value seems to be the intention here, drop the += to make it more explicit. Also some minor recipe formatting tweaks. Signed-off-by: Andre McCurdy <armccurdy@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2018-07-13python3-pygobject: update to 3.28.3Derek Straka
Update the python3-pygobject package to the latest stable version Tested on the qemu with core-image-minimal Signed-off-by: Derek Straka <derek@asterius.io> Signed-off-by: Ross Burton <ross.burton@intel.com>
2018-07-13python*-setuptools: update to 40.0.0Derek Straka
Update the python{3}-setuptools to the latest stable version Tested on the qemu with core-image-minimal Signed-off-by: Derek Straka <derek@asterius.io> Signed-off-by: Ross Burton <ross.burton@intel.com>
2018-07-05python3-dbus: update to latest stable version of 1.2.8Derek Straka
Remove the PACKAGECONFIG for documentation as it now requires python3-sphinx which is not provided in any existing recipe. Signed-off-by: Derek Straka <derek@asterius.io> Signed-off-by: Ross Burton <ross.burton@intel.com>
2018-07-05python: update to version 2.7.15Derek Straka
Update to the latest stable version License-Update: Copyright year updated to include 2018 Remove the alignment patch that is included upstream Signed-off-by: Derek Straka <derek@asterius.io> Signed-off-by: Ross Burton <ross.burton@intel.com>
2018-07-05python3-pip: update to version 10.0.1Derek Straka
License-Update: Update checksum for whitespace (CRLF) changes Update to the latest stable version Signed-off-by: Derek Straka <derek@asterius.io> Signed-off-by: Ross Burton <ross.burton@intel.com>
2018-07-05python3-git: update to 2.1.10Derek Straka
python3-git was updated to the latest stable version Tested on qemux86-64 using core-image-minimal Signed-off-by: Derek Straka <derek@asterius.io> Signed-off-by: Ross Burton <ross.burton@intel.com>
2018-07-02python*-setuptools: update to 39.2.0Derek Straka
Update the python{3}-setuptools to the latest stable version Tested on the qemu with core-image-minimal Signed-off-by: Derek Straka <derek@asterius.io> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-06-29python3: fix file conflict when multilib enabledZhang Xiao
Config file python3.5m-config conflicts between 32 and 64 bit packages. Use update-alternatives to add base_libdir as suffix to avoid it. [YOCTO #12511] Signed-off-by: Zhang Xiao <xiao.zhang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-06-03nativesdk-python*: suppress user site dirsMartin Kelly
Currently, $HOME/.local is being added into sys.path in the Python SDK causing subtle host contamination. Suppress this by exporting PYTHONNOUSERSITE = "1" as documented in PEP 370. This issue occurred in the past for python*-native and was fixed similarly in OE-core commit 8fe9fb4d5a61dcbcb3fc5b9ee0234cc135af873f ("python*native.bbclass: suppress user site dirs"). Signed-off-by: Martin Kelly <mkelly@xevo.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-05-22python2: Fix build with gcc8Ross Burton
Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2018-05-04python3-native: correctly invoke regen-importlib make targetJoe Slater
Redefiine regen-all in Makefile to invoke regen-importlib after building other regen- targets. Change the recipe to not build it before regen-all. This avoids trying to build it multiple times, which can occasionally fail. Signed-off-by: Joe Slater <joe.slater@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2018-05-04python 2.7: fix multilib patch to accept multiarch style pathsKoen Kooi
Using 'basename' to strip the prefix fails when using multiarch style paths. Signed-off-by: Koen Kooi <koen.kooi@linaro.org> Signed-off-by: Ross Burton <ross.burton@intel.com>