package/python-maturin: new package
PATCH v4 1/2 package/python-maturin: new package
This is pep517 pyo3 build backend that's an alternative to python-setuptools-rust.
Note that maturin itself uses python-setuptools-rust for bootstrapping.
---
Changes v3 -> v4:
- update to 0.12.20
Changes v2 -> v3:
- update to 0.12.16
- migrate to new python-setuptools-rust based bootstrapping
Changes v1 -> v2:
- update patch comment to backport as it is merged upstream
--- package/python-maturin/python-maturin.hash | 5 +++++ package/python-maturin/python-maturin.mk | 25 ++++++++++++++++++++++ 2 files changed, 30 insertions(+) create mode 100644 package/python-maturin/python-maturin.hash create mode 100644 package/python-maturin/python-maturin.mk
package/python-maturin/python-maturin.hash new file +5 -0
@@ -0,0 +1,5 @@ +# Locally calculated after vendoring +sha256 4ea4f6b02cabffc8b56c488956ad572abfabdce935128007dff48a6e95b553d2 maturin-0.12.20.tar.gz +# Locally computed sha256 checksums +sha256 a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2 license-apache +sha256 ea7882c559733766ad08343bde1d1ec80a4967c03a738fb8e0058ef6289f7b7c license-mit
package/python-maturin/python-maturin.mk new file +25 -0
@@ -0,0 +1,25 @@ +################################################################################ +# +# python-maturin +# +################################################################################ + +PYTHON_MATURIN_VERSION = 0.12.20 +PYTHON_MATURIN_SOURCE = maturin-$(PYTHON_MATURIN_VERSION).tar.gz +PYTHON_MATURIN_SITE = https://files.pythonhosted.org/packages/39/ba/fec598956393230341def42367c6ad0efbee6ddc899f8858e5b25a7f37a5 +PYTHON_MATURIN_SETUP_TYPE = setuptools +PYTHON_MATURIN_LICENSE = Apache-2.0 or MIT +PYTHON_MATURIN_LICENSE_FILES = license-apache license-mit +HOST_PYTHON_MATURIN_DEPENDENCIES = \ + host-python-setuptools-rust \ + host-python-tomli \ + host-rustc +HOST_PYTHON_MATURIN_ENV = \ + $(HOST_PKG_CARGO_ENV) \ + PYO3_CROSS_LIB_DIR="$(HOST_DIR)/usr/lib/python$(PYTHON3_VERSION_MAJOR)" +# We need to vendor the Cargo crates at download time +PYTHON_MATURIN_DOWNLOAD_POST_PROCESS = cargo +PYTHON_MATURIN_DOWNLOAD_DEPENDENCIES = host-rustc +HOST_PYTHON_MATURIN_DL_ENV = $(HOST_PKG_CARGO_ENV) + +$(eval $(host-python-package))
Signature · 6 lines
2.34.1 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH v4 2/2 package/python-orjson: bump to version 3.7.7
Convert package to use python infrastructure instead of cargo infrastructure.
----
Changes v3 -> v4:
- update to 3.7.7
--- package/python-orjson/python-orjson.hash | 5 +++-- package/python-orjson/python-orjson.mk | 24 ++++++++++++------------ 2 files changed, 15 insertions(+), 14 deletions(-)
package/python-orjson/python-orjson.hash +3 -2
@@ -1,4 +1,5 @@ -# Locally calculated -sha256 4713b120ad86b1b273f5952cbf9578c13d0f453064bd26d823e04a10c84824e6 python-orjson-3.6.7.tar.gz +# Locally calculated after vendoring +sha256 ffd677a941c08c9a6cbaf3f49dba12b353833e8028b70e76cd1091b39e096de0 orjson-3.7.7.tar.gz +# Locally computed sha256 checksums sha256 a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2 LICENSE-APACHE sha256 23f18e03dc49df91622fe2a76176497404e46ced8a715d9d2b67a7446571cca3 LICENSE-MIT
package/python-orjson/python-orjson.mk +12 -12
@@ -4,19 +4,19 @@ # ################################################################################ -PYTHON_ORJSON_VERSION = 3.6.7 -PYTHON_ORJSON_SITE = $(call github,ijl,orjson,$(PYTHON_ORJSON_VERSION)) +PYTHON_ORJSON_VERSION = 3.7.7 +PYTHON_ORJSON_SOURCE = orjson-$(PYTHON_ORJSON_VERSION).tar.gz +PYTHON_ORJSON_SITE = https://files.pythonhosted.org/packages/8a/68/47bc5e624431d77445f06a2d3ba32777fda650f05a2f803ea1dc2b07b65a +PYTHON_ORJSON_SETUP_TYPE = pep517 PYTHON_ORJSON_LICENSE = Apache-2.0 or MIT PYTHON_ORJSON_LICENSE_FILES = LICENSE-APACHE LICENSE-MIT -PYTHON_ORJSON_DEPENDENCIES = host-python-cffi -PYTHON_ORJSON_CARGO_ENV = \ +PYTHON_ORJSON_DEPENDENCIES = host-python-cffi host-python-maturin +PYTHON_ORJSON_ENV = \ + $(PKG_CARGO_ENV) \ PYO3_CROSS_LIB_DIR="$(STAGING_DIR)/usr/lib/python$(PYTHON3_VERSION_MAJOR)" +# We need to vendor the Cargo crates at download time +PYTHON_ORJSON_DOWNLOAD_POST_PROCESS = cargo +PYTHON_ORJSON_DOWNLOAD_DEPENDENCIES = host-rustc +PYTHON_ORJSON_DL_ENV = $(PKG_CARGO_ENV) -# orjson uses "maturin" to generate distribution packages - rather than teach -# buildroot how to understand this, we reach in and install directly. -define PYTHON_ORJSON_INSTALL_TARGET_CMDS - $(INSTALL) -m 0755 -D $(@D)/target/$(RUSTC_TARGET_NAME)/release/liborjson.so \ - $(TARGET_DIR)/usr/lib/python$(PYTHON3_VERSION_MAJOR)/site-packages/orjson.so -endef - -$(eval $(cargo-package)) +$(eval $(python-package))
Signature · 6 lines
2.34.1 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Quoted 16 lines · On Sat, 23 Jul 2022 17:03:59 -0600 James Hilliard <[email protected]>…
This is pep517 pyo3 build backend that's an alternative to python-setuptools-rust.
Note that maturin itself uses python-setuptools-rust for bootstrapping.
Signed-off-by James Hilliard <[email protected]>Tested-by Graeme Smecher <[email protected]>---
Changes v3 -> v4:
- update to 0.12.20
Changes v2 -> v3:
- update to 0.12.16
- migrate to new python-setuptools-rust based bootstrapping
Changes v1 -> v2:
- update patch comment to backport as it is merged upstream
Quoted 6 lines
--- package/python-maturin/python-maturin.hash | 5 +++++ package/python-maturin/python-maturin.mk | 25 ++++++++++++++++++++++ 2 files changed, 30 insertions(+) create mode 100644 package/python-maturin/python-maturin.hash create mode 100644 package/python-maturin/python-maturin.mk
You (again) forgot to add yourself in the DEVELOPERS file for this package, so I did so, and applied. Thanks!
Thomas
Signature · 7 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot