Applied patch from Haikel Guemar to support building on CentOS w/o Python 3

This commit is contained in:
Scott Talbert 2016-02-05 20:34:49 -05:00
parent a1bc963e93
commit 0da9b6601e

View File

@ -11,10 +11,14 @@ services. Objectification of types defined in the WSDL is provided\
without class generation. Programmers rarely need to read the WSDL since\ without class generation. Programmers rarely need to read the WSDL since\
services and WSDL based objects can be easily inspected. services and WSDL based objects can be easily inspected.
%if 0%{?fedora}
%global with_python3 1
%endif
Summary: %{sum} Summary: %{sum}
Name: python-suds Name: python-suds
Version: 0.7 Version: 0.7
Release: 0.1.%{shortcommit}%{?dist} Release: 0.2.%{shortcommit}%{?dist}
Source0: https://bitbucket.org/jurko/suds/get/%{shortcommit}.tar.bz2 Source0: https://bitbucket.org/jurko/suds/get/%{shortcommit}.tar.bz2
Patch0: fix_http_test.patch Patch0: fix_http_test.patch
License: LGPLv3+ License: LGPLv3+
@ -31,10 +35,12 @@ Summary: %{sum}
%{?python_provide:%python_provide python2-%{srcname}} %{?python_provide:%python_provide python2-%{srcname}}
%description -n python2-%{srcname} %{desc} %description -n python2-%{srcname} %{desc}
%if 0%{?with_python3}
%package -n python3-%{srcname} %package -n python3-%{srcname}
Summary: %{sum} Summary: %{sum}
%{?python_provide:%python_provide python3-%{srcname}} %{?python_provide:%python_provide python3-%{srcname}}
%description -n python3-%{srcname} %{desc} %description -n python3-%{srcname} %{desc}
%endif
%prep %prep
%setup -c -q %setup -c -q
@ -42,44 +48,57 @@ mv jurko-suds-%{shortcommit} %{py2_builddir}
pushd %{py2_builddir} pushd %{py2_builddir}
%patch0 -p1 %patch0 -p1
popd popd
%if 0%{?with_python3}
cp -a %{py2_builddir} %{py3_builddir} cp -a %{py2_builddir} %{py3_builddir}
%endif
%build %build
pushd %{py2_builddir} pushd %{py2_builddir}
%py2_build %py2_build
popd popd
%if 0%{?with_python3}
pushd %{py3_builddir} pushd %{py3_builddir}
%py3_build %py3_build
popd popd
%endif
%install %install
pushd %{py2_builddir} pushd %{py2_builddir}
%py2_install %py2_install
popd popd
%if 0%{?with_python3}
pushd %{py3_builddir} pushd %{py3_builddir}
%py3_install %py3_install
popd popd
%endif
%check %check
pushd %{py2_builddir} pushd %{py2_builddir}
%{__python2} setup.py test %{__python2} setup.py test
popd popd
%if 0%{?with_python3}
pushd %{py3_builddir} pushd %{py3_builddir}
%{__python3} setup.py test %{__python3} setup.py test
popd popd
%endif
%files -n python2-%{srcname} %files -n python2-%{srcname}
%{python2_sitelib}/* %{python2_sitelib}/*
%doc %{py2_builddir}/README.rst %doc %{py2_builddir}/README.rst
%license %{py2_builddir}/LICENSE.txt %license %{py2_builddir}/LICENSE.txt
%if 0%{?with_python3}
%files -n python3-%{srcname} %files -n python3-%{srcname}
%{python3_sitelib}/* %{python3_sitelib}/*
%doc %{py3_builddir}/README.rst %doc %{py3_builddir}/README.rst
%license %{py3_builddir}/LICENSE.txt %license %{py3_builddir}/LICENSE.txt
%endif
%changelog %changelog
* Fri Jan 01 2016 Scott Talbert <swt@techie.net> - 0.7-0.1.94664dd * Sat Feb 06 2016 Scott Talbert <swt@techie.net> - 0.7-0.2.94664ddd46a6
- Applied patch from Haikel Guemar to support building on CentOS w/o Python 3
* Fri Jan 01 2016 Scott Talbert <swt@techie.net> - 0.7-0.1.94664ddd46a6
- Switched to Jurko fork of suds - Switched to Jurko fork of suds
- Modernize python packaging, build python3 package - Modernize python packaging, build python3 package
- Fixed bogus changelog dates - Fixed bogus changelog dates