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