]> git.pld-linux.org Git - packages/python-zeep.git/blame - python-zeep.spec
- rebuild with python 3.8
[packages/python-zeep.git] / python-zeep.spec
CommitLineData
e70d2785
AM
1# Conditional build:
2%bcond_without tests # unit tests
3%bcond_without python2 # CPython 2.x module
4%bcond_without python3 # CPython 3.x module
5
6%define module zeep
7%define egg_name zeep
8%define pypi_name zeep
9Summary: A fast and modern Python SOAP client
10Name: python-%{pypi_name}
11Version: 3.3.1
2774214f 12Release: 2
e70d2785
AM
13License: MIT
14Group: Libraries/Python
15Source0: https://pypi.debian.net/zeep/zeep-%{version}.tar.gz
16# Source0-md5: f4c6c94052f7498a4962c72d0e771591
17URL: https://pypi.org/project/zeep/
18BuildRequires: rpm-pythonprov
19BuildRequires: rpmbuild(macros) >= 1.714
20%if %{with python2}
21BuildRequires: python-cached_property
22BuildRequires: python-defusedxml
23BuildRequires: python-modules
24BuildRequires: python-pretend
25BuildRequires: python-requests-toolbelt
26BuildRequires: python-setuptools
27%endif
28%if %{with python3}
29BuildRequires: python3-cached_property
30BuildRequires: python3-defusedxml
31BuildRequires: python3-modules
32BuildRequires: python3-pretend
33BuildRequires: python3-requests-toolbelt
34BuildRequires: python3-setuptools
35%endif
36Requires: python-modules
37BuildArch: noarch
38BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
39
40%description
41Highlights:
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
50
51%package -n python3-%{pypi_name}
52Summary: A fast and modern Python SOAP client
53Group: Libraries/Python
54Requires: python3-modules
55
56%description -n python3-%{pypi_name}
57Highlights:
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
66
67%prep
68%setup -q -n %{pypi_name}-%{version}
69
70%build
71%if %{with python2}
72%py_build %{?with_tests:test}
73%endif
74
75%if %{with python3}
76%py3_build %{?with_tests:test}
77%endif
78
79%install
80rm -rf $RPM_BUILD_ROOT
81
82%if %{with python2}
83%py_install
84
85%py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
86%py_comp $RPM_BUILD_ROOT%{py_sitedir}
87
88%py_postclean
89%endif
90
91%if %{with python3}
92%py3_install
93%endif
94
95# in case there are examples provided
96%if %{with python2}
97install -d $RPM_BUILD_ROOT%{_examplesdir}/python-%{pypi_name}-%{version}
98cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/python-%{pypi_name}-%{version}
99find $RPM_BUILD_ROOT%{_examplesdir}/python-%{pypi_name}-%{version} -name '*.py' \
100 | xargs sed -i '1s|^#!.*python\b|#!%{__python}|'
101%endif
102%if %{with python3}
103install -d $RPM_BUILD_ROOT%{_examplesdir}/python3-%{pypi_name}-%{version}
104cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/python3-%{pypi_name}-%{version}
105find $RPM_BUILD_ROOT%{_examplesdir}/python3-%{pypi_name}-%{version} -name '*.py' \
106 | xargs sed -i '1s|^#!.*python\b|#!%{__python3}|'
107%endif
108
109%clean
110rm -rf $RPM_BUILD_ROOT
111
112%if %{with python2}
113%files
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}
119%endif
120
121%if %{with python3}
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}
128%endif
This page took 0.566713 seconds and 4 git commands to generate.