[packages/python3-rpds-py] - offline crates
baggins
baggins at pld-linux.org
Sat Apr 5 02:55:39 CEST 2025
commit 0aac5509aca16d61e40428e6d02d9141845cd674
Author: Jan Rękorajski <baggins at pld-linux.org>
Date: Sat Apr 5 02:06:20 2025 +0200
- offline crates
python3-rpds-py.spec | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)
---
diff --git a/python3-rpds-py.spec b/python3-rpds-py.spec
index 8bd2c68..b5a5e6a 100644
--- a/python3-rpds-py.spec
+++ b/python3-rpds-py.spec
@@ -52,7 +52,31 @@ Dokumentacja API modułu Pythona %{module}.
%prep
%setup -q -a1 -n rpds_py-%{version}
+# use our offline registry
+export CARGO_HOME="$(pwd)/.cargo"
+
+mkdir -p "$CARGO_HOME"
+cat >.cargo/config <<EOF
+[source.crates-io]
+registry = 'https://github.com/rust-lang/crates.io-index'
+replace-with = 'vendored-sources'
+
+[source.vendored-sources]
+directory = '$PWD/vendor'
+EOF
+
%build
+export CARGO_HOME="$(pwd)/src/rust/.cargo"
+export CARGO_OFFLINE=true
+export RUSTFLAGS="%{rpmrustflags}"
+export CARGO_TERM_VERBOSE=true
+%ifarch x32
+export CARGO_BUILD_TARGET=x86_64-unknown-linux-gnux32
+export PKG_CONFIG_ALLOW_CROSS=1
+%endif
+
+export CFLAGS="%{rpmcflags}"
+
%py3_build_pyproject
%if %{with tests}
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/python3-rpds-py.git/commitdiff/0aac5509aca16d61e40428e6d02d9141845cd674
More information about the pld-cvs-commit
mailing list