mirror of
https://github.com/openwrt/packages.git
synced 2025-12-23 12:24:32 +04:00
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>
This commit is contained in:
committed by
Alexandru Ardelean
parent
db243b31c8
commit
61f202c017
@@ -62,10 +62,11 @@ endef
|
||||
# $(3) => additional variables
|
||||
define Python3/ModSetup
|
||||
$(INSTALL_DIR) $(PKG_INSTALL_DIR)/$(PYTHON3_PKG_DIR)
|
||||
$(call SetupPyShim,$(PKG_BUILD_DIR)/$(strip $(1)))
|
||||
$(call Python3/Run, \
|
||||
$(PKG_BUILD_DIR)/$(strip $(1)), \
|
||||
setup.py $(2), \
|
||||
$(3))
|
||||
$(3) PY_PKG_VERSION=$(PKG_VERSION))
|
||||
endef
|
||||
|
||||
define Python3/FixShebang
|
||||
|
||||
Reference in New Issue
Block a user