forked from pool/python-cryptography
- Update building of Rust modules to use modern cargo_vendor
service - Remove unneeded use-offline-build.patch OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-cryptography?expand=0&rev=223
This commit is contained in:
5
_service
5
_service
@@ -1,9 +1,8 @@
|
||||
<services>
|
||||
<service name="download_files" mode="manual"/>
|
||||
<service name="cargo_vendor" mode="manual">
|
||||
<param name="src">cryptography-43.0.0/src/rust</param>
|
||||
<param name="cargotoml">Cargo.toml</param>
|
||||
<param name="srcdir">cryptography-*</param>
|
||||
<param name="cargotoml">src/rust/Cargo.toml</param>
|
||||
<param name="compression">zst</param>
|
||||
<param name="update">false</param>
|
||||
</service>
|
||||
</services>
|
||||
|
@@ -1,6 +1,5 @@
|
||||
---
|
||||
pyproject.toml | 31 -------------------------
|
||||
src/cryptography.egg-info/requires.txt | 2 -
|
||||
tests/bench/test_aead.py | 40 ++++++++++++++++-----------------
|
||||
tests/bench/test_ec_load.py | 8 +++---
|
||||
tests/bench/test_hashes.py | 4 +--
|
||||
@@ -21,7 +20,7 @@ Index: cryptography-43.0.0/pyproject.toml
|
||||
"pytest-xdist",
|
||||
"pretend",
|
||||
"certifi",
|
||||
@@ -118,7 +116,7 @@ exclude = [
|
||||
@@ -117,7 +115,7 @@ exclude = [
|
||||
]
|
||||
|
||||
[tool.pytest.ini_options]
|
||||
@@ -30,7 +29,7 @@ Index: cryptography-43.0.0/pyproject.toml
|
||||
console_output_style = "progress-even-when-capture-no"
|
||||
markers = [
|
||||
"skip_fips: this test is not executed in FIPS mode",
|
||||
@@ -140,33 +138,6 @@ module = [
|
||||
@@ -139,33 +137,6 @@ module = [
|
||||
]
|
||||
ignore_missing_imports = true
|
||||
|
||||
@@ -285,16 +284,3 @@ Index: cryptography-43.0.0/tests/bench/test_x509.py
|
||||
|
||||
- benchmark(bench)
|
||||
+ bench
|
||||
Index: cryptography-43.0.0/tests/bench/test_fernet.py
|
||||
===================================================================
|
||||
--- cryptography-43.0.0.orig/tests/bench/test_fernet.py
|
||||
+++ cryptography-43.0.0/tests/bench/test_fernet.py
|
||||
@@ -5,6 +5,6 @@
|
||||
from cryptography import fernet
|
||||
|
||||
|
||||
-def test_fernet_encrypt(benchmark):
|
||||
+def test_fernet_encrypt():
|
||||
f = fernet.Fernet(fernet.Fernet.generate_key())
|
||||
- benchmark(f.encrypt, b"\x00" * 256)
|
||||
+ f.encrypt(b"\x00" * 256)
|
||||
|
@@ -1,3 +1,10 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Jul 31 21:45:43 UTC 2024 - Matej Cepl <mcepl@cepl.eu>
|
||||
|
||||
- Update building of Rust modules to use modern cargo_vendor
|
||||
service
|
||||
- Remove unneeded use-offline-build.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Jul 26 10:33:45 UTC 2024 - Dirk Müller <dmueller@suse.com>
|
||||
|
||||
|
@@ -37,7 +37,6 @@ Source0: https://files.pythonhosted.org/packages/source/c/cryptography/cr
|
||||
# use `osc service manualrun` to regenerate
|
||||
Source2: vendor.tar.zst
|
||||
Source4: python-cryptography.keyring
|
||||
Patch1: use-offline-build.patch
|
||||
# PATCH-FEATURE-OPENSUSE no-pytest_benchmark.patch mcepl@suse.com
|
||||
# We don't need no benchmarking and coverage measurement
|
||||
Patch4: no-pytest_benchmark.patch
|
||||
@@ -46,10 +45,7 @@ BuildRequires: %{python_module devel}
|
||||
BuildRequires: %{python_module exceptiongroup}
|
||||
BuildRequires: %{python_module maturin}
|
||||
BuildRequires: %{python_module pip}
|
||||
BuildRequires: %{python_module pip}
|
||||
BuildRequires: %{python_module setuptools-rust >= 1.7.0}
|
||||
BuildRequires: %{python_module setuptools-rust >= 1.7.0}
|
||||
BuildRequires: %{python_module setuptools}
|
||||
BuildRequires: %{python_module setuptools}
|
||||
BuildRequires: %{python_module wheel}
|
||||
BuildRequires: cargo >= 1.56.0
|
||||
@@ -62,8 +58,10 @@ BuildRequires: zstd
|
||||
BuildRequires: pkgconfig(libffi)
|
||||
# python-base is not enough, we need the _ssl module
|
||||
Requires: python
|
||||
Requires: python-bcrypt
|
||||
%requires_eq python-cffi
|
||||
%if %{with test}
|
||||
BuildRequires: %{python_module bcrypt}
|
||||
BuildRequires: %{python_module certifi}
|
||||
BuildRequires: %{python_module cryptography >= %{version}}
|
||||
BuildRequires: %{python_module cryptography-vectors = %{version}}
|
||||
@@ -71,6 +69,7 @@ BuildRequires: %{python_module hypothesis >= 1.11.4}
|
||||
BuildRequires: %{python_module iso8601}
|
||||
BuildRequires: %{python_module pretend}
|
||||
BuildRequires: %{python_module pytest > 6.0}
|
||||
BuildRequires: %{python_module pytest-benchmark}
|
||||
BuildRequires: %{python_module pytest-subtests}
|
||||
BuildRequires: %{python_module pytest-xdist}
|
||||
BuildRequires: %{python_module pytz}
|
||||
@@ -90,9 +89,14 @@ functions.
|
||||
|
||||
%prep
|
||||
%autosetup -a2 -p1 -n cryptography-%{version}
|
||||
rm -v src/rust/Cargo.lock
|
||||
|
||||
%build
|
||||
cd src/rust
|
||||
tar xfv %{S:2}
|
||||
rm -v Cargo.lock
|
||||
cargo build
|
||||
cd -
|
||||
|
||||
# https://github.com/pyca/cryptography/issues/9023
|
||||
%global _lto_cflags %{nil}
|
||||
export RUSTFLAGS=%{rustflags}
|
||||
|
@@ -1,14 +0,0 @@
|
||||
Index: cryptography-43.0.0/pyproject.toml
|
||||
===================================================================
|
||||
--- cryptography-43.0.0.orig/pyproject.toml
|
||||
+++ cryptography-43.0.0/pyproject.toml
|
||||
@@ -84,7 +84,8 @@ python-source = "src"
|
||||
python-packages = ["cryptography"]
|
||||
manifest-path = "src/rust/Cargo.toml"
|
||||
module-name = "cryptography.hazmat.bindings._rust"
|
||||
-locked = true
|
||||
+locked = false
|
||||
+offline = true
|
||||
sdist-generator = "git"
|
||||
features = ["pyo3/abi3-py37"]
|
||||
include = [
|
@@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:60c28d9dc8f864cd112b91c911f7ddc7718117540c4b94c87c335289200aad9e
|
||||
size 1948651
|
||||
oid sha256:1ac7727c4e81168618b012aefd3a0bec71280701a76faae14d4981605a438874
|
||||
size 1949563
|
||||
|
Reference in New Issue
Block a user