add sw_64 support

(cherry picked from commit 84460b83342dbb0df4659eef17a50edd83756264)
This commit is contained in:
Hailiang 2025-05-12 17:33:55 +08:00 committed by openeuler-sync-bot
parent 1ef8b96c91
commit 832e7e3a73
2 changed files with 11 additions and 1 deletions

View File

@ -1,7 +1,7 @@
%global pypi_name cryptography
Name: python-%{pypi_name}
Version: 42.0.2
Release: 4
Release: 5
Summary: PyCA's cryptography library
License: ASL 2.0 or BSD
URL: https://cryptography.io/en/latest/
@ -12,6 +12,7 @@ Source0: %{pypi_source %{pypi_name}}
# finally, tar -czvf cargo-vendor-cache.tar.gz vendor
# Note: Cargo needs to be consistent with the cargo version in the compile environment.
Source1: cargo-vendor-cache.tar.gz
Source2: sw64-vendor.tar.gz
Patch6002: backport-provide-openssl-apis-related-to-SM-for-python.patch
Patch6003: backport-CVE-2024-26130.patch
@ -59,6 +60,12 @@ recipes to Python developers.
%prep
%autosetup -n %{pypi_name}-%{version} -p1
tar xzvf %{SOURCE1} -C ./src/rust/
%ifarch sw_64
rm -rf ./src/rust/Cargo.lock
rm -rf ./src/rust/vendor/libc
rm -rf ./src/rust/vendor/target-lexicon
tar xzvf %{SOURCE2} -C ./src/rust/vendor
%endif
mkdir .cargo
cat >> .cargo/config.toml << EOF
[source.crates-io]
@ -93,6 +100,9 @@ PYTHONPATH=%{buildroot}%{python3_sitearch} %{__python3} -m pytest --ignore vendo
%doc README.rst docs
%changelog
* Mon May 12 2025 mahailiang <mahailiang@uniontech.com> - 42.0.2-5
- add sw_64 support
* Fri Jul 26 2024 shixuantong <shixuantong1@huawei.com> - 42.0.2-4
- enable check

BIN
sw64-vendor.tar.gz Normal file

Binary file not shown.