]>
Commit | Line | Data |
---|---|---|
0ee1734e JB |
1 | # |
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 | |
6 | ||
7 | Summary: Python 2 SOAP client library | |
8 | Summary(pl.UTF-8): Biblioteka klienta SOAP dla Pythona 2 | |
9 | Name: python-suds | |
10 | Version: 0.8.4 | |
11 | Release: 1 | |
12 | License: LGPL v3+ | |
5c9c2e21 | 13 | Group: Development/Languages/Python |
0ee1734e JB |
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 | URL: https://github.com/suds-community/suds | |
18 | %if %{with python2} | |
19 | BuildRequires: python-devel >= 1:2.4 | |
20 | %{?with_tests:BuildRequires: python-pytest} | |
21 | BuildRequires: python-setuptools | |
22 | %endif | |
23 | %if %{with python3} | |
24 | BuildRequires: python3-2to3 >= 1:3.2 | |
25 | BuildRequires: python3-devel >= 1:3.2 | |
26 | %{?with_tests:BuildRequires: python3-pytest} | |
27 | BuildRequires: python3-setuptools | |
28 | %endif | |
5c9c2e21 | 29 | BuildRequires: rpm-pythonprov |
0ee1734e JB |
30 | BuildRequires: rpmbuild(macros) >= 1.714 |
31 | Requires: python-modules >= 1:2.4 | |
5c9c2e21 | 32 | BuildArch: noarch |
33 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
34 | ||
35 | %description | |
36 | Suds is a lightweight SOAP Python client for consuming Web Services. | |
37 | ||
38 | %description -l pl.UTF-8 | |
39 | Suds to lekka implementacja klienta SOAP dla języka Python. | |
40 | ||
0ee1734e JB |
41 | %package -n python3-suds |
42 | Summary: Python 3 SOAP client library | |
43 | Summary(pl.UTF-8): Biblioteka klienta SOAP dla Pythona 3 | |
44 | Group: Development/Languages/Python | |
45 | Requires: python3-modules >= 1:3.2 | |
46 | ||
47 | %description -n python3-suds | |
48 | Suds is a lightweight SOAP Python client for consuming Web Services. | |
49 | ||
50 | %description -n python3-suds -l pl.UTF-8 | |
51 | Suds to lekka implementacja klienta SOAP dla języka Python. | |
52 | ||
5c9c2e21 | 53 | %prep |
0ee1734e | 54 | %setup -q -n suds-%{version} |
5c9c2e21 | 55 | |
56 | %build | |
0ee1734e JB |
57 | topdir=$(pwd) |
58 | %if %{with python2} | |
898eeb53 | 59 | %py_build |
5c9c2e21 | 60 | |
0ee1734e JB |
61 | PYTHONPATH=$(pwd)/build-2/lib \ |
62 | %{__python} -m pytest tests | |
63 | %endif | |
64 | ||
65 | %if %{with python3} | |
66 | %py3_build | |
67 | ||
68 | # python2 version of suds (before 2to3) must not be in cwd when running python3 tests | |
69 | cd build-3 | |
70 | PYTHONPATH=$(pwd)/lib \ | |
71 | %{__python3} -m pytest ../tests | |
72 | %endif | |
73 | ||
5c9c2e21 | 74 | %install |
75 | rm -rf $RPM_BUILD_ROOT | |
0ee1734e JB |
76 | |
77 | %if %{with python2} | |
898eeb53 | 78 | %py_install |
5c9c2e21 | 79 | |
5c9c2e21 | 80 | %py_postclean |
0ee1734e JB |
81 | %endif |
82 | ||
83 | %if %{with python3} | |
84 | %py3_install | |
85 | %endif | |
5c9c2e21 | 86 | |
87 | %clean | |
88 | rm -rf $RPM_BUILD_ROOT | |
89 | ||
0ee1734e | 90 | %if %{with python2} |
5c9c2e21 | 91 | %files |
92 | %defattr(644,root,root,755) | |
0ee1734e JB |
93 | %doc CHANGELOG.md README.md TODO.txt |
94 | %{py_sitescriptdir}/suds | |
5c9c2e21 | 95 | %if "%{py_ver}" > "2.4" |
0ee1734e JB |
96 | %{py_sitescriptdir}/suds_community-%{version}-py*.egg-info |
97 | %endif | |
98 | %endif | |
99 | ||
100 | %if %{with python3} | |
101 | %files -n python3-suds | |
102 | %defattr(644,root,root,755) | |
103 | %doc CHANGELOG.md README.md TODO.txt | |
104 | %{py3_sitescriptdir}/suds | |
105 | %{py3_sitescriptdir}/suds_community-%{version}-py*.egg-info | |
5c9c2e21 | 106 | %endif |