]> git.pld-linux.org Git - packages/python-suds.git/commitdiff
- updated to 0.8.4 from suds-community fork
authorJakub Bogusz <qboosh@pld-linux.org>
Sun, 22 Mar 2020 17:34:32 +0000 (18:34 +0100)
committerJakub Bogusz <qboosh@pld-linux.org>
Sun, 22 Mar 2020 17:35:03 +0000 (18:35 +0100)
python-suds.spec

index d5188f0be3f7c19c56432c731f85e2ca5634779d..19840fc53a8ce09e8475ccd1b2a7d66f256614bd 100644 (file)
@@ -1,21 +1,34 @@
-%define        module  suds
-Summary:       Python SOAP client library
-Summary(pl.UTF-8):     Biblioteka klienta SOAP dla języka Python
-Name:          python-%{module}
-Version:       0.4.1
-Release:       2
-License:       GPL v3
+#
+%bcond_without doc     # Sphinx documentation
+%bcond_without tests   # unit tests
+%bcond_without python2 # CPython 2.x module
+%bcond_without python3 # CPython 3.x module
+
+Summary:       Python 2 SOAP client library
+Summary(pl.UTF-8):     Biblioteka klienta SOAP dla Pythona 2
+Name:          python-suds
+Version:       0.8.4
+Release:       1
+License:       LGPL v3+
 Group:         Development/Languages/Python
-Source0:       https://fedorahosted.org/releases/s/u/suds/%{name}-%{version}.tar.gz
-# Source0-md5: 95a2f04378931e973cbb3cca8f8d9765
-URL:           https://fedorahosted.org/suds/
-BuildRequires: python-devel
-BuildRequires: python-distribute
+#Source0Download: https://github.com/suds-community/suds/releases
+Source0:       https://github.com/suds-community/suds/archive/v%{version}/suds-%{version}.tar.gz
+# Source0-md5: d4c47fec087d81f9a02f70bcc48c92c4
+URL:           https://github.com/suds-community/suds
+%if %{with python2}
+BuildRequires: python-devel >= 1:2.4
+%{?with_tests:BuildRequires:   python-pytest}
+BuildRequires: python-setuptools
+%endif
+%if %{with python3}
+BuildRequires: python3-2to3 >= 1:3.2
+BuildRequires: python3-devel >= 1:3.2
+%{?with_tests:BuildRequires:   python3-pytest}
+BuildRequires: python3-setuptools
+%endif
 BuildRequires: rpm-pythonprov
-BuildRequires: rpmbuild(macros) >= 1.710
-Requires:      python-PyXML
-Requires:      python-libs
-Requires:      python-modules
+BuildRequires: rpmbuild(macros) >= 1.714
+Requires:      python-modules >= 1:2.4
 BuildArch:     noarch
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
@@ -25,40 +38,69 @@ Suds is a lightweight SOAP Python client for consuming Web Services.
 %description -l pl.UTF-8
 Suds to lekka implementacja klienta SOAP dla języka Python.
 
+%package -n python3-suds
+Summary:       Python 3 SOAP client library
+Summary(pl.UTF-8):     Biblioteka klienta SOAP dla Pythona 3
+Group:         Development/Languages/Python
+Requires:      python3-modules >= 1:3.2
+
+%description -n python3-suds
+Suds is a lightweight SOAP Python client for consuming Web Services.
+
+%description -n python3-suds -l pl.UTF-8
+Suds to lekka implementacja klienta SOAP dla języka Python.
+
 %prep
-%setup -q
+%setup -q -n suds-%{version}
 
 %build
+topdir=$(pwd)
+%if %{with python2}
 %py_build
 
+PYTHONPATH=$(pwd)/build-2/lib \
+%{__python} -m pytest tests
+%endif
+
+%if %{with python3}
+%py3_build
+
+# python2 version of suds (before 2to3) must not be in cwd when running python3 tests
+cd build-3
+PYTHONPATH=$(pwd)/lib \
+%{__python3} -m pytest ../tests
+%endif
+
 %install
 rm -rf $RPM_BUILD_ROOT
+
+%if %{with python2}
 %py_install
 
-%py_ocomp $RPM_BUILD_ROOT%{py_sitescriptdir}
-%py_comp $RPM_BUILD_ROOT%{py_sitescriptdir}
 %py_postclean
+%endif
+
+%if %{with python3}
+%py3_install
+%endif
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
+%if %{with python2}
 %files
 %defattr(644,root,root,755)
-%doc README
-%dir %{py_sitescriptdir}/suds
-%{py_sitescriptdir}/suds/*.py[co]
-%dir %{py_sitescriptdir}/suds/transport
-%{py_sitescriptdir}/suds/transport/*.py[co]
-%dir %{py_sitescriptdir}/suds/xsd
-%{py_sitescriptdir}/suds/xsd/*.py[co]
-%dir %{py_sitescriptdir}/suds/mx
-%{py_sitescriptdir}/suds/mx/*.py[co]
-%dir %{py_sitescriptdir}/suds/sax
-%{py_sitescriptdir}/suds/sax/*.py[co]
-%dir %{py_sitescriptdir}/suds/umx
-%{py_sitescriptdir}/suds/umx/*.py[co]
-%dir %{py_sitescriptdir}/suds/bindings
-%{py_sitescriptdir}/suds/bindings/*.py[co]
+%doc CHANGELOG.md README.md TODO.txt
+%{py_sitescriptdir}/suds
 %if "%{py_ver}" > "2.4"
-%{py_sitescriptdir}/suds-*.egg-info
+%{py_sitescriptdir}/suds_community-%{version}-py*.egg-info
+%endif
+%endif
+
+%if %{with python3}
+%files -n python3-suds
+%defattr(644,root,root,755)
+%doc CHANGELOG.md README.md TODO.txt
+%{py3_sitescriptdir}/suds
+%{py3_sitescriptdir}/suds_community-%{version}-py*.egg-info
 %endif
This page took 0.089952 seconds and 4 git commands to generate.