2 %bcond_without doc # Sphinx documentation
3 %bcond_without tests # unit tests
4 %bcond_without python2 # CPython 2.x module
5 %bcond_without python3 # CPython 3.x module
7 Summary: Python 2 SOAP client library
8 Summary(pl.UTF-8): Biblioteka klienta SOAP dla Pythona 2
13 Group: Development/Languages/Python
14 #Source0Download: https://github.com/suds-community/suds/releases
15 Source0: https://github.com/suds-community/suds/archive/v%{version}/suds-%{version}.tar.gz
16 # Source0-md5: d4c47fec087d81f9a02f70bcc48c92c4
17 Patch0: %{name}-pytest.patch
18 URL: https://github.com/suds-community/suds
20 BuildRequires: python-devel >= 1:2.4
21 %{?with_tests:BuildRequires: python-pytest}
22 BuildRequires: python-setuptools
25 BuildRequires: python3-2to3 >= 1:3.2
26 BuildRequires: python3-devel >= 1:3.2
27 %{?with_tests:BuildRequires: python3-pytest}
28 BuildRequires: python3-setuptools
30 BuildRequires: rpm-pythonprov
31 BuildRequires: rpmbuild(macros) >= 1.714
32 Requires: python-modules >= 1:2.4
34 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
37 Suds is a lightweight SOAP Python client for consuming Web Services.
39 %description -l pl.UTF-8
40 Suds to lekka implementacja klienta SOAP dla języka Python.
42 %package -n python3-suds
43 Summary: Python 3 SOAP client library
44 Summary(pl.UTF-8): Biblioteka klienta SOAP dla Pythona 3
45 Group: Development/Languages/Python
46 Requires: python3-modules >= 1:3.2
48 %description -n python3-suds
49 Suds is a lightweight SOAP Python client for consuming Web Services.
51 %description -n python3-suds -l pl.UTF-8
52 Suds to lekka implementacja klienta SOAP dla języka Python.
55 %setup -q -n suds-%{version}
63 PYTHONPATH=$(pwd)/build-2/lib \
64 %{__python} -m pytest tests
70 # python2 version of suds (before 2to3) must not be in cwd when running python3 tests
72 PYTHONPATH=$(pwd)/lib \
73 %{__python3} -m pytest ../tests
77 rm -rf $RPM_BUILD_ROOT
90 rm -rf $RPM_BUILD_ROOT
94 %defattr(644,root,root,755)
95 %doc CHANGELOG.md README.md TODO.txt
96 %{py_sitescriptdir}/suds
97 %if "%{py_ver}" > "2.4"
98 %{py_sitescriptdir}/suds_community-%{version}-py*.egg-info
103 %files -n python3-suds
104 %defattr(644,root,root,755)
105 %doc CHANGELOG.md README.md TODO.txt
106 %{py3_sitescriptdir}/suds
107 %{py3_sitescriptdir}/suds_community-%{version}-py*.egg-info