Age | Commit message (Collapse) | Author |
|
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>
|
|
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
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>
|
|
While there is a bit of documentation regarding building a new
manifest file for python, it seems that users usually only read
the manifest file.
The manifest file is in JSON format which doesn't allow comments,
hence why instructions were initially put elsewhere.
This patch hacks the call to open the JSON manifest file by using a
marker to trick it into reading only part of the file as the manifest
itself, and keep the other part as comments, which contain instructions
for the user to run the create_manifest task after an upgrade or when
adding a new package.
Signed-off-by: Alejandro Enedino Hernandez Samaniego <alejandr@xilinx.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Add support to enable tk via PACKAGECONFIG.
before this patch:
# python3
Python 3.5.6 (default, Nov 8 2018, 04:53:45)
[GCC 8.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import tkinter
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib64/python3.5/tkinter/__init__.py", line 35, in <module>
import _tkinter # If this fails your Python may not be configured for Tk
ImportError: No module named '_tkinter'
>>>
After this patch, if enable tk in PACKAGECONFIG, then
# python3
Python 3.5.6 (default, Nov 8 2018, 03:15:52)
[GCC 8.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import tkinter
>>>
Signed-off-by: Mingli Yu <Mingli.Yu@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Pyvenv is just a small script that uses venv to create virtual
environments.
https://www.python.org/dev/peps/pep-0405/#creating-virtual-environments
This patch adds the python3-venv module as a self-contained package which
python3-pyvenv must depend on at run-time.
The patch also provides the package python3-pyvenv from the pyhton3-venv
package.This is good for future-proofing since python3-pyvenv has been
deprecated and only python3-venv is now available in Python 3.6.
https://docs.python.org/3/library/venv.html.
Without this patch python3-pyvenv is broken because it is missing the
venv module at run-time. This patch specifies the newly created
python3-venv as a run-time dependency of python3-pyvenv.
Signed-off-by: Hugues Kamba <hugues.kamba@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
sqlite3/__init__.py was accidentally included in python3-misc.
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Currently the bulk of the tests in python3-tests, some more in
python3-sqlite3-tests, and others in their parent module (such as
python3-ctypes). This is pointless space usage if we're not planning on running
the tests, so consolidate all the tests into python3-tests.
Signed-off-by: Ross Burton <ross.burton@intel.com>
|
|
Instead of sorting the entire manifest when it is updated, use OrderedDict to
preserve the order of fields. This means that packages can be ordered in the
manifest to allow non-trivial FILES assignments (such as a package that picks up
pieces of other packages)
The manifest has been regenerated with the new stable ordering, and
distutils-staticdev moved above distutils so the packaging rules work as
expected.
Signed-off-by: Ross Burton <ross.burton@intel.com>
|
|
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>
|
|
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>
|
|
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>
|
|
Alejandro asked this be reverted as the patch causes more problems
than it solves.
This reverts commit 5d288d286e0adb221649d896c132a607ecddc490.
|
|
Some of the sqlite3 files ended up in python3-misc incorrectly,
this is caused becuse we couldnt add the whole ${libdir}/python3/sqlite3
folder on the package because we also have another sqlite3-tests
package that needs to include another folder from that directory.
This patch not only fixes the do_create_manifest script to handle this
situation, but also patches the manifest (created using the script)
which also fixes a hiddn runtime dependency that we wouldn't have seen.
Signed-off-by: Alejandro Enedino Hernandez Samaniego <alejandr@xilinx.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
We have a couple of python modules that contain folders themselves,
for that reason they also contain a __pycache__ folder inside those
directories, since we include the whole folder in the manifest, the
pycache directories end up with the files and not the cache files.
This patch catches that and adds the directories to the correct
structure.
Signed-off-by: Alejandro Enedino Hernandez Samaniego <alejandr@xilinx.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Some of the sqlite3 module was in python3-misc by accident, move the files
into python3-sqlite3 where they belong.
Signed-off-by: Ross Burton <ross.burton@intel.com>
|
|
python3-logging depends on python3-netserver (logging/config.py:42)
Signed-off-by: Tomasz Meresiński<tomasz.meresinski@comarch.pl>
Signed-off-by: Ross Burton <ross.burton@intel.com>
|
|
Use the latest 3.5 version until the 3.6 migration is complete
Removed the following upstreamed patches:
- python3/Fix-29519-weakref-spewing-exceptions-during-interp-f.patch
- python3/upstream-random-fixes.patch
Rebased the following pathes:
- python3/0001-cross-compile-support.patch
Regenerated the manifest based on the latest release version
Updated the license checksum for the latest version that updated the
copyright dates
Signed-off-by: Derek Straka <derek@asterius.io>
Signed-off-by: Ross Burton <ross.burton@intel.com>
|
|
The _pydecimal files are required to use the numbers package
and downstream packages are currently required to add a RDEPENDS
on python3-misc to avoid an import error
Signed-off-by: Derek Straka <derek@asterius.io>
Signed-off-by: Ross Burton <ross.burton@intel.com>
|
|
The gdbm module wasnt being built on python3-native showing the following
error during compilation:
Failed to build these modules:
_gdbm
This patch adds the required dependency to fix the compilation problem.
This issue on python3-native caused the manifest creation script to be
unaware of the gdbm library, so this patch also fixes the create_manifest
task for target python, and the manifest file to reflect the changes on
target python as well.
Signed-off-by: Alejandro Hernandez <alejandr@xilinx.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
|
|
* runpy allows running modules/scripts with 'python -m foo'
- create explicit python2 and 3 packages rather than the
misc catchall
* python3-setuptools and html.parser RDEPENDS on _markupbase
- add to python3-core rather than misc catchall
* pip3 RDEPENDS on plistlib, http.client
- already packaged in python2, add to python3
- add http/ to -netclient
* "pip3 install" RDEPENDS on encodingds.idna
- encodings.idna packaged in -core, but missing:
- stringprep (move from -codecs to -core)
- unicodedata (move from -codecs to -core)
Signed-off-by: Tim Orling <timothy.t.orling@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
|
|
See previous commit (python2 version) for more info, since mostly
everything applies here as well.
Old manifest file had several issues:
- Its unorganized and hard to read and understand it for an average
human being.
- When a new package needs to be added, the user actually has to modify
the script that creates the manifest, then call the script to create
a new manifest, and then submit a patch for both the script and the
manifest, so its a little convoluted.
- Git complains every single time a patch is submitted to the manifest,
since it violates some of its guidelines.
- It changes or may change with every release of python, its impossible
to know if the required files for a certain package have changed
(it could have more or less dependencies), the only way of doing so
would be to install and test them all one by one on separate individual
images, and even then we wouldnt know if they require less dependencies,
we would just know if an extra dependency is required since it would
complain, lets face it, this isnt feasible.
- The same thing happens for new packages, if someone wants to add a new
package, its dependencies need to be checked manually one by one.
Features/Fixes:
- A new manifest format is used (JSON), easy to read and understand.
This file is parsed by the python recipe and python packages
read from here are passed directly to bitbake during parsing time.
- It provides an automatic manifest creation task (explained on previous
commit), which automagically checks for every package dependencies and
adds them to the new manifest, hence we will have on each package
exactly what that package needs to be run, providing finer granularity.
- Dependencies are also checked automagically for new packages
(explained on previous commit).
This patch has the same features as the python2 version but it differs
in the following ways:
- Python3 handles precompiled bytecode files (*.pyc) differently.
for this reason and since we are cross compiling, wildcards couldnt be
avoided on python3 (See PEP #3147 [1]).
Both the manifest and the manifest creation script handle this
differently, the manifest for python3 has an extra field for cached
files, which is how it lets the user install the cached files or not
via : INCLUDE_PYCS = "1" on their local.conf.
- Shared libraries nomenclature also changed on python3, so again, we
use wildcards to deal with this issue ( See PEP #3149 [2]):
- Fixes python3 manifest, python3-core should be base and everything
should depend on it, hence several packages were deleted:
python3-enum, re, gdbm, subprocess, signal, readline.
- When building python3-native it adds as symlink to it called
nativepython3, which is then isued by the create_manifest task.
- Fixes [YOCTO #11513] while were at it.
References:
[1] https://www.python.org/dev/peps/pep-3147/
[2] https://www.python.org/dev/peps/pep-3149/
Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
|