Add idna extras subpackage and switch to pyproject macros

epel9 imports/e9/python-service-identity-21.1.0-5.el9
Carl George 3 years ago
parent b1bcedc0ef
commit 9110429ece

@ -1,58 +1,40 @@
%bcond_without check %bcond_without check
%global modname service-identity %global modname service-identity
%global srcname service_identity
Name: python-%{modname} Name: python-%{modname}
Version: 21.1.0 Version: 21.1.0
Release: 4%{?dist} Release: 5%{?dist}
Summary: Service identity verification for pyOpenSSL Summary: Service identity verification for pyOpenSSL
License: MIT License: MIT
URL: https://github.com/pyca/service_identity URL: https://github.com/pyca/service-identity
Source0: %{url}/archive/%{version}/%{modname}-%{version}.tar.gz Source0: %{url}/archive/%{version}/%{modname}-%{version}.tar.gz
# Revert theme change as "furo" theme is not packaged # Revert theme change as "furo" theme is not packaged
Patch0: 0001-Revert-theme-change.patch Patch0: 0001-Revert-theme-change.patch
BuildArch: noarch BuildArch: noarch
%global _description \ %global common_description %{expand:
Service Identity Verification for pyOpenSSL.\ Use this package if you use pyOpenSSL and dont want to be MITMed, or if you
\ want to verify that a PyCA cryptography certificate is valid for a certain
TL;DR: Use this package if you use pyOpenSSL and dont want to be MITMed.\ hostname or IP address. service-identity aspires to give you all the tools you
\ need for verifying whether a certificate is valid for the intended purposes.
service_identity aspires to give you all the tools you need for verifying\ In the simplest case, this means host name verification. However,
whether a certificate is valid for the intended purposes.\ service-identity implements RFC 6125 fully and plans to add other relevant RFCs
\ too.}
In the simplest case, this means host name verification. However,\
service_identity implements RFC 6125 fully and plans to add other\
relevant RFCs too.
%description %{_description} %description %{common_description}
%package -n python3-%{modname} %package -n python3-%{modname}
Summary: %{summary} Summary: %{summary}
%{?python_provide:%python_provide python3-%{modname}}
BuildRequires: python3-devel BuildRequires: python3-devel
BuildRequires: python3dist(setuptools) BuildRequires: %{py3_dist sphinx}
BuildRequires: python3dist(sphinx)
%if %{with check} %if %{with check}
BuildRequires: python3dist(attrs) >= 19.1.0 BuildRequires: %{py3_dist pytest}
BuildRequires: python3dist(idna) >= 0.6
BuildRequires: python3dist(pyasn1)
BuildRequires: python3dist(pyasn1-modules)
BuildRequires: python3dist(pyopenssl) >= 0.14
BuildRequires: python3dist(pytest)
%endif %endif
Requires: python3dist(attrs)
Requires: python3dist(pyasn1)
Requires: python3dist(pyasn1-modules)
Requires: python3dist(pyopenssl) >= 0.14
Recommends: python3dist(idna) >= 0.6
%description -n python3-%{modname} %{_description} %description -n python3-%{modname} %{common_description}
Python 3 version.
%package -n python-%{modname}-doc %package -n python-%{modname}-doc
Summary: Service-identity documentation Summary: Service-identity documentation
@ -60,14 +42,22 @@ Summary: Service-identity documentation
%description -n python-%{modname}-doc %description -n python-%{modname}-doc
Documentation for service-identity. Documentation for service-identity.
%pyproject_extras_subpkg -n python3-%{modname} idna
%prep %prep
%autosetup -p1 -n %{modname}-%{version} %autosetup -p1 -n %{modname}-%{version}
%generate_buildrequires
%if %{with check}
%pyproject_buildrequires -x idna
%endif
%build %build
%py3_build %pyproject_wheel
%install %install
%py3_install %pyproject_install
%pyproject_save_files service_identity
# generate html docs # generate html docs
PYTHONPATH=%{buildroot}%{python3_sitelib} sphinx-build-3 docs html PYTHONPATH=%{buildroot}%{python3_sitelib} sphinx-build-3 docs html
@ -76,20 +66,21 @@ rm -rf html/.{doctrees,buildinfo}
%if %{with check} %if %{with check}
%check %check
PYTHONPATH=%{buildroot}%{python3_sitelib} py.test-%{python3_version} -v %pytest -v
%endif %endif
%files -n python3-%{modname} %files -n python3-%{modname} -f %{pyproject_files}
%license LICENSE
%doc README.rst %doc README.rst
%{python3_sitelib}/%{srcname}-*.egg-info/
%{python3_sitelib}/%{srcname}/
%files -n python-%{modname}-doc %files -n python-%{modname}-doc
%doc html %doc html
%license LICENSE docs/license.rst %license LICENSE docs/license.rst
%changelog %changelog
* Fri Jan 28 2022 Carl George <carl@george.computer> - 21.1.0-5
- Add idna extras subpackage
- Switch to pyproject macros
* Fri Jan 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 21.1.0-4 * Fri Jan 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 21.1.0-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild

Loading…
Cancel
Save