[python-dns/el5: 12/14] Merge branch 'master' into el6
Jeffrey C. Ollie
jcollie at fedoraproject.org
Thu Sep 5 16:11:59 UTC 2013
commit a6c3656dc3158f1d467f9a622842a9316bf4db04
Merge: 47d2dee 9147414
Author: Jeffrey C. Ollie <jeff at ocjtech.us>
Date: Thu Sep 5 10:17:58 2013 -0500
Merge branch 'master' into el6
.gitignore | 20 ++--
python-dns.spec | 250 ++++++++++++++++++++++++++++++++++++++++++++++++++-----
sources | 8 +-
3 files changed, 244 insertions(+), 34 deletions(-)
---
diff --cc python-dns.spec
index 31184e7,e0e38a4..1700211
--- a/python-dns.spec
+++ b/python-dns.spec
@@@ -65,69 -93,137 +93,175 @@@ class, and return an answer set. The lo
manipulation of DNS zones, messages, names, and records.
%endif
+ %if 0%{?with_python3}
+ %package -n python3-dns
+ Summary: DNS toolkit for Python 3
+ Group: Development/Languages
+
+ # for DNSSEC support
+ Requires: python3-crypto
+
+ %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 -T -c -n dnspython -a 0 %{?py3unpack:%{py3unpack}}
+# get rid of Mac goop
+find . -name ._\* -delete
+
# strip executable permissions so that we don't pick up dependencies
# from documentation
- find examples -type f | xargs chmod a-x
+ find %{py2dir}/examples -type f | xargs chmod a-x
+ %if 0%{?with_python3}
+ find %{py3dir}/examples -type f | xargs chmod a-x
+ %endif
+
+ %if 0%{?with_python26}
+ pushd %{py2dir}
+ rm -rf %{py26dir}
+ cp -a . %{py26dir}
+ find %{py26dir} -name '*.py' | xargs sed -i '1s|^#!.*python|#!%{__python26}|'
+ popd
+ %endif
+
+ %if 0%{?rhel} == 5
+ pushd %{py2dir}
+ %patch0 -p1
+ popd
+ %endif
+%if 0%{?with_python26}
+rm -rf %{py26dir}
+cp -a . %{py26dir}
+find %{py26dir} -name '*.py' | xargs sed -i '1s|^#!.*python|#!%{__python26}|'
+%endif
+
+%if 0%{?rhel} == 5
+%patch0 -p1
+%endif
+%patch1 -p1 -b .tlsa
+
%build
- CFLAGS="%{optflags}" %{__python} -c 'import setuptools; execfile("setup.py")' build
+ pushd %{py2dir}
+ %if 0%{?rhel} == 5
+ %{__python} -c 'import setuptools; execfile("setup.py")' build
+ %else
+ %{__python} setup.py build
+ %endif
+ popd
+
+ %if 0%{?with_python26}
+ pushd %{py26dir}
+ %{__python26} setup.py build
+ popd
+ %endif
+
+ %if 0%{?with_python3}
+ pushd %{py3dir}
+ %{__python3} setup.py build
+ popd
+ %endif
+%if 0%{?with_python26}
+pushd %{py26dir}
+CFLAGS="%{optflags}" %{__python26} setup.py build
+popd
+%endif
+
%install
rm -rf %{buildroot}
+
+ pushd %{py2dir}
+ %if 0%{?rhel} == 5
%{__python} -c 'import setuptools; execfile("setup.py")' install --skip-build --root %{buildroot}
+ %else
+ %{__python} setup.py install --skip-build --root %{buildroot}
+ %endif
+ popd
+
+ %if 0%{?with_python26}
+ pushd %{py26dir}
+ %{__python26} setup.py install --skip-build --root %{buildroot}
+ popd
+ %endif
+
+ %if 0%{?with_python3}
+ pushd %{py3dir}
+ %{__python3} setup.py install --skip-build --root %{buildroot}
+ popd
+ %endif
+%if 0%{?with_python26}
+pushd %{py26dir}
+CFLAGS="%{optflags}" %{__python26} setup.py install --skip-build --root %{buildroot}
+popd
+%endif
+
%check
- pushd tests
+ pushd %{py2dir}/tests
+ # skip one test because it queries the network
+ # dnssec tests fail in RHEL5 Python 2.4 due to the
+ # lack of some hashes
+ for py in *.py
+ do
+ %if 0%{?rhel} == 5
+ if [ $py != resolver.py -a $py != dnssec.py -a $py != grange.py ]
+ %else
+ if [ $py != resolver.py ]
+ %endif
+ then
+ PYTHONPATH=%{buildroot}%{python_sitelib} %{__python} $py
+ fi
+ done
+ popd
+
+ %if 0%{?with_python26}
+ pushd %{py26dir}/tests
# skip one test because it queries the network
for py in *.py
do
if [ $py != resolver.py ]
then
- PYTHONPATH=%{buildroot}%{python_sitelib} %{__python} $py
+ PYTHONPATH=%{buildroot}%{python26_sitelib} %{__python26} $py
fi
done
+ popd
+ %endif
+
+ %if 0%{?with_python3}
+ pushd %{py3dir}/tests
+ # skip one test because it queries the network
+ for py in *.py
+ do
+ if [ $py != resolver.py ]
+ then
+ PYTHONPATH=%{buildroot}%{python3_sitelib} %{__python3} $py
+ fi
+ done
+ popd
+ %endif
+%if 0%{?with_python26}
+pushd %{py26dir}/tests
+# skip one test because it queries the network
+for py in *.py
+do
+ if [ $py != resolver.py ]
+ then
+ PYTHONPATH=%{buildroot}%{python26_sitelib} %{__python26} $py
+ fi
+done
+%endif
+
%clean
rm -rf %{buildroot}
More information about the scm-commits
mailing list