Some further cleanup for python3 only.

This commit is contained in:
Paul Wouters 2020-04-16 10:21:46 -04:00
parent d6535f2042
commit 5412e7523d
1 changed files with 17 additions and 44 deletions

View File

@ -1,15 +1,6 @@
%global pypi_name dnspython
%global py_package_name dns
%global summary DNS toolkit for Python
%global _description \
dnspython is a DNS toolkit for Python. It supports almost all record \
types. It can be used for queries, zone transfers, and dynamic \
updates. It supports TSIG authenticated messages and EDNS0. \
\
dnspython provides both high and low level access to DNS. The high \
level classes perform queries for data of a given name, type, and \
class, and return an answer set. The low level classes allow direct \
manipulation of DNS zones, messages, names, and records. \
%python_provide python-$module
# Disable dependency generator until it has test code
%{?python_disable_dependency_generator}
@ -17,7 +8,7 @@ manipulation of DNS zones, messages, names, and records. \
Name: python-%{py_package_name}
Version: 1.16.0
Release: 9%{?dist}
Summary: %{summary}
Summary: DNS toolkit for Python
License: MIT
URL: http://www.dnspython.org
@ -33,37 +24,20 @@ Patch0: unicode_label_escapify.patch
Patch1: collections_abc.patch
Patch2: python-dns-1.16-base64.patch
%if %{with python3}
BuildRequires: python%{python3_pkgversion}-devel
BuildRequires: python%{python3_pkgversion}-setuptools
Recommends: python%{python3_pkgversion}-ecdsa
Recommends: python%{python3_pkgversion}-pycryptodomex
%endif
BuildRequires: python3-devel
BuildRequires: python3-setuptools
Recommends: python3-ecdsa
Recommends: python3-pycryptodomex
%if 0%{?with_python3}
BuildRequires: python%{python3_pkgversion}-devel
BuildRequires: python%{python3_pkgversion}-setuptools
BuildRequires: python%{python3_pkgversion}-ecdsa
BuildRequires: python%{python3_pkgversion}-pycryptodomex
%endif
%description
dnspython is a DNS toolkit for Python. It supports almost all record
types. It can be used for queries, zone transfers, and dynamic
updates. It supports TSIG authenticated messages and EDNS0.
%if 0%{?with_python3_other}
BuildRequires: python%{python3_other_pkgversion}-devel
BuildRequires: python%{python3_other_pkgversion}-setuptools
BuildRequires: python%{python3_other_pkgversion}-ecdsa
BuildRequires: python%{python3_other_pkgversion}-pycryptodomex
%endif
%description %{_description}
%package -n python%{python3_pkgversion}-%{py_package_name}
Summary: %{summary}
%{?python_provide:%python_provide python%{python3_pkgversion}-%{py_package_name}}
Requires: python%{python3_pkgversion}-ecdsa
Requires: python%{python3_pkgversion}-pycryptodomex
%description -n python%{python3_pkgversion}-%{py_package_name} %{_description}
dnspython provides both high and low level access to DNS. The high
level classes perform queries for data of a given name, type, and
class, and return an answer set. The low level classes allow direct
manipulation of DNS zones, messages, names, and records.
%prep
%autosetup -p1 -n %{pypi_name}-%{version}
@ -71,15 +45,14 @@ Requires: python%{python3_pkgversion}-pycryptodomex
# strip exec permissions so that we don't pick up dependencies from docs
find examples -type f | xargs chmod a-x
%build
%py3_build
%py3_build
%install
%py3_install
%py3_install
%check
%{__python3} setup.py test
%{__python3} setup.py test
%files
%license LICENSE