!111 [sync] PR-108: add sw_64 support

From: @openeuler-sync-bot 
Reviewed-by: @dillon_chen 
Signed-off-by: @dillon_chen
This commit is contained in:
openeuler-ci-bot 2025-05-13 09:36:46 +00:00 committed by Gitee
commit f1903b53bf
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
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.