summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/python/python3
AgeCommit message (Collapse)Author
2020-09-23meta: add/fix invalid Upstream-Status tagsRoss Burton
Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-08-11python3-manifest.json: UpdatesNathan Rossi
- Regenerate using create_manifest - Fix up some indentation compared to generated - Add "secrets" module into netclient package (introduced in 3.6) - Move "urllib" python package into core package, it is used more commonly than just netclient (e.g. email, xml, mimetypes, pydoc) - Update compression package dependencies due to some modules moving into core package - Update dependencies due to improvements to get_module_deps handling modules of a python package (e.g. ctypes.utils) Signed-off-by: Nathan Rossi <nathan@nathanrossi.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-08-11python3: Improve handling of python3 manifest generationNathan Rossi
Specifically cover detection of modules within a python package that do not import anything within their __init__.py. This is at least the case with the xmlrpc package which is only used via its modules xmlrpc.server and xmlrpc.client. Other important corner cases include ctypes.utils which depends on some modules not used by ctypes. This is implemented by generally assuming that importing all the modules of a package (aka *.py within a package, excluding _*.py) will provide enough information. Also due to this change some modules import sysconfig, resulting in sysconfigdata being imported. Handle the conversion of its path to a wildcard based on the platform dependent name being replaced. Signed-off-by: Nathan Rossi <nathan@nathanrossi.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-07-25Revert "python3: define a profile directory path"Mingli Yu
After ccache upgrade to 3.7.11, there is below logic introduced. 58895dc Add knowledge about -fprofile-{correction,reorder-functions,values} And the python3 ccache build issue [1] is fixed in ccache 3.7.11, so there is no need to define a profile directory path for python3 any more. [1] https://github.com/ccache/ccache/issues/615 Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-07-12python3: define a profile directory pathMingli Yu
After ccache upgrade to 3.7.10, there comes below error when enable ccache to build python3 and check [1] and [2] for more details. | Python-3.8.3/Modules/_contextvarsmodule.c:43:1: error: source locations for function 'PyInit__contextvars' have changed, the profile data may be out of date [-Werror=coverage-mismatch] That's because the logic for profile directory changes a little in [3] after ccache upgrades to 3.7.10. So define a profile directory path accordingly to fix the above error. [1] https://github.com/ccache/ccache/issues/615 [2] https://lists.openembedded.org/g/openembedded-core/topic/75170448#140065 [3] https://github.com/ccache/ccache/commit/91a2954eb47b4a106e2be6cf611917b895108e35 Signed-off-by: Mingli Yu <mingli.yu@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-06-03python3: upgrade 3.8.2 -> 3.8.3Alexander Kanavin
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-04-24python3-manifest.json: add pathlib to coreTim Orling
The pathlib module is for Object-oriented filesystem paths It also provides a lot of handy utilities for checking on paths. This seems to justify adding it to the core package along side os, sys, and the other *path libraries. [YOCTO #13670] Signed-off-by: Tim Orling <timothy.t.orling@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-03-30python3: fixing bpo-36852 patch for builds on i686 architectureMatthias Schoepfer
The original patch "bpo-36852: proper detection of mips architecture for soft float" uses AC_CANONICAL_TARGET to determine the platform triplet. While AC_CANONICAL_TARGET exports i686 as target_cpu, gcc is using i386 instead. We fall back here to i386, as it is conform to the previous behavior. Upstream Status: Submitted [https://github.com/python/cpython/pull/13196] Signed-off-by: Matthias Schoepfer <matthias.schoepfer@ithinx.io> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-03-06python3-native: Should not search the system for headers/libraries.Jeremy Puhlman
The specific issue here is rpc/rpc.h, but its likely more general. /usr/include is searched for rpc/rpc.h and if it exists on the system, it changes behavior. If you are using the extended buildtools tarball on a machine that has /usr/include/rpc/rpc.h, it will decide that is good enough and not continue to search. nis fails to build because /usr/include and /usr/lib are not part of the include/link paths for the buildtools tarball compiler(nor should they be). This makes it so python3-native will not build if you are using the extended buildtools tarball, but from a larger issue perspective it is building in likely different ways depending on what machine it is building on. libtirpc is already a depend so we shouldn't need the hosts rpc/rcp.h. Signed-off-by: Jeremy A. Puhlman <jpuhlman@mvista.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-02-18python3: resolve ncurses host contaminationAlexander Kanavin
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-02-14python3: install _tkinter.*.so to python3-tkinter packageYi Zhao
When enable PACKAGECONFIG[tk], we should install _tkinter.*.so to python3-tkinter package rather than python3-misc package. Fixes: ERROR: python3-3.8.1-r0 do_package_qa: QA Issue: /usr/lib/python3.8/lib-dynload/_tkinter.cpython-38-x86_64-linux-gnu.so contained in package python3-misc requires libtk8.6.so()(64bit), but no providers found in RDEPENDS_python3-misc? [file-rdeps] Signed-off-by: Yi Zhao <yi.zhao@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-02-08python3: Do not hardcode "lib" for distutilsChangqing Li
Get the sys.lib from python3 itself and do not use hardcoded value of 'lib' for distutils. Solve the error below that occurs when run "python3 setup.py install" on lib64 multilib platform: [Errno 2] No such file or directory: '/usr/lib/python3.7/site-packages/test-easy-install-1828.write-test' Signed-off-by: Li Zhou <li.zhou@windriver.com> Signed-off-by: Changqing Li <changqing.li@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-02-08python3: fix the installation path of libpython3.7m.a for multilibChangqing Li
Fix the installation path of libpython3.7m.a on mulitlib lib64 platform to lib64 instead of lib Signed-off-by: Li Zhou <li.zhou@windriver.com> Signed-off-by: Changqing Li <changqing.li@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-01-21python3: correctly process ptest output with sedAlexander Kanavin
Particularly: [ERROR|FAIL] was matching characters rather than strings. Using (ERROR|FAIL) requires -r option. Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-01-21python3: do not compile .pyc in parallel during do_install()Alexander Kanavin
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-01-21python3: update to 3.8.1Alexander Kanavin
Drop backports, rebase other patches. 0001-main.c-if-OEPYTHON3HOME-is-set-use-instead-of-PYTHON.patch is removed as the use case (allowing python 2 and 3 to coexist in SDKs) is no longer relevant with Python 2.x reaching end of line and upstream has refactored the code making a rebase difficult. If needed, please re-add the patch to py2, rather than py3. Python 3.8 no longer adds "m" to "3.8" in paths, so adjust the recipes and classes accordingly. The manifest for the 3.8.0 version is updated; particularly pkgutil module is now packaged in -core (as other things in core need it); this also necessitates allowing empty -pkgutil package to avoid breakage across layers. Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-11-25python3: update patch statusRoss Burton
Signed-off-by: Ross Burton <ross.burton@intel.com>
2019-11-05python3: Upgrade 3.7.4 -> 3.7.5Adrian Bunk
Backported patches removed. Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-10-24python3: fix CVE-2019-16935Chen Qi
Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-10-22python3: ensure that all forms of python3-config are in python3-devRoss Burton
In multilib builds python3-config gets renamed to eg python3-config-lib64 but this ends up being packaged in python3-core not python3-dev. The manifest uses an extended glob to package all python* binaries that are not python-config into python3-core: "${bindir}/python*[!-config]", However, this doesn't do what was intended, as [] is a range match. Replace the globs with more verbose but precise matches, and clear out FILES_${PN} to ensure that new binaries don't end up in ${PN} (which shouldn't exist). [ YOCTO #13592 ] Signed-off-by: Ross Burton <ross.burton@intel.com>
2019-10-19python3: -dev should depend on distutilsRoss Burton
python3-config uses distutils: Traceback (most recent call last): File "/usr/bin/python3-config", line 9, in <module> from distutils import sysconfig ModuleNotFoundError: No module named 'distutils' Add the dependency so that distutils is always present. [ YOCTO #13592 ] Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-10-10python3: CVE-2019-16056Chen Qi
Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-10-10python3: make gdbm optionalAlexander Kanavin
The use case is building a gpl3-free image, without having to rely on outdated recipes from meta-gplv2 layer. Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-10-02python3: move runpy to coreRoss Burton
The runpy module is used to implement 'python3 -m foo', so move it to python3-core as it's an essential part of the CLI. Signed-off-by: Ross Burton <ross.burton@intel.com>
2019-09-15python3: handle STAGING_LIBDIR/INCDIR being unsetRoss Burton
2019-09-07python3-manifest.json: Fix typo in summaryKhem Raj
Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-08-21python3: fix the test_locale output formatMingli Yu
Before this patch: # python3 -m test -v test_locale [snip] test_getsetlocale_issue1813 (test.test_locale.TestMiscellaneous) ... testing with ('tr_TR', 'ISO8859-9') ok [snip] After this patch: # python3 -m test -v test_locale [snip] test_getsetlocale_issue1813 (test.test_locale.TestMiscellaneous) ... testing with ('tr_TR', 'ISO8859-9')... ok [snip] Make the test ended with "... ok" is common in python unittest world, we should make it keep consistent with other test cases in case it may be ignored to record in the report if we use the common filter "... ok". [YOCTO #13298] Signed-off-by: Mingli Yu <mingli.yu@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2019-08-03python3: split out the Windows distutils installer stubsRoss Burton
Needing the Windows distutils installer stubs is quite a niche requirement, so put them into a separate package and just recommend it. This can save both space and legal pain, as the installers embed an old zlib that has known CVEs. Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-08-03python3: remove empty python3-distutils-staticdevRoss Burton
distutils doesn't ship any static libraries, and the files this should pick up do not exist. Copy/paste gone wrong maybe? Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-07-02perl: fix Upstream-Status tagsRoss Burton
Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-06-28python3: Fix .pyc file reproduciblilityJoshua Watt
Applies a patch to python that makes the pre-compiled .pyc files generated during the build reproducible. Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-06-21python3: Reformat sysconfigJoshua Watt
Reformats the sysconfig file when packaging. This file is output by using the python pprint function. This function will wrap long lines at 80 characters by default, and will even split strings at whitespace boundaries to do so, e.g.: 'A': 'B is really' ' long' This causes a problem for reproducibility however because there might be lines of differing lengths depending on the build path. These non-reproducible paths are removed, but their effect on string wrapping from pprint remains. To correct this, reformat the entire sysconfig file by re-printing using pprint with an (effectively) unlimited line length. Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-06-19python3: python3: Fix build error x86->x86Ricardo Ribalda Delgado
When building x86->x86 the system will try to execute .so and related items from the default PYTHONPATH. This will fail if the target CPU contains instructions that the host CPU does not have, add CROSSPYTHONPATH into PYTHONPATH so we can prepend the list to find correct libs. Fixes: Illegal instruction (core dumped) Makefile:625: recipe for target 'sharedmods' failed make: *** [sharedmods] Error 132 make: *** Waiting for unfinished jobs.... Signed-off-by: Ricardo Ribalda Delgado <ricardo@ribalda.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-06-12python3: fix build on softfloat mipsMatthias Schoepfer via Openembedded-core
This patch originally only meant to correct the python3 build for mips with softfloat, as the original test only checked for mips hardfloat. Replaced custom C Program for triplet detection with autotools triplet detection. Signed-off-by: Matthias Schoepfer <matthias.schoepfer@ithinx.io> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-05-08python3: fix do_install fail for parallel buiildChangqing Li
When using make -j with the 'install' target, it's possible for altbininstall (which normally creates BINDIR) and libainstall (which doesn't, though it installs python-config there) to race, resulting in a failure due to attempting to install python-config into a nonexistent BINDIR. Ensure it also exists in the libainstall target. Signed-off-by: Changqing Li <changqing.li@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-05-08openssh/systemd/python/qemu: Fix patch Upstream-StatusRichard Purdie
Fix some missing or corrupted patch Upstream-Status values. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-05-08python3: Add ntpath.py to python coreAlex Kiernan
The newer python3 recipe no longer includes ntpath.py in core, leading to failures in pkg_resources: Traceback (most recent call last): File "/usr/bin/bmaptool", line 6, in <module> from pkg_resources import load_entry_point File "/usr/lib/python3.7/site-packages/pkg_resources/__init__.py", line 42, in <module> import ntpath ModuleNotFoundError: No module named 'ntpath' Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-04-29python3: Drop ptest hackRichard Purdie
With the kernel TCP backlog queue coalescing bug fixed in the 5.0 kernels we don't need this patch anymore and can run the tests. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-04-29Adding back wrapper and using OEPYTHON3HOME variable for python3Jaewon Lee
Adding back the python wrapper and adding a patch to use OEPYTHON3HOME instead of PYTHONHOME if set, for python3. If we add back the wrapper as is, we would see the following error that we also see in Thud: ImportError: No module named site OpenEmbedded requires 'python' to be python v2 (>= 2.7.3), not python v3. Please upgrade your python v2 This is because python3 would've set PYTHONHOME to use nativesdk python3 libraries but when the oe-buildenv-internal script tries to call python2 for the py_v27_check, there will be no python2 libraries in the PYTHONHOME directory. In other words, bitbake needs host python2 and the env variable set from the wrapper contaminates the env and host python2 won't be able to find its libraries Creating another variable OEPYTHON3HOME and using this in the python3 wrapper to allow for a way to set a different paths for python3 and python2 [YOCTO #13208] Signed-off-by: Jaewon Lee <jaewon.lee@xilinx.com> Signed-off-by: Alejandro Enedino Hernandez Samaniego <alejandr@xilinx.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-04-23python3: add another multilib fixAlexander Kanavin
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-04-16python: update to 3.7.3Alexander Kanavin
License-update: copyright years Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-04-11python3: Fix ptest output parsingRichard Purdie
A previous fix to python added -W and removed -v. This reverts that part of the change since we're no longer getting ptest results at all. This change back to more verbose output means we start getting test results again. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-04-11python3: Avoid hanging testsRichard Purdie
There are python tests which hang with recent kernels, 5.0 onwards. This causes ptest to timeout for python3. Disable the problematic test until we better understand the real cause and fix of the issue (discussions are happening with upstream). See the patch for details/links. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-04-09openssh/util-linux/python*: Ensure ptest output is unbufferedRichard Purdie
We need to run sed with the -u option to ensure the output is unbuffered else ptest-runner may timeout thinkig things were idle. Busybox doesn't have the -u option so we need to RDEPEND on sed (which is a good thing to do if we use it anyway). Alex Kanavin should get credit for discovering the problem. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-04-01python: improve ptestRoss Burton
Add missing runtime dependencies: the test suite needs proper chmod from coreutils, and the Europe/Minsk timezone. Also change run-ptest to use -W (run verbosely on failure) instead of -v (always verbose) to hopefully reduce the noise in the ptest reports. Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-02-08python3: tweaks to achieve 100% pass rate in ptestAlexander Kanavin
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-02-08python3: upgrade to 3.7.2Alexander Kanavin
I took the same approach as the recent perl upgrade: write recipe from scratch, taking the pieces from the old recipe only when they were proven to be necessary. The pgo, manifest and ptest features are all preserved. New features: - native and target recipes are now unified into one recipe - check_build_completeness.py runs right after do_compile() and verifies that all optional modules have been built (a notorious source of regressions) - a new approach to sysconfig.py and distutils/sysconfig.py returning values appropriate for native or target builds: we copy the configuration file to a separate folder, add that folder to sys.path (through environment variable that differs between native and target builds), and point python to the file through another environment variable. There were a few other patches where it was difficult to decide if the patch is still relevant, and how to test that it works correctly; please add those as-needed by testing the new python. Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-01-20python3: use ncursesw, not ncursesAlexander Kanavin
So that wide-char functions are accssible. [YOCTO #13142] Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-01-07python/python3: use cc_basename to replace CC for checking compilerChangqing Li
When working path contains "clang"/"gcc"/"icc", it might be part of $CC because of the "--sysroot" parameter. That could cause judgement error about clang/gcc/icc compilers. eg: if build under /yocto/builds/xicc/, bitbake python, $CC will contains xicc, will make $CC match *icc, but actuall xicc just folder name. When "*icc" is matched, below errors are reported when compiling python/python3: x86_64-wrs-linux-gcc: error: strict: No such file or directory x86_64-wrs-linux-gcc: error: unrecognized command line option '-fp-model' Here use cc_basename to replace CC for checking compiler to avoid such kind of issue. Signed-off-by: Li Zhou <li.zhou@windriver.com> Signed-off-by: Changqing Li <changqing.li@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-15python3: Fix do_configure check platform triplet error (2)Serhey Popovych
When building for powerpc 32bit with musl following error triggered from do_configure: checking for the platform triplet based on compiler characteristics... powerpc-linux-gnu configure: error: internal configure error for the platform triplet, please file a bug report This is caused by PLATFORM_TRIPLET != MULTIARCH mismatch since MULTIARCH in case of musl is powerpc-linux-musl. Since triplet is used as part module name as described in PEP-3149 to make fix less intrusive alias powerpc-linux-musl to powerpc-linux-gnu to avoid possible runtime (e.g. tests) incompatibilities later. Fix was inspired by commit cda0ef61d373 ("python3: fix do_configure check platform triplet error"). Signed-off-by: Serhey Popovych <serhe.popovych@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>