Commit Graph

1396 Commits

Author SHA1 Message Date
Ross Burton
00bc2e68f9 python_pep517: use installer instead of pip
Instead of battling pip to install a wheel, use installer. Installer
does one thing, so it's faster and easier to work with.

This means setuptools, pip, and wheel are no longer part of the
bootstrap phase, so they can be built normally.  To avoid sysroot file
conflicts these three recipes can't install .pyc files to the native
sysroot.

We currently patch pypa/installer to allow us to override the interpreter
used, which means we can drop the interpreter seding.

We don't need to recompile any Python which is found in $bindir as
Python doesn't actually load those files.

Across a build of oe-core, the only differences between using pip and
installer are:

- the .dist-info/RECORD files are ordered differently
- the .dist-info/REQUESTED and INSTALLER files are not created
- the hashbang in native scripts is "/usr/bin/env nativepython" instead
  of pointing directly at the native sysroot python3.

(From OE-Core rev: f780f6d920d8bbfb674d6066a8b899417decf8d2)

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-03-16 08:48:09 +00:00
Ross Burton
c4cfeb96a3 python3-installer: add installer module
Add a recipe for Installer, a minimal library/tool to install Python
Wheels.  Unlike PIP, it explicitly only installs wheels and does nothing
else.

(From OE-Core rev: bf09c0bd99e4defbc259775b4a2e3fcce09bde17)

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-03-16 08:48:09 +00:00
Richard Purdie
7769b1f3fa python3-cryptography-vectors: Fix reproducibility
We regenerate the pycache files and the checksums in the manifest are incorrect.
Remove them to avoid this and ensure reproducibility.

(From OE-Core rev: 3c1e7e50c929436d0007d60e738c8270e7e6c7d9)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-03-16 08:48:09 +00:00
Ross Burton
4e87cfb56d python3-cryptography: remove obsolete PIP_INSTALL_DIST_PATH
(From OE-Core rev: 1ebf3774655a57807ca5e03530fef2bd80442adb)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-03-16 08:48:08 +00:00
Richard Purdie
2e1cb386f9 python3-cryptography: Add missing ptest tomli dependency
Add missing tomli runtime dependency to allow ptests to execute.

(From OE-Core rev: eb75f5b64146912f4e312eb1fe00162169ae70fa)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-03-16 08:48:08 +00:00
Ross Burton
a5d252eea3 python3-cryptography: mark test_create_certificate_with_extensions as expected to fail
This test causes OpenSSL to leak some memory. Until this is resolved in
OpenSSL, mark the test as expected-to-fail.

(From OE-Core rev: b32917b113df6dce0200d35dd1b539279635d524)

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-03-16 08:48:08 +00:00
Richard Purdie
267e5f4cc2 poetry_core: Rename to python_poetry_core
(From OE-Core rev: 241ebe35afb0ae9cd2713ef19a78746f0ab5ca5d)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-03-16 08:48:08 +00:00
Richard Purdie
89f9740f98 setuptools3_rust: Rename to python_setuptools3_rust
(From OE-Core rev: 57bef31cdcafeef2d1ca5ff3aee7b2e2181a0514)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-03-16 08:48:08 +00:00
Tim Orling
9a62d8b483 python3-ply: move from meta-python
Dependency for python3-cryptography

(From OE-Core rev: 0edd68ee0672656ba60ed7c8d9cea3baa39328db)

Signed-off-by: Tim Orling <tim.orling@konsulko.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-03-16 08:48:08 +00:00
Tim Orling
88c6ecc88a python3-pycparser: move from meta-python
Dependency for python3-cryptography

(From OE-Core rev: 8a34826558b5a0f2a4463f7d7bb230f1473b6621)

Signed-off-by: Tim Orling <tim.orling@konsulko.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-03-16 08:48:08 +00:00
Tim Orling
f263485a67 python3-semantic-version: move from meta-python
Dependency for python3-cryptography

(From OE-Core rev: 90204d37f303f7f3daddad76b3c86dcf8a1338e7)

Signed-off-by: Tim Orling <tim.orling@konsulko.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-03-16 08:48:08 +00:00
Tim Orling
8fca4407b5 python3-typing-extensions: move from meta-python
Dependency for python3-cryptography

(From OE-Core rev: 5758587a1b2db882cc990257b2a6b8e71fa77b4a)

Signed-off-by: Tim Orling <tim.orling@konsulko.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-03-16 08:48:08 +00:00
Tim Orling
e499ca2a5e python3-iso8601: move from meta-python
Dependency for python3-cryptography

(From OE-Core rev: 78106bc12b995bbb42e02f2e5d8fbc56d917b934)

Signed-off-by: Tim Orling <tim.orling@konsulko.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-03-16 08:48:08 +00:00
Ross Burton
8e88d32bdf python3-poetry-core: remove obsolete PIP_INSTALL_PACKAGE
(From OE-Core rev: ed53e6728704ac77f15fe266a63b453ba1a2a846)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-03-16 08:48:08 +00:00
Tim Orling
dc59a7aad5 python3-poetry-core: move from meta-python
A PEP 517 build backend implementation developed for Poetry. This project
is intended to be a light weight, fully compliant, self-contained package
allowing PEP 517 compatible build frontends to build Poetry managed projects.

(From OE-Core rev: 49e4541b250be296dc7b148858016ff0aaef9afd)

Signed-off-by: Tim Orling <tim.orling@konsulko.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-03-16 08:48:08 +00:00
Richard Purdie
50adbdc4d6 python3-psutil/python3-bcrypt: Add missing HOMEPAGE
Add missing HOMEPAGE entries to the two recipes imported from meta-oe to fix
selftest failures.

(From OE-Core rev: 7fefeea0b8a0784052e87768588859c703d47fb5)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-03-16 08:48:08 +00:00
Tim Orling
ea5bde8d98 python3-psutil: move from meta-python
Dependency for python3-cryptography

(From OE-Core rev: e2c8532df68946943a1dbabd6d3be5496f05f735)

Signed-off-by: Tim Orling <tim.orling@konsulko.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-03-16 08:48:08 +00:00
Tim Orling
86bb763b36 python3-pretend: move from meta-python
Dependency for python3-cryptography

(From OE-Core rev: fbcb327b4264d5ba8502ecd46ff0b53095c1f7e7)

Signed-off-by: Tim Orling <tim.orling@konsulko.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-03-16 08:48:08 +00:00
Tim Orling
d4bd1420f3 python3-bcrypt: move from meta-python
Dependency for python3-cryptography

(From OE-Core rev: 7c931d83ad84eef1bb24d00124e1dbee0855b48a)

Signed-off-by: Tim Orling <tim.orling@konsulko.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-03-16 08:48:08 +00:00
Tim Orling
6b7ee7eec3 python3-pytz: move from meta-python
Dependency for python3-cryptography

(From OE-Core rev: 5831114f881752212704474381570139f01919f1)

Signed-off-by: Tim Orling <tim.orling@konsulko.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-03-16 08:48:08 +00:00
Tim Orling
c903d59649 python3-cffi: move from meta-python
Dependency for python3-cryptography

(From OE-Core rev: 1748d7b84da30585199d0f910341bae169113ccd)

Signed-off-by: Tim Orling <tim.orling@konsulko.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-03-16 08:48:08 +00:00
Tim Orling
6f12c2aa10 python3-asn1crypto: move from meta-python
Dependency for python3-cryptography

(From OE-Core rev: 2e0e42bd840f94f2e9a22cda0314131c31f26045)

Signed-off-by: Tim Orling <tim.orling@konsulko.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-03-16 08:48:08 +00:00
Tim Orling
c47a786251 python3-cryptography-vectors: from meta-python
Dependency for python3-cryptography ptest.

This recipe needs to be kept in lock-step with the version of
python3-cryptography.

(From OE-Core rev: 1dda3ab39e2a28e05b903d970410587f2b58cdef)

Signed-off-by: Tim Orling <tim.orling@konsulko.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-03-16 08:48:08 +00:00
Tim Orling
d58cc124fa python3-pytest-subtests: move from meta-python
Dependency for python3-cryptography ptest.

(From OE-Core rev: 6786ea8f0d70c7ff0fea353032d78db353628798)

Signed-off-by: Tim Orling <tim.orling@konsulko.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-03-16 08:48:08 +00:00
Tim Orling
c6f79207f8 python3-cryptography: move from meta-python
* inherit new setuptools_rust class (which inherits new pyo3 class, which
  inherits cargo and python3-dir).
* RDEPENDS on python3-pytest-subtests for ptest
* Copy pyproject.toml for ptest as it defines the pytest.marker(s) needed
* Use 'cargo bitbake' to generate the crate:// SRC_URIs
   - Needed some hacks to the Cargo.toml in src/rust/ to make this work (probably
     only package.repository was strictly required):

     [package]
     description = "cryptography includes both high level recipes and low level interfaces to common cryptographic algorithms such as symmetric ciphers, message digests, and key derivation functions."
     homepage = "https://github.com/pyca/cryptography"
     repository = "https://github.com/pyca/cryptography"

* Add patches to src/rust/Cargo.toml to fix cargo errors including  pem version
* Add check-memfree.py to ptest to check for sufficient free memory

(From OE-Core rev: 27bd134c899d00d93806ecb0a62ec3f30b1e6ec6)

Signed-off-by: Tim Orling <tim.orling@konsulko.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-03-16 08:48:08 +00:00
Ross Burton
096086d0c8 python3-setuptools-rust-native: remove obsolete PIP_*
(From OE-Core rev: baa9f9c3c3bea1f81e02bb047171ca78f714b034)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-03-16 08:48:08 +00:00
Tim Orling
0f732b694a python3-setuptools-rust-native: from meta-python
Dependency for python3-cryptography 3.4.x+

Only native rustc is supported at this time in oe-core,
therefore it makes no sense to try to build for target.

(From OE-Core rev: 8eaafc114c196fbab2070bfb600634306deef527)

Signed-off-by: Tim Orling <tim.orling@konsulko.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-03-16 08:48:08 +00:00
Ross Burton
a50bf48f90 meta: rename pip_install_wheel.bbclass to python_pep517.bbclass
pip_install_wheel shouldn't restricted to just using Pip to install
wheels (the installer module is simplier and likely a better option),
and in the future may be extended to also provide do_compile() using
the build module.

(From OE-Core rev: 3bdf64b97facce9706cc579bdbc9a80e0d48428f)

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-03-13 12:23:48 +00:00
Ross Burton
7f6966555c meta: remove obsolete PIP_INSTALL_PACKAGE
PIP_INSTALL_PACKAGE isn't used anymore, so remove all instances of it
from the recipes.

(From OE-Core rev: 15baf24f750ab2c8b0a46d4a3bf2ae9bfa3d0aff)

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-03-12 09:20:03 +00:00
Ross Burton
5331d29a89 pip_install_wheel: add a generic do_install for bootstrapping
Several recipes are duplicating the same bootstrap logic for installing
a wheel without using any tools.  Add an implementation to
pip_install_wheel to centralise the code, and remove the duplicated code
from the following recipes:

- python3-flit-core
- python3-pip
- python3-setuptools
- python3-wheel

(From OE-Core rev: d5d702a2cd06f863340f8e4cdce0904c9d86384d)

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-03-11 06:56:01 +00:00
Ross Burton
7f1c3b4202 python3-pip: remove redundant DEPENDS on python3-setuptools-native
This recipe inherits setuptools_build_meta which already depends on
python3-setuptools-native.

(From OE-Core rev: 5d514b5dbd09ce059047d849d5b7cc2b2327564d)

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-03-11 06:56:01 +00:00
wangmy
c024b91167 python3-pycairo: upgrade 1.20.1 -> 1.21.0
Changelog:
=========
* Require Python 3.7+ :pr:'250'
* Require meson 0.53+
* Using 'setup.py' directly to build/install pycairo is deprecated.
  Use meson instead.
* 'setup.py' now requires setuptools. Previously it was optional.
* The complete API reference is now included in the typing stubs,
  so it can be consumed/shown by IDEs. :pr:'236' :pr:'252'

(From OE-Core rev: d83f8e31b929ea270a2cafda4ca3deaffbd7c54e)

Signed-off-by: Wang Mingyu <wangmy@fujitsu.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-03-10 13:07:37 +00:00
Ross Burton
f369b606b7 python3-scons: remove redundant FILES:${PN}-doc
mandir is in the default FILES:${PN}-doc, so there's no need to add it.

(From OE-Core rev: 342641edee1e2c7d80184c3a9b649cccb8cf38b5)

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-03-10 13:07:37 +00:00
Ross Burton
dc8d760f09 python3-scons: remove PIP_INSTALL_DIST_PATH
The default is good now, so remove this.

(From OE-Core rev: eef037f199d458e31afb570f9a4930c75c778b68)

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-03-10 13:07:37 +00:00
Ross Burton
6982839605 python3-pyyaml: use setuptools_build_meta
This project builds with setuptools_build_meta, so use that instead.

(From OE-Core rev: 1ebc11c10379a10ddd974068cdd1ea322114a647)

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-03-09 11:46:28 +00:00
Ross Burton
8081703322 python3-pyrsistent: use setuptools_build_meta
This project builds with setuptools_build_meta, so use that instead.

(From OE-Core rev: f2bac34088256d52354f4ec7ab3bd69a6812708f)

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-03-09 11:46:28 +00:00
Ross Burton
80755af2a7 python3-markdown: use setuptools_build_meta
This project builds with setuptools_build_meta, so use that instead.

(From OE-Core rev: 58f7a34a227e2c2fb2fec99066d14ca0c842e97d)

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-03-09 11:46:28 +00:00
Ross Burton
c6ac203061 python3-wheel: clean up PYPA_WHEEL usage
Remove the use of PYPA_WHEEL in the native do_install() as this variable
will be disappearing shortly.

Remove the bbfatal_log in the native do_install(), if this breaks then
something has gone very wrong and the user is not expected to fix it.

Also flit_core inherits setuptools3-base, so no need to inherit it again.

(From OE-Core rev: e2c7501645eec12d3168b6e8606549ce3e5f8db2)

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-03-09 11:46:28 +00:00
Ross Burton
60fbc692fa python3-setuptools3: clean up PYPA_WHEEL usage
There's no need to set PYPA_WHEEL as the default is sufficient.

Remove the use of PYPA_WHEEL in the native do_install() as this variable
will be disappearing shortly.

Remove the bbfatal_log in the native do_install(), if this breaks then
something has gone very wrong and the user is not expected to fix it.

(From OE-Core rev: c0a24279c740555a06a5c57e2a01ca7b20f8e668)

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-03-09 11:46:28 +00:00
Ross Burton
7f4c9a6343 python3-pip: clean up PYPA_WHEEL usage
There's no need to set PYPA_WHEEL as the default is sufficient.

Remove the use of PYPA_WHEEL in the native do_install() as this variable
will be disappearing shortly.

Remove the bbfatal_log in the native do_install(), if this breaks then
something has gone very wrong and the user is not expected to fix it.

(From OE-Core rev: b74d1c30d000c258c3f89ee125ae79ff07c25674)

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-03-09 11:46:28 +00:00
Ross Burton
0f25ab3481 python3-flit-core: improve recipe
flit_core can bootstrap itself, so the python3-flit-core recipe can just
inherit flit_core and set PEP517_SOURCE_PATH to the flit_core submodule.

Also setting FILES:${PN} is redundant.

(From OE-Core rev: ec8799eb92174cb6780a0cc7e1fa9828e4d75c79)

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-03-09 11:46:28 +00:00
Alexander Kanavin
f2aeaa4848 python3-cython: upgrade 0.29.27 -> 0.29.28
(From OE-Core rev: 662333fbfa832cb6091b1bfdba8e218d288a8212)

Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-03-09 11:46:27 +00:00
Ross Burton
17b0f1ecc6 python3-pip: remove obsolete and confusing comment
This comment is very obsolete.

(From OE-Core rev: 147875f0bf7b68694c0338b6f212b03bfdca2ea8)

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-03-08 09:44:27 +00:00
wangmy
d1394e7707 python3-hypothesis: upgrade 6.39.0 -> 6.39.2
Changelog from 6.39.0 to 6.39.2
==============================
- fixes a regression where the bound inner function
("your_test.hypothesis.inner_test") would be invoked with positional
arguments rather than passing them by name, which broke pytest-asyncio
(issue #3245).

- clarifies rare error messages in "builds()" (issue #3225)
and "floats()" (issue #3207).

(From OE-Core rev: ae25cd186c3e0771ef9a3fe10fe7a75c8bde2f66)

Signed-off-by: Wang Mingyu <wangmy@fujitsu.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-03-07 22:44:55 +00:00
Tim Orling
0c6d55e4eb python3-importlib-metadata: upgrade 4.10.1 -> 4.11.2
inherit setuptools_build_meta

v4.11.2
369: Fixed bug where EntryPoint.extras was returning match objects and not the extras strings.

v4.11.1
367: In Distribution.requires for egg-info, if requires.txt is empty, return an empty list.

v4.11.0
bpo-46246: Added __slots__ to EntryPoints.

v4.10.2
365 and bpo-46546: Avoid leaking method_name in DeprecatedList.

(From OE-Core rev: 16873202f4fc9409b3b853ad2275c1068eb16ecd)

Signed-off-by: Tim Orling <tim.orling@konsulko.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-03-05 22:58:47 +00:00
Richard Purdie
2954022bbe python3: Reduce util-linux dependency to util-linux-libuuid
Only libuuid is needed by python so reduce the dependency and hence
reduce the amount pulled into the syroot for the native case in particular.

(From OE-Core rev: 35246dec1c9690371ef0656b21f18567772dab2e)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-03-05 10:45:13 +00:00
Tim Orling
2991089391 python3-jsonschema: upgrade 3.2.0 -> 4.4.0
Upstream changed from setup.py to pyproject.toml+setup.cfg

inherit setuptools_build_meta

For changes see:
https://github.com/Julian/jsonschema/blob/main/CHANGELOG.rst#v440

(From OE-Core rev: 9af4a46668f0e8dcc7a371ec9e14a185df3a314f)

Signed-off-by: Tim Orling <tim.orling@konsulko.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-03-04 17:14:15 +00:00
Richard Purdie
345ed4cc9d python3: Drop opt1 and opt2 pyc files from target
These are only used with python when the -O or -OO options are passed
and I'm not aware of runtime use of that. They otherwise just waste a
ton of space.

(From OE-Core rev: 5ac7b8c030daf30b2be93abebfedbc36c395e6d7)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-03-04 17:14:15 +00:00
Richard Purdie
ed2ba22d10 python3-native: Remove all pyc files
This removes a further 1600 files from sstate handling and lets python
create the ones it wants at runtime which is likely much better overall
for performance.

(From OE-Core rev: 2d6490fa23cce58922a1b54f87c8369925ff8f90)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-03-04 17:14:15 +00:00
Richard Purdie
cb209c2d16 python3-native: Drop opt-1 and opt-2 pyc files
There are over 3,000 of these in python3-native (of 8,000+ files total) and
copying them to sysroots all the time seems pointless, particularly since
they're only used if python is run with the -O or -OO parameters.

Get rid of them and save the overhead. This is particularly pronounced in
builds using the api-documentation distro feature.

(From OE-Core rev: fd66de439273b245c1d0bcfb32f2c847e3cddd6b)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-03-04 17:14:15 +00:00