From 3ecb72def55ae89e90375c134116c3660c3da8ea Mon Sep 17 00:00:00 2001 From: Daniel Golle Date: Tue, 27 Oct 2026 20:51:08 +0200 Subject: [PATCH] python-maturin: use the build system's Rust support Include rust-values.mk of the build system and build from a vendor tarball generated from the PyPI archive, so that cargo builds offline. Signed-off-by: Daniel Golle --- lang/python/python-maturin/Makefile | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/lang/python/python-maturin/Makefile b/lang/python/python-maturin/Makefile index a653e4d491..52c5ff21a0 100644 --- a/lang/python/python-maturin/Makefile +++ b/lang/python/python-maturin/Makefile @@ -6,10 +6,16 @@ include $(TOPDIR)/rules.mk PKG_NAME:=python-maturin PKG_VERSION:=1.15.0 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PYPI_NAME:=maturin -PKG_HASH:=94b26cc8e8aba61a5f2099715fe640e18c5f678e9a500408b38761263954228a +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-vendor.tar.zst +PKG_SOURCE_URL:=@OPENWRT +PKG_SOURCE_PROTO:=cargo-vendor-archive +PKG_VENDOR_FILE:=$(PYPI_NAME)-$(PKG_VERSION).tar.gz +PKG_VENDOR_URL:=https://files.pythonhosted.org/packages/source/m/$(PYPI_NAME) +PKG_VENDOR_HASH:=94b26cc8e8aba61a5f2099715fe640e18c5f678e9a500408b38761263954228a +PKG_HASH:=0572e3feb48168bd94c3c1a7f624d860aa44ef7ac50fc9619ac93a8ca786c900 PKG_MAINTAINER:=Luca Barbato PKG_LICENSE:=Apache-2.0 MIT @@ -30,7 +36,9 @@ include $(INCLUDE_DIR)/host-build.mk include $(INCLUDE_DIR)/package.mk include ../python3-package.mk include ../python3-host-build.mk -include ../../rust/rust-values.mk +include $(INCLUDE_DIR)/rust-values.mk + +HOST_BUILD_DEPENDS+=$(RUST_HOST_BUILD_DEPENDS) define Package/python3-maturin SECTION:=lang