]> git.pld-linux.org Git - packages/python-zeep.git/blob - python-zeep.spec
- rebuild with python 3.8
[packages/python-zeep.git] / python-zeep.spec
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
9 Summary:        A fast and modern Python SOAP client
10 Name:           python-%{pypi_name}
11 Version:        3.3.1
12 Release:        2
13 License:        MIT
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
20 %if %{with python2}
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
27 %endif
28 %if %{with python3}
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
35 %endif
36 Requires:       python-modules
37 BuildArch:      noarch
38 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
39
40 %description
41 Highlights:
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}
52 Summary:        A fast and modern Python SOAP client
53 Group:          Libraries/Python
54 Requires:       python3-modules
55
56 %description -n python3-%{pypi_name}
57 Highlights:
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
80 rm -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}
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}|'
101 %endif
102 %if %{with python3}
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}|'
107 %endif
108
109 %clean
110 rm -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.072154 seconds and 3 git commands to generate.