From 9150b5ddf8ea434e8961468a67f86709402aaf9d Mon Sep 17 00:00:00 2001 From: Daniel Golle Date: Tue, 27 Oct 2026 20:38:59 +0200 Subject: [PATCH] python: include rust-values.mk in the Rust packages only python3-host.mk includes the Rust values of lang/rust for every Python package. The build system's cmake.mk and meson.mk react to Rust variables, so packages without any Rust in them get Rust settings, and a Python package moving to the build system's Rust toolchain would get both sets of values. Include rust-values.mk in the six packages that use its variables. The variables in PYTHON3_VARS and HOST_PYTHON3_VARS are expanded late, so the place of the include does not matter. Signed-off-by: Daniel Golle --- lang/python/pymysql/Makefile | 1 + lang/python/python-bcrypt/Makefile | 1 + lang/python/python-cryptography/Makefile | 1 + lang/python/python-maturin/Makefile | 1 + lang/python/python-orjson/Makefile | 1 + lang/python/python-rpds-py/Makefile | 1 + lang/python/python3-host.mk | 1 - 7 files changed, 6 insertions(+), 1 deletion(-) diff --git a/lang/python/pymysql/Makefile b/lang/python/pymysql/Makefile index 5f484cbe76..7124da88d1 100644 --- a/lang/python/pymysql/Makefile +++ b/lang/python/pymysql/Makefile @@ -23,6 +23,7 @@ PKG_CONFIG_DEPENDS:=CONFIG_PYTHON3_PYMYSQL_SHA_PASSWORD_SUPPORT include ../pypi.mk include $(INCLUDE_DIR)/package.mk include ../python3-package.mk +include ../../rust/rust-values.mk define Package/python3-pymysql/Default SUBMENU:=Python diff --git a/lang/python/python-bcrypt/Makefile b/lang/python/python-bcrypt/Makefile index 28bde25a89..f07af61ac1 100644 --- a/lang/python/python-bcrypt/Makefile +++ b/lang/python/python-bcrypt/Makefile @@ -21,6 +21,7 @@ PKG_BUILD_DEPENDS:=python-setuptools-rust/host include ../pypi.mk include $(INCLUDE_DIR)/package.mk include ../python3-package.mk +include ../../rust/rust-values.mk define Package/python3-bcrypt SECTION:=lang diff --git a/lang/python/python-cryptography/Makefile b/lang/python/python-cryptography/Makefile index 000b983bb7..e1240a5229 100644 --- a/lang/python/python-cryptography/Makefile +++ b/lang/python/python-cryptography/Makefile @@ -24,6 +24,7 @@ PKG_BUILD_DEPENDS:=libffi/host python-cffi/host python-maturin/host python-setup include ../pypi.mk include $(INCLUDE_DIR)/package.mk include ../python3-package.mk +include ../../rust/rust-values.mk define Package/python3-cryptography SECTION:=lang diff --git a/lang/python/python-maturin/Makefile b/lang/python/python-maturin/Makefile index 7f9ca5a17d..a653e4d491 100644 --- a/lang/python/python-maturin/Makefile +++ b/lang/python/python-maturin/Makefile @@ -30,6 +30,7 @@ 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 define Package/python3-maturin SECTION:=lang diff --git a/lang/python/python-orjson/Makefile b/lang/python/python-orjson/Makefile index dd00814b25..ecc7016607 100644 --- a/lang/python/python-orjson/Makefile +++ b/lang/python/python-orjson/Makefile @@ -17,6 +17,7 @@ PKG_BUILD_DEPENDS:=python-maturin/host include ../pypi.mk include $(INCLUDE_DIR)/package.mk include ../python3-package.mk +include ../../rust/rust-values.mk define Package/python3-orjson SECTION:=lang diff --git a/lang/python/python-rpds-py/Makefile b/lang/python/python-rpds-py/Makefile index 3ea2c0d07f..f4f745a665 100644 --- a/lang/python/python-rpds-py/Makefile +++ b/lang/python/python-rpds-py/Makefile @@ -24,6 +24,7 @@ PKG_BUILD_DEPENDS:=python-maturin/host include ../pypi.mk include $(INCLUDE_DIR)/package.mk include ../python3-package.mk +include ../../rust/rust-values.mk define Package/python3-rpds-py SECTION:=lang diff --git a/lang/python/python3-host.mk b/lang/python/python3-host.mk index 7c16703ee9..2af8a8d8fd 100644 --- a/lang/python/python3-host.mk +++ b/lang/python/python3-host.mk @@ -11,7 +11,6 @@ # For PYTHON3_VERSION python3_mk_path:=$(dir $(lastword $(MAKEFILE_LIST))) include $(python3_mk_path)python3-version.mk -include $(python3_mk_path)../rust/rust-values.mk # Unset environment variables