2 %bcond_without tests # unit tests
3 %bcond_without python2 # CPython 2.x module
4 %bcond_without python3 # CPython 3.x module
9 Summary: A fast and modern Python SOAP client
10 Name: python-%{pypi_name}
14 Group: Libraries/Python
15 Source0: https://pypi.debian.net/zeep/zeep-%{version}.tar.gz
16 # Source0-md5: f4c6c94052f7498a4962c72d0e771591
17 URL: https://pypi.org/project/zeep/
18 BuildRequires: rpm-pythonprov
19 BuildRequires: rpmbuild(macros) >= 1.714
21 BuildRequires: python-cached_property
22 BuildRequires: python-defusedxml
23 BuildRequires: python-modules
24 BuildRequires: python-pretend
25 BuildRequires: python-requests-toolbelt
26 BuildRequires: python-setuptools
29 BuildRequires: python3-cached_property
30 BuildRequires: python3-defusedxml
31 BuildRequires: python3-modules
32 BuildRequires: python3-pretend
33 BuildRequires: python3-requests-toolbelt
34 BuildRequires: python3-setuptools
36 Requires: python-modules
38 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
42 - Compatible with Python 2.7, 3.3, 3.4, 3.5, 3.6, 3.7 and PyPy
43 - Build on top of lxml and requests
44 - Support for Soap 1.1, Soap 1.2 and HTTP bindings
45 - Support for WS-Addressing headers
46 - Support for WSSE (UserNameToken / x.509 signing)
47 - Support for tornado async transport via gen.coroutine (Python 2.7+)
48 - Support for asyncio via aiohttp (Python 3.5+)
49 - Experimental support for XOP messages
51 %package -n python3-%{pypi_name}
52 Summary: A fast and modern Python SOAP client
53 Group: Libraries/Python
54 Requires: python3-modules
56 %description -n python3-%{pypi_name}
58 - Compatible with Python 2.7, 3.3, 3.4, 3.5, 3.6, 3.7 and PyPy
59 - Build on top of lxml and requests
60 - Support for Soap 1.1, Soap 1.2 and HTTP bindings
61 - Support for WS-Addressing headers
62 - Support for WSSE (UserNameToken / x.509 signing)
63 - Support for tornado async transport via gen.coroutine (Python 2.7+)
64 - Support for asyncio via aiohttp (Python 3.5+)
65 - Experimental support for XOP messages
68 %setup -q -n %{pypi_name}-%{version}
72 %py_build %{?with_tests:test}
76 %py3_build %{?with_tests:test}
80 rm -rf $RPM_BUILD_ROOT
85 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
86 %py_comp $RPM_BUILD_ROOT%{py_sitedir}
95 # in case there are examples provided
97 install -d $RPM_BUILD_ROOT%{_examplesdir}/python-%{pypi_name}-%{version}
98 cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/python-%{pypi_name}-%{version}
99 find $RPM_BUILD_ROOT%{_examplesdir}/python-%{pypi_name}-%{version} -name '*.py' \
100 | xargs sed -i '1s|^#!.*python\b|#!%{__python}|'
103 install -d $RPM_BUILD_ROOT%{_examplesdir}/python3-%{pypi_name}-%{version}
104 cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/python3-%{pypi_name}-%{version}
105 find $RPM_BUILD_ROOT%{_examplesdir}/python3-%{pypi_name}-%{version} -name '*.py' \
106 | xargs sed -i '1s|^#!.*python\b|#!%{__python3}|'
110 rm -rf $RPM_BUILD_ROOT
114 %defattr(644,root,root,755)
115 %doc CHANGES CONTRIBUTORS* README*
116 %{py_sitescriptdir}/%{module}
117 %{py_sitescriptdir}/%{egg_name}-%{version}-py*.egg-info
118 %{_examplesdir}/python-%{pypi_name}-%{version}
122 %files -n python3-%{pypi_name}
123 %defattr(644,root,root,755)
124 %doc CHANGES CONTRIBUTORS* README*
125 %{py3_sitescriptdir}/%{module}
126 %{py3_sitescriptdir}/%{egg_name}-%{version}-py*.egg-info
127 %{_examplesdir}/python3-%{pypi_name}-%{version}