5f6d16
%global with_python3 0
5f6d16
5f6d16
Name:           python-dns
5f6d16
Version:        1.15.0
ee7685
Release:        9%{?dist}
5f6d16
Summary:        DNS toolkit for Python
5f6d16
5f6d16
Group:          Development/Languages
5f6d16
License:        MIT
5f6d16
URL:            http://www.dnspython.org/
5f6d16
5f6d16
Source0: http://www.dnspython.org/kits/%{version}/dnspython-%{version}.tar.gz
5f6d16
5f6d16
BuildArch:      noarch
5f6d16
Patch0:         test_fails_on_missing_file.patch
5f6d16
5f6d16
Provides:       python2-dns = %{version}-%{release}
5f6d16
BuildRequires:  python2-devel
5f6d16
BuildRequires:  python2-setuptools
5f6d16
5f6d16
%if 0%{?with_python3}
5f6d16
BuildRequires:  python%{python3_pkgversion}-devel
5f6d16
BuildRequires:  python%{python3_pkgversion}-setuptools
5f6d16
%endif
5f6d16
5f6d16
%description
5f6d16
dnspython is a DNS toolkit for Python. It supports almost all record
5f6d16
types. It can be used for queries, zone transfers, and dynamic
5f6d16
updates. It supports TSIG authenticated messages and EDNS0.
5f6d16
5f6d16
dnspython provides both high and low level access to DNS. The high
5f6d16
level classes perform queries for data of a given name, type, and
5f6d16
class, and return an answer set. The low level classes allow direct
5f6d16
manipulation of DNS zones, messages, names, and records.
5f6d16
5f6d16
%package -n python2-dns
5f6d16
Summary:        DNS toolkit for Python 2
5f6d16
Group:          Development/Languages
5f6d16
%{?python_provide:%python_provide python2-dns}
5f6d16
5f6d16
%description -n python2-dns
5f6d16
dnspython is a DNS toolkit for Python. It supports almost all record
5f6d16
types. It can be used for queries, zone transfers, and dynamic
5f6d16
updates. It supports TSIG authenticated messages and EDNS0.
5f6d16
5f6d16
dnspython provides both high and low level access to DNS. The high
5f6d16
level classes perform queries for data of a given name, type, and
5f6d16
class, and return an answer set. The low level classes allow direct
5f6d16
manipulation of DNS zones, messages, names, and records.
5f6d16
5f6d16
%if 0%{?with_python3}
5f6d16
%package     -n python%{python3_pkgversion}-dns
5f6d16
Summary:        DNS toolkit for Python 3
5f6d16
Group:          Development/Languages
5f6d16
%{?python_provide:%python_provide python%{python3_pkgversion}-dns}
5f6d16
5f6d16
%description -n python%{python3_pkgversion}-dns
5f6d16
dnspython3 is a DNS toolkit for Python 3. It supports almost all
5f6d16
record types. It can be used for queries, zone transfers, and dynamic
5f6d16
updates. It supports TSIG authenticated messages and EDNS0.
5f6d16
5f6d16
dnspython3 provides both high and low level access to DNS. The high
5f6d16
level classes perform queries for data of a given name, type, and
5f6d16
class, and return an answer set. The low level classes allow direct
5f6d16
manipulation of DNS zones, messages, names, and records.
5f6d16
%endif
5f6d16
5f6d16
%prep
5f6d16
%setup -q -n dnspython-%{version}
5f6d16
%patch0 -p1
5f6d16
5f6d16
# strip exec permissions so that we don't pick up dependencies from docs
5f6d16
find examples -type f | xargs chmod a-x
5f6d16
5f6d16
%build
5f6d16
%py2_build
5f6d16
5f6d16
%if 0%{?with_python3}
5f6d16
  %py3_build
5f6d16
%endif
5f6d16
5f6d16
%install
5f6d16
%py2_install
5f6d16
5f6d16
%if 0%{?with_python3}
5f6d16
  %py3_install
5f6d16
%endif
5f6d16
5f6d16
%check
5f6d16
%{__python2} setup.py test
5f6d16
5f6d16
%if 0%{?with_python3}
5f6d16
%{__python3} setup.py test
5f6d16
%endif
5f6d16
5f6d16
%files -n python2-dns
5f6d16
%defattr(-,root,root,-)
5f6d16
# Add README.* when it is included with the source (commit a906279)
5f6d16
%doc {ChangeLog,LICENSE,examples}
5f6d16
%{python2_sitelib}/*egg-info
5f6d16
%{python2_sitelib}/dns
5f6d16
5f6d16
%if 0%{?with_python3}
5f6d16
%files -n python%{python3_pkgversion}-dns
5f6d16
%defattr(-,root,root,-)
5f6d16
# Add README.* when it is included with the source (commit a906279)
5f6d16
%doc {ChangeLog,LICENSE,examples}
5f6d16
%{python3_sitelib}/*egg-info
5f6d16
%{python3_sitelib}/dns
5f6d16
%endif
5f6d16
5f6d16
%changelog
ee7685
* Wed Apr 03 2019 Tomas Orsava <torsava@redhat.com> - 1.15.0-9
ee7685
- Bumping due to problems with modular RPM upgrade path (#1695587)
ee7685
- Related: rhbz#1693974
ee7685
5f6d16
* Wed Jul 18 2018 Lumír Balhar <lbalhar@redhat.com> - 1.15.0-8
5f6d16
- First version for python27 module