b77cf34
%global srcname %(echo %{name} | sed 's/^python-//')
b77cf34
Name:           python-fqdn
b77cf34
Version:        1.5.1
9049dab
Release:        3%{?dist}
b77cf34
Summary:        Validates fully-qualified domain names against RFC 1123
b77cf34
BuildArch:      noarch
b77cf34
License:        MPLv2.0
b77cf34
URL:            https://github.com/ypcrts/fqdn
b77cf34
Source0:        %pypi_source
b77cf34
# Missing in pypi tar ball release, present at github :(
b77cf34
Source1:        test_fqdn.py
b77cf34
b77cf34
%global _description %{expand:
b77cf34
Validates fully-qualified domain names against RFC 1123, so that they
b77cf34
are acceptable to modern browsers.}
b77cf34
%description %_description
b77cf34
b77cf34
%package -n     python3-%{srcname}
b77cf34
Summary:        %{summary}
b77cf34
BuildRequires:  python3-devel
b77cf34
BuildRequires:  python3dist(setuptools)
b77cf34
BuildRequires:  python3-pytest
b77cf34
BuildRequires:  python3-pytest-cov
b77cf34
%description -n python3-%{srcname} %_description
b77cf34
b77cf34
%prep
b77cf34
%autosetup -n %{srcname}-%{version}
b77cf34
b77cf34
%build
b77cf34
%py3_build
b77cf34
b77cf34
%install
b77cf34
%py3_install
b77cf34
b77cf34
%check
b77cf34
mkdir tests/
b77cf34
touch tests/__init__.py
b77cf34
cp %{SOURCE1} tests/
b77cf34
%pytest
b77cf34
b77cf34
%files -n python3-%{srcname}
b77cf34
%doc README.rst
b77cf34
%{python3_sitelib}/%{srcname}-*.egg-info/
b77cf34
%{python3_sitelib}/%{srcname}
b77cf34
b77cf34
%changelog
9049dab
* Tue Jul 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.5.1-3
9049dab
- Second attempt - Rebuilt for
9049dab
  https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
9049dab
b77cf34
* Fri Jun 25 2021 Paul Wouters <paul.wouters@aiven.io> - 1.5.1-2
b77cf34
- Initial package