* Sat Feb 16 2013 Jamie Nguyen <jamielinux@fedoraproject.org> - 1.10.0-3

- add python3-dns subpackage (rhbz#911933)

Signed-off-by: Paul Wouters <pwouters@redhat.com>

Conflicts:
	python-dns.spec
This commit is contained in:
Paul Wouters 2013-02-26 14:12:39 -05:00
parent 6a8ec9fa10
commit b96e7d913a
3 changed files with 89 additions and 20 deletions

12
.gitignore vendored
View File

@ -1,12 +1,4 @@
dnspython-1.8.0.tar.gz
dnspython-1.8.0.tar.gz.asc
/dnspython-1.9.1.tar.gz
/dnspython-1.9.1.tar.gz.asc
/dnspython-1.9.2.tar.gz
/dnspython-1.9.2.tar.gz.asc
/dnspython-1.9.3.tar.gz
/dnspython-1.9.3.tar.gz.asc
/dnspython-1.9.4.tar.gz
/dnspython-1.9.4.tar.gz.asc
/dnspython-1.10.0.tar.gz
/dnspython-1.10.0.tar.gz.asc
/dnspython3-1.10.0.tar.gz
/dnspython3-1.10.0.tar.gz.asc

View File

@ -1,8 +1,12 @@
%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
%if 0%{?fedora} > 12
%global with_python3 1
%else
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print (get_python_lib())")}
%endif
Name: python-dns
Version: 1.10.0
Release: 1%{?dist}
Release: 3%{?dist}
Summary: DNS toolkit for Python
Group: Development/Languages
@ -10,6 +14,8 @@ License: MIT
URL: http://www.dnspython.org/
Source0: http://www.dnspython.org/kits/%{version}/dnspython-%{version}.tar.gz
Source1: http://www.dnspython.org/kits/%{version}/dnspython-%{version}.tar.gz.asc
Source2: http://www.dnspython.org/kits3/%{version}/dnspython3-%{version}.tar.gz
Source3: http://www.dnspython.org/kits3/%{version}/dnspython3-%{version}.tar.gz.asc
Patch1: dnspython-1.10.1-tlsa.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@ -20,6 +26,11 @@ BuildRequires: python-setuptools-devel
BuildRequires: python-setuptools
%endif
%if 0%{?with_python3}
BuildRequires: python3-devel
BuildRequires: python3-setuptools
%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
@ -30,21 +41,61 @@ 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.
%if 0%{?with_python3}
%package -n python3-dns
Summary: DNS toolkit for Python 3
Group: Development/Languages
%description -n python3-dns
dnspython3 is a DNS toolkit for Python 3. It supports almost all record
types. It can be used for queries, zone transfers, and dynamic
updates. It supports TSIG authenticated messages and EDNS0.
dnspython3 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.
%endif
%prep
%setup0 -q -n dnspython-%{version}
%setup -q -n dnspython-%{version}
%setup -T -D -a 2 -q -n dnspython-%{version}
%patch1 -p1 -b .tlsa
%if 0%{?with_python3}
rm -rf %{py3dir}
cp -a dnspython3-%{version} %{py3dir}
%endif
# strip executable permissions so that we don't pick up dependencies
# from documentation
find examples -type f | xargs chmod a-x
%build
CFLAGS="%{optflags}" %{__python} -c 'import setuptools; execfile("setup.py")' build
%if 0%{?with_python3}
pushd %{py3dir}
CFLAGS="%{optflags}" %{__python3} setup.py build
popd
%endif
%install
rm -rf %{buildroot}
%{__python} -c 'import setuptools; execfile("setup.py")' install --skip-build --root %{buildroot}
%if 0%{?with_python3}
pushd %{py3dir}
%{__python3} -c 'import setuptools; exec(open("setup.py").read())' install \
--skip-build --root %{buildroot}
popd
%endif
%check
pushd tests
# skip one test because it queries the network
@ -56,6 +107,19 @@ do
fi
done
%if 0%{?with_python3}
pushd %{py3dir}/tests
for py in *.py
do
if [ $py != resolver.py ]
then
PYTHONPATH=%{buildroot}%{python3_sitelib} %{__python3} $py
fi
done
popd
%endif
%clean
rm -rf %{buildroot}
@ -66,7 +130,20 @@ rm -rf %{buildroot}
%{python_sitelib}/*egg-info
%{python_sitelib}/dns
%if 0%{?with_python3}
%files -n python3-dns
%defattr(-,root,root,-)
%doc dnspython3-%{version}/{ChangeLog,LICENSE,README,examples}
%{python3_sitelib}/*egg-info
%{python3_sitelib}/dns
%endif
%changelog
* Sat Feb 16 2013 Jamie Nguyen <jamielinux@fedoraproject.org> - 1.10.0-3
- add python3-dns subpackage (rhbz#911933)
* Mon Sep 17 2012 Paul Wouters <pwouters@redhat.com> - 1.10.0-1
- Updated to 1.10.0
- Patch to support TLSA RRtype

View File

@ -1,4 +1,4 @@
8a89b7865251c4e9d8ec2f8cc9f8cd78 dnspython-1.9.4.tar.gz
413d7fc295c6bf03f872938731919c95 dnspython-1.9.4.tar.gz.asc
b4f60852fd7ba64fc7c3a1fa239eba33 dnspython-1.10.0.tar.gz
81d7579e66ca37d0b03dce051b60324d dnspython-1.10.0.tar.gz.asc
17d0ec54f83df3e95846fc4e20224a96 dnspython3-1.10.0.tar.gz
d5534b68ef5fc8c9b68fed019bc148d5 dnspython3-1.10.0.tar.gz.asc