c2fa2ce
%global srcname ns1-python
c2fa2ce
c2fa2ce
Name:           python-%{srcname}
bc42991
Version:        0.17.1
fde1d30
Release:        %autorelease
c2fa2ce
Summary:        Python SDK for the NS1 DNS platform
c2fa2ce
c2fa2ce
License:        MIT
c2fa2ce
URL:            https://github.com/ns1/ns1-python
c2fa2ce
Source:         %{pypi_source}
c2fa2ce
fde1d30
Patch0001:      https://github.com/ns1/ns1-python/pull/75.patch#/0001-Fixup-compatibility-with-Python-3.10.patch
fde1d30
c2fa2ce
BuildArch:      noarch
c2fa2ce
c2fa2ce
%global _description %{expand:
c2fa2ce
This package provides a python SDK for accessing the NS1 DNS platform
c2fa2ce
and includes both a simple NS1 REST API wrapper as well as a higher level
c2fa2ce
interface for managing zones, records, data feeds, and more.
c2fa2ce
It supports synchronous and asynchronous transports.}
c2fa2ce
c2fa2ce
%description %{_description}
c2fa2ce
c2fa2ce
%package     -n python3-%{srcname}
c2fa2ce
Summary:        %{summary}
c2fa2ce
%{?python_provide:%python_provide python3-%{srcname}}
c2fa2ce
BuildRequires:  python3-devel
c2fa2ce
BuildRequires:  python3-setuptools
c2fa2ce
Recommends:     python%{python3_version}dist(requests)
c2fa2ce
Suggests:       python%{python3_version}dist(twisted)
c2fa2ce
c2fa2ce
%description -n python3-%{srcname} %{_description}
c2fa2ce
c2fa2ce
Python 3 version.
c2fa2ce
c2fa2ce
%prep
e44be2a
%autosetup -n %{srcname}-%{version} -p1
c2fa2ce
rm -vrf *.egg-info
c2fa2ce
# Tests are not distributed on PyPI
bc42991
sed -i -e '/setup_requires/,+3d' setup.py
c2fa2ce
c2fa2ce
%build
c2fa2ce
%py3_build
c2fa2ce
c2fa2ce
%install
c2fa2ce
%py3_install
c2fa2ce
c2fa2ce
%files -n python3-%{srcname}
1a7ed5b
%license LICENSE
cc9cb2d
%doc README.md
c2fa2ce
%{python3_sitelib}/ns1_python-*.egg-info/
c2fa2ce
%{python3_sitelib}/ns1/
c2fa2ce
c2fa2ce
%changelog
fde1d30
%autochangelog