python-build: add support for pyproject.toml files 20366/head
authorAlexandru Ardelean <ardeleanalex@gmail.com>
Mon, 15 Nov 2021 07:26:29 +0000 (09:26 +0200)
committerAlexandru Ardelean <alex@shruggie.ro>
Sun, 22 Jan 2023 14:58:59 +0000 (15:58 +0100)
commit61f202c0170785addbbc449e4de61cc5886f0833
tree440f4eecf3c485bd167f0e71375f8b731f60d42b
parentdb243b31c81a817c565feba7553c3b02d460d959
python-build: add support for pyproject.toml files

A new PEP 517 (https://www.python.org/dev/peps/pep-0517/) has defined that
Python packages can be shipped without any `setup.py` file, and that a
`pyproject.toml` file is sufficient.

A `setup.py` shim layer is suggested as a method for running the build.

For these cases, we will add a support in the OpenWrt build-system to
provide the default `setup.py` shim layer in case this file does not exist,
but there is a `pyproject.toml` file.

We also seem to need to tweak the shim layer with the PKG_VERSION,
otherwise the detected version is 0.0.0.
We will need to see if this will be fixed later in setuptools{-scm}.

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
lang/python/python3-host.mk
lang/python/python3-package.mk
lang/python/setup.py.shim [new file with mode: 0644]