Reenable tests for GoDady, Transip, Namecheap and NamecheapManaged providers

Add gransy and ddns extra packages
Remove explicit BuildRequires (handled by the pyproject_buildrequires macro)
Remove explicit extra package Requires (handled by automatic dependency generator)
Remove unused rhel7 macro
This commit is contained in:
spike 2022-04-27 04:06:01 +02:00
commit 8866a64eb5

View file

@ -5,10 +5,6 @@ Version: 3.9.5
%global pypi_name dns-lexicon
%if 0%{?rhel} && 0%{?rhel} == 7
%global rhel7 1
%endif
%if 0%{?rhel} >= 8
# EPEL8 is currently missing dependencies used by the extras metapackages
%bcond_with extras
@ -17,7 +13,7 @@ Version: 3.9.5
%endif
Name: python-%{pypi_name}
Release: 1%{?dist}
Release: 2%{?dist}
Summary: Manipulate DNS records on various DNS providers in a standardized/agnostic way
License: MIT
@ -28,20 +24,12 @@ BuildArch: noarch
Patch0: 0000-remove-shebang.patch
BuildRequires: pyproject-rpm-macros
BuildRequires: poetry >= 1.0.0
BuildRequires: python3-devel
# required to run the test suite
BuildRequires: python3-pytest
BuildRequires: python3-pytest-vcr
# Extras requirements
# {{{
%if %{with extras}
BuildRequires: python3-boto3
%endif
# }}}
%description
Lexicon provides a way to manipulate DNS records on multiple DNS providers in a
@ -92,17 +80,40 @@ library.
This is the Python 3 version of the package.
%package -n python3-%{pypi_name}+ddns
Summary: Meta-package for python3-%{pypi_name} and ddns provider
%{?python_provide:%python_provide python3-%{pypi_name}+ddns}
Requires: python3-%{pypi_name} = %{version}-%{release}
%description -n python3-%{pypi_name}+ddns
This package installs no files. It requires python3-%{pypi_name} and all
dependencies necessary to use the ddns provider.
%package -n python3-%{pypi_name}+gransy
Summary: Meta-package for python3-%{pypi_name} and gransy provider
%{?python_provide:%python_provide python3-%{pypi_name}+gransy}
Requires: python3-%{pypi_name} = %{version}-%{release}
%description -n python3-%{pypi_name}+gransy
This package installs no files. It requires python3-%{pypi_name} and all
dependencies necessary to use the gransy provider.
%package -n python3-%{pypi_name}+route53
Summary: Meta-package for python3-%{pypi_name} and Route 53 provider
%{?python_provide:%python_provide python3-%{pypi_name}+route53}
Requires: python3-%{pypi_name} = %{version}-%{release}
Requires: python3-boto3
%description -n python3-%{pypi_name}+route53
This package installs no files. It requires python3-%{pypi_name} and all
dependencies necessary to use the Route 53 provider.
%prep
%autosetup -n lexicon-%{version} -p1
# Remove bundled egg-info
@ -110,7 +121,7 @@ rm -rf %{pypi_name}.egg-info
rm setup.py
%generate_buildrequires
%pyproject_buildrequires -r -t -e light -x route53
%pyproject_buildrequires -r -t -e light -x ddns,gransy,route53
%build
@ -118,18 +129,12 @@ rm setup.py
%check
# AutoProviderTests: unknown failure - exclude to get suite passing for now
# GoDaddyProviderTests: unknown failure - just get the suite passing for now
# TypeError: __init__() got an unexpected keyword argument 'allowed_methods'
#
# lexicon providers which do not work in Fedora due to missing dependencies:
# - TransipProviderTests
# - SoftLayerProviderTests
# - NamecheapProviderTests
# - NamecheapManagedProviderTests
# - GransyProviderTests
# - LocalzoneProviderTests
# - OciProviderTests
TEST_SELECTOR="not AutoProviderTests and not GoDaddyProviderTests and not TransipProviderTests and not SoftLayerProviderTests and not NamecheapProviderTests and not NamecheapManagedProviderTests and not GransyProviderTests and not LocalzoneProviderTests and not OciProviderTests"
TEST_SELECTOR="not AutoProviderTests and not SoftLayerProviderTests and not LocalzoneProviderTests and not OciProviderTests"
# EPEL 8 does not provide the python3-pytest-vcr package
%if 0%{?fedora}
# The %%tox macro lacks features so we need to use pytest directly:
@ -160,6 +165,12 @@ rm -rf %{buildroot}%{python3_sitelib}/lexicon/tests
# {{{
%if %{with extras}
%files -n python3-%{pypi_name}+ddns
%{?python_extras_subpkg:%ghost %{python3_sitelib}/dns_lexicon-%{version}.dist-info}
%files -n python3-%{pypi_name}+gransy
%{?python_extras_subpkg:%ghost %{python3_sitelib}/dns_lexicon-%{version}.dist-info}
%files -n python3-%{pypi_name}+route53
%{?python_extras_subpkg:%ghost %{python3_sitelib}/dns_lexicon-%{version}.dist-info}
@ -167,6 +178,13 @@ rm -rf %{buildroot}%{python3_sitelib}/lexicon/tests
# }}}
%changelog
* Tue Apr 26 2022 Christian Schuermann <spike@fedoraproject.org> 3.9.5-2
- Reenable tests for GoDady, Transip, Namecheap and NamecheapManaged providers
- Add gransy and ddns extra packages
- Remove explicit BuildRequires (handled by the pyproject_buildrequires macro)
- Remove explicit extra package Requires (handled by automatic dependency generator)
- Remove unused rhel7 macro
* Tue Apr 19 2022 Christian Schuermann <spike@fedoraproject.org> 3.9.5-1
- update to 3.9.5