Convert to pyproject macros
This commit is contained in:
parent
998d3d9c3e
commit
39f6e0711c
@ -2,8 +2,6 @@
|
|||||||
%global srcname PyJWT
|
%global srcname PyJWT
|
||||||
# what it's imported as
|
# what it's imported as
|
||||||
%global libname jwt
|
%global libname jwt
|
||||||
# name of egg info directory
|
|
||||||
%global eggname %{srcname}
|
|
||||||
# package name fragment
|
# package name fragment
|
||||||
%global pkgname %{libname}
|
%global pkgname %{libname}
|
||||||
|
|
||||||
@ -16,60 +14,62 @@ encrypted JSON objects.}
|
|||||||
|
|
||||||
Name: python-%{pkgname}
|
Name: python-%{pkgname}
|
||||||
Version: 2.3.0
|
Version: 2.3.0
|
||||||
Release: 2%{?dist}
|
Release: 3%{?dist}
|
||||||
Summary: JSON Web Token implementation in Python
|
Summary: JSON Web Token implementation in Python
|
||||||
License: MIT
|
License: MIT
|
||||||
URL: https://github.com/jpadilla/pyjwt
|
URL: https://github.com/jpadilla/pyjwt
|
||||||
Source0: %pypi_source
|
Source: %pypi_source
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
|
|
||||||
|
|
||||||
%description %{common_description}
|
%description %{common_description}
|
||||||
|
|
||||||
|
|
||||||
%package -n python%{python3_pkgversion}-%{pkgname}
|
%package -n python3-%{pkgname}
|
||||||
Summary: %{summary}
|
Summary: %{summary}
|
||||||
BuildRequires: python%{python3_pkgversion}-devel
|
BuildRequires: python3-devel
|
||||||
BuildRequires: python%{python3_pkgversion}-setuptools
|
Recommends: python3-%{pkgname}+crypto
|
||||||
BuildRequires: python%{python3_pkgversion}-cryptography >= 1.4.0
|
|
||||||
BuildRequires: python%{python3_pkgversion}-pytest
|
|
||||||
|
|
||||||
%{?python_extras_subpkg:Recommends: python%{python3_pkgversion}-%{pkgname}+crypto}
|
|
||||||
%{!?python_extras_subpkg:Requires: python%{python3_pkgversion}-cryptography >= 1.4.0}
|
|
||||||
|
|
||||||
%{?python_provide:%python_provide python%{python3_pkgversion}-%{pkgname}}
|
|
||||||
|
|
||||||
|
|
||||||
%description -n python%{python3_pkgversion}-%{pkgname} %{common_description}
|
%description -n python3-%{pkgname} %{common_description}
|
||||||
|
|
||||||
%{?python_extras_subpkg:%python_extras_subpkg -n python%{python3_pkgversion}-%{pkgname} -i %{python3_sitelib}/%{eggname}-%{version}-py%{python3_version}.egg-info crypto}
|
|
||||||
|
%pyproject_extras_subpkg -n python3-%{pkgname} crypto
|
||||||
|
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%autosetup -n %{srcname}-%{version}
|
%autosetup -n %{srcname}-%{version}
|
||||||
rm -rf %{eggname}.egg-info
|
# remove coverage buildreq and relax pytest req
|
||||||
|
sed -e '/coverage/d' \
|
||||||
|
-e '/pytest/ s/,<7.0.0//' \
|
||||||
|
-i setup.cfg
|
||||||
|
|
||||||
|
|
||||||
|
%generate_buildrequires
|
||||||
|
%pyproject_buildrequires -x crypto,tests
|
||||||
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%py3_build
|
%pyproject_wheel
|
||||||
|
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%py3_install
|
%pyproject_install
|
||||||
|
%pyproject_save_files %{libname}
|
||||||
|
|
||||||
|
|
||||||
%check
|
%check
|
||||||
PYTHONPATH=%{buildroot}%{python3_sitelib} py.test-%{python3_version} --verbose tests
|
%pytest
|
||||||
|
|
||||||
|
|
||||||
%files -n python%{python3_pkgversion}-%{pkgname}
|
%files -n python3-%{pkgname} -f %{pyproject_files}
|
||||||
%doc README.rst AUTHORS.rst
|
%doc README.rst
|
||||||
%license LICENSE
|
|
||||||
%{python3_sitelib}/%{libname}
|
|
||||||
%{python3_sitelib}/%{eggname}-%{version}-py%{python3_version}.egg-info
|
|
||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Apr 26 2022 Carl George <carl@george.computer> - 2.3.0-3
|
||||||
|
- Convert to pyproject macros
|
||||||
|
|
||||||
* Fri Jan 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 2.3.0-2
|
* Fri Jan 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 2.3.0-2
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user