diff options
| author | Jeffery To <jeffery.to@gmail.com> | 2023-09-13 12:15:18 +0800 |
|---|---|---|
| committer | Tianling Shen <cnsztl@gmail.com> | 2023-10-02 19:15:02 +0800 |
| commit | 402ebe84f8bf1c0c657d7fe34314a0e08eee2767 (patch) | |
| tree | c9ccaea09b901b023d935d95ac5f0f96f37e540f /lang/python/python3-package.mk | |
| parent | f78e60fa8d339c48031a499124ff45a5942d04de (diff) | |
python: Add environment variables to build Rust extensions
Signed-off-by: Jeffery To <jeffery.to@gmail.com>
(cherry picked from commit 4d43be8549c8240f5039040fd1efd44aa2eb61fa)
Diffstat (limited to 'lang/python/python3-package.mk')
| -rw-r--r-- | lang/python/python3-package.mk | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lang/python/python3-package.mk b/lang/python/python3-package.mk index 268bca07f..0693d21ee 100644 --- a/lang/python/python3-package.mk +++ b/lang/python/python3-package.mk @@ -44,7 +44,12 @@ PYTHON3_VARS = \ PYTHONDONTWRITEBYTECODE=1 \ _python_sysroot="$(STAGING_DIR)" \ _python_prefix="/usr" \ - _python_exec_prefix="/usr" + _python_exec_prefix="/usr" \ + CARGO_BUILD_TARGET="$(RUSTC_TARGET_ARCH)" \ + CARGO_HOME="$(CARGO_HOME)" \ + PATH="$(CARGO_HOME)/bin:$(PATH)" \ + PYO3_CROSS_LIB_DIR="$(PYTHON3_LIB_DIR)" \ + RUSTFLAGS="$(CARGO_RUSTFLAGS)" # $(1) => directory of python script # $(2) => python script and its arguments |
