Commit Graph

7 Commits

Author SHA1 Message Date
Ross Burton
6f5ee7fffb classes/flit_core: rename to python_flit_core
To be more uniform with the other new Python classes, rename this to
python_flit_core and update the recipes that use it.

(From OE-Core rev: c0e4ca3c7841028a658f21c11619228022d425b4)

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-03-17 16:44:33 +00:00
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
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
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
Tim Orling
668a625ce5 python3-flit-core: upgrade 3.6.0 to 3.7.1
Version 3.7.1
* Fix building packages which need execution to get the version number,
  and have a relative import in __init__.py (:ghpull:`531`).

Version 3.7
* Support for :ref:`external data files <pyproject_toml_external_data>`
  such as man pages or Jupyter extension support files (:ghpull:`510`).
* Project names are now lowercase in wheel filenames and .dist-info folder
  names, in line with the specifications (:ghpull:`498`).
* Improved support for :doc:`bootstrapping <bootstrap>` a Python environment,
  e.g. for downstream packagers (:ghpull:`511`). flit_core.wheel is usable
  with python -m to create wheels before the build tool is available, and
  flit_core sdists also include a script to install itself from a wheel
  before installer is available.
* Use newer importlib APIs, fixing some deprecation warnings (:ghpull:`499`).

(From OE-Core rev: 3f6768cf23e4215d99f7279b8ec6ee73ba00a656)

Signed-off-by: Tim Orling <tim.orling@konsulko.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-03-02 18:43:24 +00:00