python-jwt/python-jwt.spec
2022-06-29 11:38:44 +08:00

94 lines
2.5 KiB
RPMSpec

%global srcname jwt
%bcond_with tests
Name: python-jwt
Version: 1.7.1
Release: 4
Summary: JSON Web Token implementation in Python
License: MIT
URL: https://github.com/jpadilla/pyjwt
Source0: https://files.pythonhosted.org/packages/source/P/PyJWT/PyJWT-1.7.1.tar.gz
BuildArch: noarch
Patch6000: backport-CVE-2022-29217.patch
BuildRequires: python2-devel python2-setuptools python2-cryptography
%if %{with tests}
BuildRequires: python2-pytest python-pytest-cov python-pytest-runner
BuildRequires: python3-pytest python3-pytest-cov python3-pytest-runner
%endif
BuildRequires: python%{python3_pkgversion}-devel python%{python3_pkgversion}-setuptools python%{python3_pkgversion}-cryptography
%global _description \
PyJWT is a Python library which allows you to encode and decode JSON Web Tokens (JWT). \
JWT is an open, industry-standard (RFC 7519) for representing claims securely between two parties.
%description %{_description}
%package -n python2-%{srcname}
Summary: %{summary}
Requires: python2-cryptography
%{?python_provide:%python_provide python2-%{srcname}}
%description -n python2-%{srcname} %{_description}
%package -n python%{python3_pkgversion}-%{srcname}
Summary: %{summary}
Requires: python%{python3_pkgversion}-cryptography
%{?python_provide:%python_provide python%{python3_pkgversion}-%{srcname}}
%description -n python%{python3_pkgversion}-%{srcname} %{_description}
%package_help
%prep
%autosetup -n PyJWT-%{version} -p1
%build
%py2_build
%py3_build
%install
%py2_install
%py3_install
%check
%if %{with tests}
%{__python2} setup.py test
%{__python3} setup.py test
%endif
%files -n python2-jwt
%license LICENSE AUTHORS
%{python2_sitelib}/%{srcname}/
%{python2_sitelib}/*.egg-info
%files -n python%{python3_pkgversion}-jwt
%license LICENSE AUTHORS
%{python3_sitelib}/%{srcname}/
%{python3_sitelib}/*.egg-info
%{_bindir}/pyjwt
%files help
%doc README.rst
%changelog
* Wed Jun 29 2022 shixuantong <shixuantong@h-partners.com> - 1.7.1-4
- Type:bugfix
- ID:NA
- SUG:NA
- DESC: fix patch error
* Tue Jun 14 2022 shixuantong <shixuantong@h-partners.com> - 1.7.1-3
- Type:CVE
- ID:CVE-2022-29217
- SUG:NA
- DESC:fix CVE-2022-29217
* Fri Oct 11 2019 yefei <yefei25@huawei.com> - 1.7.1-2
- Type:enhancement
- ID:NA
- SUG:NA
- DESC:move author from doc to license
* Sun Sep 15 2019 openEuler Buildteam <buildteam@openeuler.org> - 1.7.1-1
- Package init