| |
@@ -2,8 +2,8 @@
|
| |
%global _summary JOSE implementation in Python
|
| |
|
| |
Name: python-%{srcname}
|
| |
- Version: 3.2.0
|
| |
- Release: 7%{?dist}
|
| |
+ Version: 3.3.0
|
| |
+ Release: 1%{?dist}
|
| |
Summary: A JOSE implementation in Python
|
| |
|
| |
License: MIT
|
| |
@@ -11,10 +11,6 @@
|
| |
Source0: %{pypi_source %{name}}
|
| |
BuildArch: noarch
|
| |
|
| |
- # Upstream support for ecdsa >= 0.16
|
| |
- # https://github.com/mpdavis/python-jose/pull/199
|
| |
- Patch0: %{name}-3.2.0-pr-199.patch
|
| |
-
|
| |
BuildRequires: python3-devel
|
| |
BuildRequires: pyproject-rpm-macros
|
| |
# From setup_requires:
|
| |
@@ -38,6 +34,13 @@
|
| |
Obsoletes: python3-%{srcname}-pycryptodome < 3.2.0-3
|
| |
%endif
|
| |
|
| |
+ # Upstream release 3.3.0, first packaged in Fedora 35, dropped the pycrypto
|
| |
+ # backend, so we obsolete the corresponding extra. The conditional reminds us
|
| |
+ # when the Obsoletes can be removed from the spec file.
|
| |
+ %if 0%{?fedora} != 0 && 0%{?fedora} < 38
|
| |
+ Obsoletes: python3-%{srcname}+pycrypto < 3.3.0-1
|
| |
+ %endif
|
| |
+
|
| |
# Upstream recommends the cryptography backend. We add it as a soft dependency
|
| |
# so that anyone who does not go out of their way to select a different backend
|
| |
# gets the best experience.
|
| |
@@ -51,7 +54,7 @@
|
| |
large, and might be daunting to some, it is expected that most applications
|
| |
will only use a small set of algorithms to meet their needs.
|
| |
|
| |
- As of 3.1.0, python-jose implements four different cryptographic backends. The
|
| |
+ As of 3.3.0, python-jose implements three different cryptographic backends. The
|
| |
backend must be selected as an extra when installing python-jose. If you do not
|
| |
select a backend, the native-python backend will be installed.
|
| |
|
| |
@@ -85,25 +88,13 @@
|
| |
|
| |
Note
|
| |
|
| |
- The native-python backend cannot process certificates.
|
| |
-
|
| |
- 4. pycrypto
|
| |
- * This backend uses pycrypto for all cryptographic operations.
|
| |
- * Installation: dnf install python3-jose+pycrypto
|
| |
- * Unused dependencies:
|
| |
- - rsa
|
| |
-
|
| |
- Warning
|
| |
-
|
| |
- The pycrypto project has not been maintained since 2013. This backend is
|
| |
- maintained for legacy compatibility purposes only. Do not use this backend
|
| |
- unless you cannot use any of the others.}
|
| |
+ The native-python backend cannot process certificates.}
|
| |
|
| |
%description %{common_description}
|
| |
|
| |
|
| |
%generate_buildrequires
|
| |
- %pyproject_buildrequires -t -x cryptography,pycrypto
|
| |
+ %pyproject_buildrequires -t -x cryptography
|
| |
|
| |
|
| |
%package -n python3-%{srcname}
|
| |
@@ -121,15 +112,9 @@
|
| |
# We use the expansion of (on a single line):
|
| |
#
|
| |
# %%python_extras_subpkg -n python3-%%{srcname}
|
| |
- # -i %%{python3_sitelib}/*.dist-info
|
| |
- # cryptography pycrypto
|
| |
- #
|
| |
- # macro, but add Provides/Obsoletes for the old backend subpackages.
|
| |
+ # -i %%{python3_sitelib}/*.dist-info cryptography
|
| |
#
|
| |
- # Even though Fedora 32 does not have
|
| |
- # https://fedoraproject.org/wiki/Changes/PythonExtras, these metapackages will
|
| |
- # still work; they just will not provide python3dist(python-jose[*]), and they
|
| |
- # need manual Requires.
|
| |
+ # but add Provides/Obsoletes for the old backend subpackages.
|
| |
|
| |
|
| |
%package -n python3-%{srcname}+cryptography
|
| |
@@ -150,28 +135,9 @@
|
| |
%ghost %{python3_sitelib}/*.dist-info
|
| |
|
| |
|
| |
- %package -n python3-%{srcname}+pycrypto
|
| |
- Summary: Metapackage for python3-%{srcname}: pycrypto extras
|
| |
-
|
| |
- Requires: python3-%{srcname} = %{version}-%{release}
|
| |
- %if 0%{?fedora} != 0 && 0%{?fedora} < 38
|
| |
- Provides: python3-%{srcname}-pycrypto = %{version}-%{release}
|
| |
- Obsoletes: python3-%{srcname}-pycrypto < 3.2.0-3
|
| |
- %endif
|
| |
-
|
| |
- %description -n python3-%{srcname}+pycrypto
|
| |
- This is a metapackage bringing in pycrypto extras requires for python3-%{srcname}.
|
| |
- It contains no code, just makes sure the dependencies are installed.
|
| |
-
|
| |
- %files -n python3-%{srcname}+pycrypto
|
| |
- %ghost %{python3_sitelib}/*.dist-info
|
| |
-
|
| |
-
|
| |
%prep
|
| |
%autosetup -p1
|
| |
|
| |
- rm -rvf *.egg-info *.dist-info
|
| |
-
|
| |
# Patch out pycryptodome backend extra and tests where required; see note near
|
| |
# the BR’s
|
| |
sed -r -i '/^[[:blank:]]*pycryptodome/d' tox.ini requirements.txt
|
| |
@@ -194,15 +160,11 @@
|
| |
|
| |
%check
|
| |
echo '>>> Backend: native-python <<<' 1>&2
|
| |
- m='not (cryptography or pycryptodome or pycrypto or backend_compatibility)'
|
| |
+ m='not (cryptography or pycryptodome or backend_compatibility)'
|
| |
%{pytest} -k "${k}" -m "${m}" tests
|
| |
|
| |
echo '>>> Backend: cryptography <<<' 1>&2
|
| |
- m='not (pycryptodome or pycrypto or backend_compatibility)'
|
| |
- %{pytest} -k "${k}" -m "${m}" tests
|
| |
-
|
| |
- echo '>>> Backend: pycrypto <<<' 1>&2
|
| |
- m='not (cryptography or pycryptodome or backend_compatibility)'
|
| |
+ m='not (pycryptodome or backend_compatibility)'
|
| |
%{pytest} -k "${k}" -m "${m}" tests
|
| |
|
| |
echo '>>> Cross-backend compatibility and coexistence <<<' 1>&2
|
| |
@@ -220,6 +182,14 @@
|
| |
|
| |
|
| |
%changelog
|
| |
+ * Sun Jun 06 2021 Benjamin A. Beasley <code@musicinmybrain.net> - 3.3.0-1
|
| |
+ - Update to 3.3.0 (fixes RHBZ#1968095)
|
| |
+ - Drop python-jose-3.2.0-pr-199.patch (backported ecdsa 0.16 support), now
|
| |
+ merged upstream
|
| |
+ - Upstream dropped pycypto backend; we drop the corresponding extra
|
| |
+ - Remove a comment referring to Fedora 32 since it is EOL
|
| |
+ - Stop removing egg-info/dist-info (not needed with pyproject-rpm-macros
|
| |
+
|
| |
* Fri Jun 04 2021 Python Maint <python-maint@redhat.com> - 3.2.0-7
|
| |
- Rebuilt for Python 3.10
|
| |
|
| |