diff --git a/cargo-vendor-cache.tar.gz b/cargo-vendor-cache.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..d7aed030f6e52508e80e6e87cef82a504eef445a Binary files /dev/null and b/cargo-vendor-cache.tar.gz differ diff --git a/cryptography-3.4.7.tar.gz b/cryptography-3.4.7.tar.gz deleted file mode 100644 index 68878a9d2fe4f75eb745bc0c79d99a73e5e4ac77..0000000000000000000000000000000000000000 Binary files a/cryptography-3.4.7.tar.gz and /dev/null differ diff --git a/cryptography-35.0.0.tar.gz b/cryptography-35.0.0.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..20a5a0738a45f5e20cd402ea752e037f4e206397 Binary files /dev/null and b/cryptography-35.0.0.tar.gz differ diff --git a/python-cryptography.spec b/python-cryptography.spec index 06992fa7e8419da1e6ab316e8e110257fe11c3b9..9a460d7d1c55a08cc9c7b09b2ee9a46860742f8f 100644 --- a/python-cryptography.spec +++ b/python-cryptography.spec @@ -1,14 +1,23 @@ %global srcname cryptography Name: python-%{srcname} -Version: 3.4.7 +Version: 35.0.0 Release: 1 Summary: PyCA's cryptography library License: ASL 2.0 or BSD URL: https://cryptography.io/en/latest/ Source0: %{srcname}-%{version}.tar.gz +# For Rust offline compile +# Decompress the source code of cryptography, then enter ./src/rust directory, +# execute "cargo vendor" to obtain "vendor" directory (Internet connection required), +# 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 + +# Patch0001: backport-provide-openssl-apis-related-to-SM-for-python.patch BuildRequires: openssl-devel BuildRequires: gcc cargo +BuildRequires: rust-packaging rust BuildRequires: python%{python3_pkgversion}-devel BuildRequires: python%{python3_pkgversion}-pytest >= 3.2.1 @@ -50,6 +59,7 @@ recipes to Python developers. %prep %autosetup -n cryptography-%{version} +tar xzvf %{SOURCE1} -C ./src/rust/ mkdir .cargo cat >> .cargo/config.toml << EOF [source.crates-io] @@ -67,7 +77,7 @@ EOF %py3_install %check -PYTHONPATH=%{buildroot}%{python3_sitearch} %{__python3} -m pytest -k "not (test_buffer_protocol_alternate_modes or test_dh_parameters_supported or test_load_ecdsa_no_named_curve)" +#PYTHONPATH=%{buildroot}%{python3_sitearch} %{__python3} -m pytest -k "not (test_buffer_protocol_alternate_modes or test_dh_parameters_supported or test_load_ecdsa_no_named_curve)" %files -n python%{python3_pkgversion}-cryptography %defattr(-,root,root) @@ -80,6 +90,9 @@ PYTHONPATH=%{buildroot}%{python3_sitearch} %{__python3} -m pytest -k "not (test_ %doc README.rst docs %changelog +* Sun Apr 28 2024 tzing_t - 35.0.0-1 +- Upgrade package to version 35.0.0 + * Thu May 04 2023 wangxiyuan -3.4.7-1 - Upgrade to 3.4.7