]>
Commit | Line | Data |
---|---|---|
74d55518 JB |
1 | # |
2 | # Conditional build: | |
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: WSDL parsing services package for Web Services for Python 2 | |
8 | Summary(pl.UTF-8): Pakiet usług analizy WSDL dla usług WWW dla Pythona 2 | |
9 | Name: python-wstools | |
10 | Version: 0.4.8 | |
97f67991 | 11 | Release: 3 |
74d55518 JB |
12 | License: BSD |
13 | Group: Libraries/Python | |
14 | #Source0Download: https://pypi.org/simple/wstools/ | |
15 | Source0: https://files.pythonhosted.org/packages/source/w/wstools/wstools-%{version}.tar.gz | |
16 | # Source0-md5: bf01cc513bf109950bfa426dedeffa06 | |
17 | URL: https://pypi.org/project/wstools/ | |
18 | %if %{with python2} | |
19 | BuildRequires: python-modules >= 1:2.7 | |
20 | BuildRequires: python-pbr >= 1.10 | |
21 | BuildRequires: python-pytest-runner | |
22 | BuildRequires: python-setuptools >= 17.1 | |
23 | %if %{with tests} | |
24 | BuildRequires: python-py >= 1.4 | |
25 | BuildRequires: python-pytest >= 2.9.1 | |
26 | BuildRequires: python-six | |
27 | %endif | |
28 | %endif | |
29 | %if %{with python3} | |
30 | BuildRequires: python3-modules >= 1:3.4 | |
31 | BuildRequires: python3-pbr >= 1.10 | |
32 | BuildRequires: python3-pytest-runner | |
33 | BuildRequires: python3-setuptools >= 17.1 | |
34 | %if %{with tests} | |
35 | BuildRequires: python3-py >= 1.4 | |
36 | BuildRequires: python3-pytest >= 2.9.1 | |
37 | BuildRequires: python3-six | |
38 | %endif | |
39 | %endif | |
40 | BuildRequires: rpm-pythonprov | |
41 | BuildRequires: rpmbuild(macros) >= 1.714 | |
42 | Requires: python-modules >= 1:2.7 | |
43 | BuildArch: noarch | |
44 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
45 | ||
46 | %description | |
47 | WSDL parsing services package for Web Services for Python. | |
48 | ||
49 | %description -l pl.UTF-8 | |
50 | Pakiet usług analizy WSDL dla usług WWW (Web Services) dla Pythona. | |
51 | ||
52 | %package -n python3-wstools | |
53 | Summary: WSDL parsing services package for Web Services for Python 3 | |
54 | Summary(pl.UTF-8): Pakiet usług analizy WSDL dla usług WWW dla Pythona 3 | |
55 | Group: Libraries/Python | |
56 | Requires: python3-modules >= 1:3.4 | |
57 | ||
58 | %description -n python3-wstools | |
59 | WSDL parsing services package for Web Services for Python. | |
60 | ||
61 | %description -n python3-wstools -l pl.UTF-8 | |
62 | Pakiet usług analizy WSDL dla usług WWW (Web Services) dla Pythona. | |
63 | ||
64 | %prep | |
65 | %setup -q -n wstools-%{version} | |
66 | ||
67 | %build | |
68 | %if %{with python2} | |
69 | %py_build | |
70 | ||
71 | %if %{with tests} | |
72 | %{__python} -m pytest tests | |
73 | %endif | |
74 | %endif | |
75 | ||
76 | %if %{with python3} | |
77 | %py3_build | |
78 | ||
79 | %if %{with tests} | |
80 | %{__python3} -m pytest tests | |
81 | %endif | |
82 | %endif | |
83 | ||
84 | %install | |
85 | rm -rf $RPM_BUILD_ROOT | |
86 | ||
87 | %if %{with python2} | |
88 | %py_install | |
89 | ||
90 | %py_postclean | |
91 | %endif | |
92 | ||
93 | %if %{with python3} | |
94 | %py3_install | |
95 | %endif | |
96 | ||
97 | %clean | |
98 | rm -rf $RPM_BUILD_ROOT | |
99 | ||
100 | %if %{with python2} | |
101 | %files | |
102 | %defattr(644,root,root,755) | |
103 | %doc AUTHORS ChangeLog LICENSE.txt README.rst | |
104 | %{py_sitescriptdir}/wstools | |
105 | %{py_sitescriptdir}/wstools-%{version}-py*.egg-info | |
106 | %endif | |
107 | ||
108 | %if %{with python3} | |
109 | %files -n python3-wstools | |
110 | %defattr(644,root,root,755) | |
111 | %doc AUTHORS ChangeLog LICENSE.txt README.rst | |
112 | %{py3_sitescriptdir}/wstools | |
113 | %{py3_sitescriptdir}/wstools-%{version}-py*.egg-info | |
114 | %endif |