[python-dns/el5: 13/14] Merge branch 'test' into f18

Jeffrey C. Ollie jcollie at fedoraproject.org
Thu Sep 5 16:12:04 UTC 2013


commit 23a742e22bd663e63ae3f1460d3b9b7a3c7e4137
Merge: b96e7d9 a6c3656
Author: Jeffrey C. Ollie <jeff at ocjtech.us>
Date:   Thu Sep 5 10:26:02 2013 -0500

    Merge branch 'test' into f18

 .gitignore                                         |    8 +
 ...on-older-python-versions-because-of-hashe.patch |   26 ++
 python-dns.spec                                    |  295 ++++++++++++++++++--
 sources                                            |    8 +-
 4 files changed, 306 insertions(+), 31 deletions(-)
---
diff --cc python-dns.spec
index aec11d4,1700211..0a522b2
--- a/python-dns.spec
+++ b/python-dns.spec
@@@ -71,55 -120,148 +120,177 @@@ find . -name ._\* -delet
  
  # 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
  
 +%if 0%{?with_python3}
 +pushd %{py3dir}
 +CFLAGS="%{optflags}" %{__python3} 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
  
 +%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
+ 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}%{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
  
 +%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}
  


More information about the scm-commits mailing list