2019-08-29 08:48:06 +00:00
|
|
|
%if 0%{?fedora} || 0%{?rhel} > 7
|
|
|
|
# Enable python3 build by default
|
|
|
|
%bcond_without python3
|
|
|
|
%else
|
|
|
|
%bcond_with python3
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%if 0%{?fedora} > 31 || 0%{?rhel} > 7
|
|
|
|
# Disable python2 build by default
|
|
|
|
%bcond_with python2
|
|
|
|
%else
|
|
|
|
%bcond_without python2
|
2015-07-09 07:49:14 +00:00
|
|
|
%endif
|
|
|
|
|
2017-08-01 18:10:47 +00:00
|
|
|
%global srcname jwcrypto
|
2015-07-09 07:49:14 +00:00
|
|
|
|
2017-08-01 18:10:47 +00:00
|
|
|
Name: python-%{srcname}
|
2022-09-14 22:24:52 +00:00
|
|
|
Version: 1.4.1
|
2022-09-13 17:37:22 +00:00
|
|
|
Release: %autorelease
|
2017-08-01 18:10:47 +00:00
|
|
|
Summary: Implements JWK, JWS, JWE specifications using python-cryptography
|
2015-07-09 07:49:14 +00:00
|
|
|
|
|
|
|
License: LGPLv3+
|
2017-08-01 18:10:47 +00:00
|
|
|
URL: https://github.com/latchset/%{srcname}
|
|
|
|
Source0: https://github.com/latchset/%{srcname}/releases/download/v%{version}/%{srcname}-%{version}.tar.gz
|
2015-07-09 07:49:14 +00:00
|
|
|
|
|
|
|
BuildArch: noarch
|
2019-08-29 08:48:06 +00:00
|
|
|
%if 0%{?with_python2}
|
2017-07-24 09:30:15 +00:00
|
|
|
BuildRequires: python2-devel
|
|
|
|
BuildRequires: python2-setuptools
|
2021-06-10 16:38:22 +00:00
|
|
|
BuildRequires: python2-cryptography >= 2.3
|
2017-07-24 09:30:15 +00:00
|
|
|
BuildRequires: python2-pytest
|
2021-06-10 17:09:33 +00:00
|
|
|
BuildRequires: python2-deprecated
|
2019-08-29 08:48:06 +00:00
|
|
|
%endif
|
2015-07-09 07:49:14 +00:00
|
|
|
|
|
|
|
%if 0%{?with_python3}
|
2017-08-01 18:10:47 +00:00
|
|
|
BuildRequires: python%{python3_pkgversion}-devel
|
|
|
|
BuildRequires: python%{python3_pkgversion}-setuptools
|
2021-06-10 16:38:22 +00:00
|
|
|
BuildRequires: python%{python3_pkgversion}-cryptography >= 2.3
|
2017-08-01 18:10:47 +00:00
|
|
|
BuildRequires: python%{python3_pkgversion}-pytest
|
2021-06-10 17:09:33 +00:00
|
|
|
BuildRequires: python%{python3_pkgversion}-deprecated
|
2015-07-09 07:49:14 +00:00
|
|
|
%endif
|
|
|
|
|
|
|
|
%description
|
2017-08-01 18:10:47 +00:00
|
|
|
Implements JWK, JWS, JWE specifications using python-cryptography
|
|
|
|
|
|
|
|
|
2019-08-29 08:48:06 +00:00
|
|
|
%if 0%{?with_python2}
|
2017-08-01 18:10:47 +00:00
|
|
|
%package -n python2-%{srcname}
|
|
|
|
Summary: Implements JWK,JWS,JWE specifications using python-cryptography
|
2021-06-10 16:38:22 +00:00
|
|
|
Requires: python2-cryptography >= 2.3
|
2021-06-10 17:09:33 +00:00
|
|
|
Requires: python2-deprecated
|
2017-08-01 18:10:47 +00:00
|
|
|
%{?python_provide:%python_provide python2-%{srcname}}
|
|
|
|
|
|
|
|
%description -n python2-%{srcname}
|
|
|
|
Implements JWK, JWS, JWE specifications using python-cryptography
|
2019-08-29 08:48:06 +00:00
|
|
|
%endif
|
2017-08-01 18:10:47 +00:00
|
|
|
|
2015-07-09 07:49:14 +00:00
|
|
|
|
|
|
|
%if 0%{?with_python3}
|
2017-08-01 18:10:47 +00:00
|
|
|
%package -n python%{python3_pkgversion}-%{srcname}
|
|
|
|
Summary: Implements JWK, JWS, JWE specifications using python-cryptography
|
2021-06-10 16:38:22 +00:00
|
|
|
Requires: python%{python3_pkgversion}-cryptography >= 2.3
|
2021-06-10 17:09:33 +00:00
|
|
|
Requires: python%{python3_pkgversion}-deprecated
|
2017-08-01 18:10:47 +00:00
|
|
|
%{?python_provide:%python_provide python%{python3_pkgversion}-%{srcname}}
|
2015-07-09 07:49:14 +00:00
|
|
|
|
2017-08-01 18:10:47 +00:00
|
|
|
%description -n python%{python3_pkgversion}-%{srcname}
|
|
|
|
Implements JWK, JWS, JWE specifications using python-cryptography
|
2015-07-09 07:49:14 +00:00
|
|
|
%endif
|
|
|
|
|
2017-08-01 18:10:47 +00:00
|
|
|
|
2015-07-09 07:49:14 +00:00
|
|
|
%prep
|
2017-08-01 18:10:47 +00:00
|
|
|
%setup -q -n %{srcname}-%{version}
|
2015-07-09 07:49:14 +00:00
|
|
|
|
|
|
|
|
|
|
|
%build
|
2019-08-29 08:48:06 +00:00
|
|
|
%if 0%{?with_python2}
|
2017-08-01 18:10:47 +00:00
|
|
|
%py2_build
|
2019-08-29 08:48:06 +00:00
|
|
|
%endif
|
2015-07-09 07:49:14 +00:00
|
|
|
%if 0%{?with_python3}
|
2017-08-01 18:10:47 +00:00
|
|
|
%py3_build
|
2015-07-09 07:49:14 +00:00
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
|
|
%check
|
2019-08-29 08:48:06 +00:00
|
|
|
%if 0%{?with_python2}
|
2017-08-02 08:06:32 +00:00
|
|
|
%{__python2} -bb -m pytest %{srcname}/test*.py
|
2019-08-29 08:48:06 +00:00
|
|
|
%endif
|
2017-07-24 09:30:15 +00:00
|
|
|
%if 0%{?with_python3}
|
2017-08-02 08:06:32 +00:00
|
|
|
%{__python3} -bb -m pytest %{srcname}/test*.py
|
2017-07-24 09:30:15 +00:00
|
|
|
%endif
|
2015-07-09 07:49:14 +00:00
|
|
|
|
|
|
|
|
|
|
|
%install
|
2019-08-29 08:48:06 +00:00
|
|
|
%if 0%{?with_python2}
|
2017-08-01 18:10:47 +00:00
|
|
|
%py2_install
|
2019-08-29 08:48:06 +00:00
|
|
|
%endif
|
2015-07-09 07:49:14 +00:00
|
|
|
%if 0%{?with_python3}
|
2017-08-01 18:10:47 +00:00
|
|
|
%py3_install
|
2015-07-09 07:49:14 +00:00
|
|
|
%endif
|
2017-08-01 18:10:47 +00:00
|
|
|
|
|
|
|
rm -rf %{buildroot}%{_docdir}/%{srcname}
|
2019-08-29 08:48:06 +00:00
|
|
|
%if 0%{?with_python2}
|
2017-08-01 18:10:47 +00:00
|
|
|
rm -rf %{buildroot}%{python2_sitelib}/%{srcname}/tests{,-cookbook}.py*
|
2019-08-29 08:48:06 +00:00
|
|
|
%endif
|
2015-07-09 07:49:14 +00:00
|
|
|
%if 0%{?with_python3}
|
2017-08-01 18:10:47 +00:00
|
|
|
rm -rf %{buildroot}%{python3_sitelib}/%{srcname}/tests{,-cookbook}.py*
|
|
|
|
rm -rf %{buildroot}%{python3_sitelib}/%{srcname}/__pycache__/tests{,-cookbook}.*.py*
|
2015-07-09 07:49:14 +00:00
|
|
|
%endif
|
|
|
|
|
2019-08-29 08:48:06 +00:00
|
|
|
|
|
|
|
%if 0%{?with_python2}
|
2017-08-01 18:10:47 +00:00
|
|
|
%files -n python2-%{srcname}
|
2015-07-09 07:49:14 +00:00
|
|
|
%doc README.md
|
|
|
|
%license LICENSE
|
2017-08-01 18:10:47 +00:00
|
|
|
%{python2_sitelib}/%{srcname}
|
|
|
|
%{python2_sitelib}/%{srcname}-%{version}-py%{python2_version}.egg-info
|
2019-08-29 08:48:06 +00:00
|
|
|
%endif
|
2015-07-09 07:49:14 +00:00
|
|
|
|
|
|
|
%if 0%{?with_python3}
|
2017-08-01 18:10:47 +00:00
|
|
|
%files -n python%{python3_pkgversion}-%{srcname}
|
2015-07-09 07:49:14 +00:00
|
|
|
%doc README.md
|
|
|
|
%license LICENSE
|
2017-08-01 18:10:47 +00:00
|
|
|
%{python3_sitelib}/%{srcname}
|
|
|
|
%{python3_sitelib}/%{srcname}-%{version}-py%{python3_version}.egg-info
|
2015-07-09 07:49:14 +00:00
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
|
|
%changelog
|
2022-09-13 17:37:22 +00:00
|
|
|
%autochangelog
|