]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core.git/commit
recipetool/create_buildsys_python: add PEP517 support
authorJulien Stephan <jstephan@baylibre.com>
Wed, 25 Oct 2023 15:46:58 +0000 (17:46 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 27 Oct 2023 07:28:28 +0000 (08:28 +0100)
commitc7d8d15b2d0a9ecd210bd247fa0df31d9f458873
tree50425be7235f2a8f6cec74abdd322734fcfd378e
parent2281e93347da4129062cfb40710df03c87c63168
recipetool/create_buildsys_python: add PEP517 support

Add basic support for PEP517 [1] for the 3 following backends that are
supported by bitbake:
  - setuptools.build_meta
  - poetry.core.masonry.api
  - flit_core.buildapi

If a pyproject.toml file is found, use it to create the recipe,
otherwise fallback to the old setup.py method.

Some projects can declare a minimal pyproject.toml file, and put all
the metadata in setup.py/setup.cfg/requirements.txt .. theses cases
are not handled. If a pyproject.toml file is found, assumes it has all
necessary metadata.

As for the old setup.py method, version numbers for dependencies are not
handled.

Some features may be missing, such as the extra dependencies.

[YOCTO #14737]

[1]: https://peps.python.org/pep-0517/

Signed-off-by: Julien Stephan <jstephan@baylibre.com>
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
scripts/lib/recipetool/create_buildsys_python.py