From 235e4ac2e6f849f44f2edf6631383e2a52a36f7a185ae35c57d053591c208f3f Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Mon, 4 Oct 2021 21:39:33 +0000 Subject: [PATCH 1/2] Accepting request 922968 from system:homeautomation:home-assistant:unstable - update to 3.4.8 - keep new rust support disabled for now to avoid new dependencies OBS-URL: https://build.opensuse.org/request/show/922968 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-cryptography?expand=0&rev=138 --- cryptography-3.3.2.tar.gz | 3 --- cryptography-3.3.2.tar.gz.asc | 11 ----------- cryptography-3.4.8.tar.gz | 3 +++ cryptography-3.4.8.tar.gz.asc | 11 +++++++++++ python-cryptography.changes | 6 ++++++ python-cryptography.spec | 7 +++++-- 6 files changed, 25 insertions(+), 16 deletions(-) delete mode 100644 cryptography-3.3.2.tar.gz delete mode 100644 cryptography-3.3.2.tar.gz.asc create mode 100644 cryptography-3.4.8.tar.gz create mode 100644 cryptography-3.4.8.tar.gz.asc diff --git a/cryptography-3.3.2.tar.gz b/cryptography-3.3.2.tar.gz deleted file mode 100644 index f3f2113..0000000 --- a/cryptography-3.3.2.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:5a60d3780149e13b7a6ff7ad6526b38846354d11a15e21068e57073e29e19bed -size 539883 diff --git a/cryptography-3.3.2.tar.gz.asc b/cryptography-3.3.2.tar.gz.asc deleted file mode 100644 index 12ddf2c..0000000 --- a/cryptography-3.3.2.tar.gz.asc +++ /dev/null @@ -1,11 +0,0 @@ ------BEGIN PGP SIGNATURE----- - -iQEzBAABCAAdFiEEBf2foWz3VzUNkaVgI1rl8Sn57ZgFAmAgGngACgkQI1rl8Sn5 -7Zjfdwf8CO3jtW3dYS0sXDMQ1n300gUWW6y90xPj5elUfpG6YDREa+PDioo7CSzU -Xb+ldbBqJPaD7aF5MJ3cEp67WcQ6qW5MqkcrRcTlZkA3EqQqIIFf66jYGf63u5kC -QXTuU0hVx/JhqXYU8/LOja9lQ0SZirACYVR7pa3wFnJKaQeG0WLuT2ky9+UDW8nI -zxuAz/ysLgmlfLE60rUR53nVIu05m2AOQYWNjaWAagwYa72Hqztksot4wNFhAiUu -oe7yrbl7iEGkwzCAYWCl6HtSWIoXiQxUXOejzJVhyyOiubWFdDpWrflWUCZJdx2S -Dze+PGSBjOUEFW/KFU+mGK3evyImdQ== -=RmGY ------END PGP SIGNATURE----- diff --git a/cryptography-3.4.8.tar.gz b/cryptography-3.4.8.tar.gz new file mode 100644 index 0000000..58b9f30 --- /dev/null +++ b/cryptography-3.4.8.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:94cc5ed4ceaefcbe5bf38c8fba6a21fc1d365bb8fb826ea1688e3370b2e24a1c +size 546907 diff --git a/cryptography-3.4.8.tar.gz.asc b/cryptography-3.4.8.tar.gz.asc new file mode 100644 index 0000000..2cb44df --- /dev/null +++ b/cryptography-3.4.8.tar.gz.asc @@ -0,0 +1,11 @@ +-----BEGIN PGP SIGNATURE----- + +iQEzBAABCAAdFiEEBf2foWz3VzUNkaVgI1rl8Sn57ZgFAmElKd0ACgkQI1rl8Sn5 +7Zj4mwf6AoZkFckXshuEY9KYUNAd6rrt/J7MKvTXya3zxdH1nCvj+e9VMa3ariCt +/VZ1f7YEM/brN2YnVe9uN+x1CE5Kt9pL2RANXg6AuT0KWwP2FA7e8alSkG7eHfyv +zvWfCb8C7IhcoiVGByGF55vRxDQ02n+6/AikBlxQ+3hjQc9HMvjf74SJEhdiCCnu +D+PHmHuTu1aYw04MzTzhN3UQQewjzttX8xVYpD8nF/N9IxlEZHIAiyiSLUQ44SNR +S8zbkEHe0yQTx8t39w7Hr0yyFTBW9uNsnyc6+HV9+m3FsAsgVd6ZmpM5JH9vKrYb +tp8A0Tv5mX5Di0u5ZGjDjjdp+ZeLoQ== +=aP3q +-----END PGP SIGNATURE----- diff --git a/python-cryptography.changes b/python-cryptography.changes index 2642d0f..60861b2 100644 --- a/python-cryptography.changes +++ b/python-cryptography.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon Oct 4 07:00:30 UTC 2021 - Adrian Schröter + +- update to 3.4.8 +- keep new rust support disabled for now to avoid new dependencies + ------------------------------------------------------------------- Mon Apr 26 10:07:08 UTC 2021 - Matej Cepl diff --git a/python-cryptography.spec b/python-cryptography.spec index b118584..f663b2a 100644 --- a/python-cryptography.spec +++ b/python-cryptography.spec @@ -19,7 +19,7 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} %bcond_without python2 Name: python-cryptography -Version: 3.3.2 +Version: 3.4.8 Release: 0 Summary: Python library which exposes cryptographic recipes and primitives License: Apache-2.0 OR BSD-3-Clause @@ -39,6 +39,7 @@ BuildRequires: %{python_module idna >= 2.1} BuildRequires: %{python_module pyasn1-modules} BuildRequires: %{python_module pytz} BuildRequires: %{python_module setuptools >= 11.3} +BuildRequires: %{python_module setuptools_rust} BuildRequires: %{python_module six >= 1.4.1} BuildRequires: fdupes BuildRequires: libopenssl-devel @@ -63,6 +64,7 @@ BuildRequires: %{python_module packaging} BuildRequires: %{python_module pretend} BuildRequires: %{python_module pyasn1 >= 0.1.8} BuildRequires: %{python_module pytest > 3.3.0} +BuildRequires: %{python_module pytest-subtests} # /SECTION # python-base is not enough, we need the _ssl module Requires: python @@ -89,6 +91,7 @@ functions. %patch2 -p1 %build +export CRYPTOGRAPHY_DONT_BUILD_RUST=1 export CFLAGS="%{optflags} -fno-strict-aliasing" %python_build @@ -105,7 +108,7 @@ find . -name .keep -print -delete %files %{python_files} %license LICENSE LICENSE.APACHE LICENSE.BSD -%doc AUTHORS.rst CONTRIBUTING.rst CHANGELOG.rst README.rst +%doc CONTRIBUTING.rst CHANGELOG.rst README.rst %{python_sitearch}/* %changelog From f943f3caf8aa13a867a64918d59279f02bba30d4fd1482bc1553e97f4302f192 Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Wed, 13 Oct 2021 00:59:08 +0000 Subject: [PATCH 2/2] Accepting request 924948 from home:bnavigator:branches:devel:languages:python - Add disable-RustExtension.patch in order to avoid a build requirement setuptools_rust - Next version (35.0) needs a full Rust toolchain. - Clean runtime, build and test requirements - Disable python2 build: Not supported anymore OBS-URL: https://build.opensuse.org/request/show/924948 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-cryptography?expand=0&rev=139 --- disable-RustExtension.patch | 49 +++++++++++++++++++++++++++ python-cryptography.changes | 9 +++++ python-cryptography.spec | 67 ++++++++++++++++--------------------- 3 files changed, 87 insertions(+), 38 deletions(-) create mode 100644 disable-RustExtension.patch diff --git a/disable-RustExtension.patch b/disable-RustExtension.patch new file mode 100644 index 0000000..15b1d22 --- /dev/null +++ b/disable-RustExtension.patch @@ -0,0 +1,49 @@ +Index: cryptography-3.4.8/setup.py +=================================================================== +--- cryptography-3.4.8.orig/setup.py ++++ cryptography-3.4.8/setup.py +@@ -13,18 +13,9 @@ from setuptools import find_packages, se + try: + from setuptools_rust import RustExtension + except ImportError: +- print( +- """ +- =============================DEBUG ASSISTANCE========================== +- If you are seeing an error here please try the following to +- successfully install cryptography: +- +- Upgrade to the latest pip and try again. This will fix errors for most +- users. See: https://pip.pypa.io/en/stable/installing/#upgrading-pip +- =============================DEBUG ASSISTANCE========================== +- """ +- ) +- raise ++ print("Could not find setuptools_rust." ++ "Set CRYPTOGRAPHY_DONT_BUILD_RUST in order to not build with Rust") ++ RustExtension = None + + + base_dir = os.path.dirname(__file__) +@@ -41,9 +32,9 @@ with open(os.path.join(src_dir, "cryptog + + # `install_requirements` and `setup_requirements` must be kept in sync with + # `pyproject.toml` +-setuptools_rust = "setuptools-rust>=0.11.4" ++setuptools_rust = ["setuptools-rust>=0.11.4"] if RustExtension else [] + install_requirements = ["cffi>=1.12"] +-setup_requirements = install_requirements + [setuptools_rust] ++setup_requirements = install_requirements + setuptools_rust + + if os.environ.get("CRYPTOGRAPHY_DONT_BUILD_RUST"): + rust_extensions = [] +@@ -129,9 +120,7 @@ try: + "twine >= 1.12.0", + "sphinxcontrib-spelling >= 4.0.1", + ], +- "sdist": [ +- setuptools_rust, +- ], ++ "sdist": setuptools_rust, + "pep8test": [ + "black", + "flake8", diff --git a/python-cryptography.changes b/python-cryptography.changes index 60861b2..0212bfa 100644 --- a/python-cryptography.changes +++ b/python-cryptography.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Tue Oct 12 18:54:25 UTC 2021 - Ben Greiner + +- Add disable-RustExtension.patch in order to avoid a build + requirement setuptools_rust +- Next version (35.0) needs a full Rust toolchain. +- Clean runtime, build and test requirements +- Disable python2 build: Not supported anymore + ------------------------------------------------------------------- Mon Oct 4 07:00:30 UTC 2021 - Adrian Schröter diff --git a/python-cryptography.spec b/python-cryptography.spec index f663b2a..43a1bc2 100644 --- a/python-cryptography.spec +++ b/python-cryptography.spec @@ -16,8 +16,10 @@ # -%{?!python_module:%define python_module() python-%{**} python3-%{**}} -%bcond_without python2 +%{?!python_module:%define python_module() python3-%{**}} +%define skip_python2 1 +# disabled in order to avoid pulling dependencies -- adrian@suse.de +%bcond_with rust Name: python-cryptography Version: 3.4.8 Release: 0 @@ -31,47 +33,32 @@ Source2: %{name}.keyring # PATCH-FIX-SLE disable-uneven-sizes-tests.patch bnc#944204 Patch1: disable-uneven-sizes-tests.patch Patch2: skip_openssl_memleak_test.patch -BuildRequires: %{python_module asn1crypto >= 0.21.0} -BuildRequires: %{python_module cffi >= 1.7} -BuildRequires: %{python_module cryptography-vectors = %{version}} +# PATCH-FEATURE-OPENSUSE disable-RustExtension.patch -- disable setuptools_rust requirement if not building with rust +Patch3: disable-RustExtension.patch +BuildRequires: %{python_module cffi >= 1.12} BuildRequires: %{python_module devel} -BuildRequires: %{python_module idna >= 2.1} -BuildRequires: %{python_module pyasn1-modules} -BuildRequires: %{python_module pytz} -BuildRequires: %{python_module setuptools >= 11.3} +BuildRequires: %{python_module setuptools} +%if %{with rust} BuildRequires: %{python_module setuptools_rust} -BuildRequires: %{python_module six >= 1.4.1} +%endif BuildRequires: fdupes BuildRequires: libopenssl-devel BuildRequires: pkgconfig BuildRequires: python-rpm-macros BuildRequires: pkgconfig(libffi) -Requires: python-asn1crypto >= 0.21.0 -Recommends: python-idna >= 2.1 -Requires: python-packaging -Requires: python-pyasn1 >= 0.1.8 -Requires: python-setuptools >= 11.3 -Requires: python-six >= 1.4.1 %requires_eq python-cffi -%if %{with python2} -BuildRequires: python2-enum34 -BuildRequires: python2-ipaddress -%endif -# SECTION Test requirements -BuildRequires: %{python_module hypothesis >= 1.11.4} -BuildRequires: %{python_module iso8601} -BuildRequires: %{python_module packaging} -BuildRequires: %{python_module pretend} -BuildRequires: %{python_module pyasn1 >= 0.1.8} -BuildRequires: %{python_module pytest > 3.3.0} -BuildRequires: %{python_module pytest-subtests} -# /SECTION # python-base is not enough, we need the _ssl module Requires: python -%ifpython2 -Requires: python-enum34 -Requires: python-ipaddress -%endif +# SECTION Test requirements +BuildRequires: %{python_module cryptography-vectors = %{version}} +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-subtests} +BuildRequires: %{python_module pytest-xdist} +BuildRequires: %{python_module pytz} +# /SECTION %python_subpackages %description @@ -86,12 +73,12 @@ symmetric ciphers, message digests and key derivation functions. %prep -%setup -q -n cryptography-%{version} -%patch1 -p1 -%patch2 -p1 +%autosetup -p1 -n cryptography-%{version} %build +%if ! %{with rust} export CRYPTOGRAPHY_DONT_BUILD_RUST=1 +%endif export CFLAGS="%{optflags} -fno-strict-aliasing" %python_build @@ -100,15 +87,19 @@ export CFLAGS="%{optflags} -fno-strict-aliasing" # see https://github.com/pyca/cryptography/issues/1463 find . -name .keep -print -delete +%if ! %{with rust} +export CRYPTOGRAPHY_DONT_BUILD_RUST=1 +%endif %python_install %python_expand %fdupes %{buildroot}%{$python_sitearch} %check -%pytest_arch +%pytest_arch -n auto %files %{python_files} %license LICENSE LICENSE.APACHE LICENSE.BSD %doc CONTRIBUTING.rst CHANGELOG.rst README.rst -%{python_sitearch}/* +%{python_sitearch}/cryptography +%{python_sitearch}/cryptography-%{version}*-info %changelog