Convert to pyproject macros
This commit is contained in:
parent
998d3d9c3e
commit
39f6e0711c
@ -2,8 +2,6 @@
|
||||
%global srcname PyJWT
|
||||
# what it's imported as
|
||||
%global libname jwt
|
||||
# name of egg info directory
|
||||
%global eggname %{srcname}
|
||||
# package name fragment
|
||||
%global pkgname %{libname}
|
||||
|
||||
@ -16,60 +14,62 @@ encrypted JSON objects.}
|
||||
|
||||
Name: python-%{pkgname}
|
||||
Version: 2.3.0
|
||||
Release: 2%{?dist}
|
||||
Release: 3%{?dist}
|
||||
Summary: JSON Web Token implementation in Python
|
||||
License: MIT
|
||||
URL: https://github.com/jpadilla/pyjwt
|
||||
Source0: %pypi_source
|
||||
Source: %pypi_source
|
||||
BuildArch: noarch
|
||||
|
||||
|
||||
%description %{common_description}
|
||||
|
||||
|
||||
%package -n python%{python3_pkgversion}-%{pkgname}
|
||||
%package -n python3-%{pkgname}
|
||||
Summary: %{summary}
|
||||
BuildRequires: python%{python3_pkgversion}-devel
|
||||
BuildRequires: python%{python3_pkgversion}-setuptools
|
||||
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}}
|
||||
BuildRequires: python3-devel
|
||||
Recommends: python3-%{pkgname}+crypto
|
||||
|
||||
|
||||
%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
|
||||
%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
|
||||
%py3_build
|
||||
%pyproject_wheel
|
||||
|
||||
|
||||
%install
|
||||
%py3_install
|
||||
%pyproject_install
|
||||
%pyproject_save_files %{libname}
|
||||
|
||||
|
||||
%check
|
||||
PYTHONPATH=%{buildroot}%{python3_sitelib} py.test-%{python3_version} --verbose tests
|
||||
%pytest
|
||||
|
||||
|
||||
%files -n python%{python3_pkgversion}-%{pkgname}
|
||||
%doc README.rst AUTHORS.rst
|
||||
%license LICENSE
|
||||
%{python3_sitelib}/%{libname}
|
||||
%{python3_sitelib}/%{eggname}-%{version}-py%{python3_version}.egg-info
|
||||
%files -n python3-%{pkgname} -f %{pyproject_files}
|
||||
%doc README.rst
|
||||
|
||||
|
||||
%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
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user