Update to version 1.15.0

This commit is contained in:
Avram Lubkin 2016-10-04 08:45:08 -04:00
parent d1fa3052e0
commit 15cf36a26a
2 changed files with 37 additions and 159 deletions

View File

@ -1,62 +0,0 @@
diff -ruN a/tests/test_dnssec.py b/tests/test_dnssec.py
--- a/tests/test_dnssec.py 2015-06-13 20:26:21.000000000 +0800
+++ b/tests/test_dnssec.py 2016-02-12 14:14:10.556941459 +0800
@@ -13,7 +13,7 @@
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
# OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-import unittest
+import unittest2 as unittest
import dns.dnssec
import dns.name
diff -ruN a/tests/test_exceptions.py b/tests/test_exceptions.py
--- a/tests/test_exceptions.py 2015-06-13 20:26:21.000000000 +0800
+++ b/tests/test_exceptions.py 2016-02-12 14:13:58.496896295 +0800
@@ -14,7 +14,7 @@
# OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
import binascii
-import unittest
+import unittest2 as unittest
from dns.exception import DNSException
diff -ruN a/tests/test_rdtypeanyeui.py a_patch/tests/test_rdtypeanyeui.py
--- a/tests/test_rdtypeanyeui.py 2016-01-09 08:16:49.000000000 +0800
+++ b/tests/test_rdtypeanyeui.py 2016-02-12 17:57:19.699264077 +0800
@@ -14,7 +14,7 @@
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
# OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-import unittest
+import unittest2 as unittest
try:
from StringIO import StringIO
except ImportError:
diff -ruN a/dns/tokenizer.py a_patch/dns/tokenizer.py
--- a/dns/tokenizer.py 2015-06-13 20:26:21.000000000 +0800
+++ b/dns/tokenizer.py 2016-02-12 17:48:41.339066543 +0800
@@ -15,6 +15,7 @@
"""Tokenize DNS master file format"""
+import StringIO
import cStringIO
import sys
@@ -196,7 +197,11 @@
"""
if isinstance(f, (str, unicode)):
- f = cStringIO.StringIO(f)
+ # cStringIO doesn't support unicode
+ if isinstance(f, unicode):
+ f = StringIO.StringIO(f)
+ else:
+ f = cStringIO.StringIO(f)
if filename is None:
filename = '<string>'
else:

View File

@ -1,7 +1,3 @@
%global py2commit 99fd864361a4e8f3988440b315d645e16bbf94b7
%global py3commit 0473a04fdba32645f36220642192a35c30311e74
# __python2 macro doesn't exist for el6
%if 0%{?rhel} == 6
%global __python2 %{__python}
@ -15,8 +11,6 @@
%global srpm_py_suffix 3
%else
%global with_python2 1
%global py2prepdir %{_builddir}/dnspython/dnspython-%{py2commit}
%global py2unpack -a 0
# Rename to python2-dns after Fedora 23
%if 0%{?fedora} > 23
@ -25,59 +19,52 @@
%else
%global python2_pkgversion %{nil}
%endif
%global py2dir %{_builddir}/dnspython/dnspython%{python2_pkgversion}-%{version}
%endif
# Build python3 package for Fedora and EPEL7+
%if 0%{?fedora} > 12 || 0%{?epel} > 6
%global with_python3 1
%{!?python3_pkgversion: %global python3_pkgversion 3}
%global py3prepdir %{_builddir}/dnspython/dnspython-%{py3commit}
%global py3dir %{_builddir}/dnspython/dnspython%{python3_pkgversion}-%{version}
%global py3unpack -a 2
%endif
Name: python%{?srpm_py_suffix}-dns
Version: 1.12.0GIT99fd864
Release: 2%{?dist}
Version: 1.15.0
Release: 1%{?dist}
Summary: DNS toolkit for Python
Group: Development/Languages
License: MIT
URL: http://www.dnspython.org/
%if 0%{?with_python2}
#Source0: http://www.dnspython.org/kits/%{version}/dnspython-%{version}.tar.gz
Source0: https://github.com/rthalley/dnspython/archive/%{py2commit}.tar.gz#/dnspython-%{version}.tar.gz
%endif
%if 0%{?with_python3}
#Source2: http://www.dnspython.org/kits3/%{version}/dnspython3-%{version}.tar.gz
Source2: https://github.com/rthalley/dnspython/archive/%{py3commit}.tar.gz#/dnspython3-%{version}.tar.gz
%endif
%if 0%{?rhel} == 6
Patch0: EL6_fixes.patch
%endif
Source0: http://www.dnspython.org/kits/%{version}/dnspython-%{version}.tar.gz
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
BuildArch: noarch
Patch0: test_fails_on_missing_file.patch
%if 0%{?with_python2}
BuildRequires: python2-devel
BuildRequires: python-crypto
%if ! 0%{?with_p2subpkg}
Provides: python2-dns = %{version}-%{release}
Requires: python-crypto
%if 0%{?rhel} == 6
BuildRequires: python-unittest2
%endif
# If python2-package
%if 0%{?with_p2subpkg}
BuildRequires: python2-devel
BuildRequires: python2-setuptools
BuildRequires: python2-crypto
# If python2 but no python2-package
%else
%if 0%{?with_python2}
Provides: python2-dns = %{version}-%{release}
Requires: python-crypto
BuildRequires: python-devel
BuildRequires: python-setuptools
BuildRequires: python-crypto
%endif
%endif
%if 0%{?with_python3}
BuildRequires: python%{python3_pkgversion}-devel
BuildRequires: python%{python3_pkgversion}-setuptools
BuildRequires: python%{python3_pkgversion}-crypto
%endif
@ -128,89 +115,37 @@ manipulation of DNS zones, messages, names, and records.
%endif
%prep
%setup -q -T -c -n dnspython %{?py2unpack:%{py2unpack}} %{?py3unpack:%{py3unpack}}
# get rid of Mac goop
find . -name ._\* -delete
# strip executable permissions so that we don't pick up dependencies
# from documentation
%if 0%{?with_python2}
find %{py2prepdir}/examples -type f | xargs chmod a-x
if [ %{py2prepdir} != %{py2dir} ]
then
mv %{py2prepdir} %{py2dir}
fi
%if 0%{?rhel} == 6
pushd %{py2dir}
%setup -q -n dnspython-%{version}
%patch0 -p1
popd
%endif
%endif
%if 0%{?with_python3}
find %{py3prepdir}/examples -type f | xargs chmod a-x
if [ %{py3prepdir} != %{py3dir} ]
then
mv %{py3prepdir} %{py3dir}
fi
%endif
# strip exec permissions so that we don't pick up dependencies from docs
find examples -type f | xargs chmod a-x
%build
%if 0%{?with_python2}
pushd %{py2dir}
%{__python2} setup.py build
popd
%py2_build
%endif
%if 0%{?with_python3}
pushd %{py3dir}
%{__python3} setup.py build
popd
%py3_build
%endif
%install
rm -rf %{buildroot}
%if 0%{?with_python2}
pushd %{py2dir}
%{__python2} setup.py install --skip-build --root %{buildroot}
popd
%py2_install
%endif
%if 0%{?with_python3}
pushd %{py3dir}
%{__python3} setup.py install --skip-build --root %{buildroot}
popd
%py3_install
%endif
%check
%if 0%{?with_python2}
pushd %{py2dir}/tests
# skip one test because it queries the network
for py in test_*.py
do
if [ $py != test_resolver.py ]
then
PYTHONPATH=%{buildroot}%{python2_sitelib} %{__python2} $py
fi
done
popd
%{__python2} setup.py test
%endif
%if 0%{?with_python3}
pushd %{py3dir}/tests
# skip one test because it queries the network
for py in test_*.py
do
if [ $py != test_resolver.py ]
then
PYTHONPATH=%{buildroot}%{python3_sitelib} %{__python3} $py
fi
done
popd
%{__python3} setup.py test
%endif
%clean
@ -223,7 +158,8 @@ rm -rf %{buildroot}
%files
%endif
%defattr(-,root,root,-)
%doc dnspython%{python2_pkgversion}-%{version}/{ChangeLog,LICENSE,README*,examples}
# Add README.* when it is included with the source (commit a906279)
%doc {ChangeLog,LICENSE,examples}
%{python2_sitelib}/*egg-info
%{python2_sitelib}/dns
%endif
@ -231,14 +167,18 @@ rm -rf %{buildroot}
%if 0%{?with_python3}
%files -n python%{python3_pkgversion}-dns
%defattr(-,root,root,-)
%doc dnspython%{python3_pkgversion}-%{version}/{ChangeLog,LICENSE,README*,examples}
# Add README.* when it is included with the source (commit a906279)
%doc {ChangeLog,LICENSE,examples}
%{python3_sitelib}/*egg-info
%{python3_sitelib}/dns
%endif
%changelog
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.12.0GIT99fd864-2
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
* Tue Oct 04 2016 Avram Lubkin <aviso@fedoraproject.org> - 1.15.0-1
- Latest Release
* Wed Jun 15 2016 Avram Lubkin <aviso@fedoraproject.org> - 1.14.0-1
- Latest Release
* Sun Mar 27 2016 Avram Lubkin <aviso@fedoraproject.org> - 1.12.0GIT99fd864-1
- Latest Snapshot