]>
Commit | Line | Data |
---|---|---|
800a36fb JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without doc # Sphinx documentation | |
4 | %bcond_without tests # unit tests | |
5 | %bcond_without python2 # CPython 2.x module | |
6 | %bcond_without python3 # CPython 3.x module | |
7 | ||
8 | Summary: WSGI Proxy with various HTTP client backends | |
9 | Summary(pl.UTF-8): Proxy WSGI z różnymi backendami klienta HTTP | |
10 | Name: python-WSGIProxy2 | |
11 | Version: 0.4.4 | |
6a53d596 | 12 | Release: 4 |
800a36fb JB |
13 | License: MIT |
14 | Group: Libraries/Python | |
15 | #Source0Download: https://pypi.org/simple/wsgiproxy2/ | |
16 | Source0: https://files.pythonhosted.org/packages/source/W/WSGIProxy2/WSGIProxy2-%{version}.tar.gz | |
17 | # Source0-md5: 888f225f00a7923445e24f0979d92a45 | |
18 | URL: https://github.com/gawel/WSGIProxy2/ | |
19 | %if %{with python2} | |
20 | BuildRequires: python-modules >= 1:2.6 | |
21 | BuildRequires: python-setuptools | |
22 | %if %{with tests} | |
23 | BuildRequires: python-WebOb | |
24 | BuildRequires: python-requests | |
25 | BuildRequires: python-six | |
26 | BuildRequires: python-urllib3 | |
27 | BuildRequires: python-webtest | |
28 | %endif | |
29 | %endif | |
30 | %if %{with python3} | |
31 | BuildRequires: python3-modules >= 1:3.2 | |
32 | BuildRequires: python3-setuptools | |
33 | %if %{with tests} | |
34 | BuildRequires: python3-WebOb | |
35 | BuildRequires: python3-requests | |
36 | BuildRequires: python3-six | |
37 | BuildRequires: python3-urllib3 | |
38 | BuildRequires: python3-webtest | |
39 | %endif | |
40 | %endif | |
41 | BuildRequires: rpm-pythonprov | |
42 | BuildRequires: rpmbuild(macros) >= 1.714 | |
43 | %if %{with doc} | |
44 | BuildRequires: sphinx-pdg | |
45 | %endif | |
46 | Requires: python-modules >= 1:2.6 | |
47 | BuildArch: noarch | |
48 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
49 | ||
50 | %description | |
51 | WSGI Proxy with various HTTP client backends. | |
52 | ||
53 | %description -l pl.UTF-8 | |
54 | Proxy WSGI z różnymi backendami klienta HTTP. | |
55 | ||
56 | %package -n python3-WSGIProxy2 | |
57 | Summary: WSGI Proxy with various HTTP client backends | |
58 | Summary(pl.UTF-8): Proxy WSGI z różnymi backendami klienta HTTP | |
59 | Group: Libraries/Python | |
60 | Requires: python3-modules >= 1:3.2 | |
61 | ||
62 | %description -n python3-WSGIProxy2 | |
63 | WSGI Proxy with various HTTP client backends. | |
64 | ||
65 | %description -n python3-WSGIProxy2 -l pl.UTF-8 | |
66 | Proxy WSGI z różnymi backendami klienta HTTP. | |
67 | ||
68 | %package apidocs | |
69 | Summary: API documentation for Python WSGIProxy2 module | |
70 | Summary(pl.UTF-8): Dokumentacja API modułu Pythona WSGIProxy2 | |
71 | Group: Documentation | |
72 | ||
73 | %description apidocs | |
74 | API documentation for Python WSGIProxy2 module. | |
75 | ||
76 | %description apidocs -l pl.UTF-8 | |
77 | Dokumentacja API modułu Pythona WSGIProxy2. | |
78 | ||
79 | %prep | |
80 | %setup -q -n WSGIProxy2-%{version} | |
81 | ||
82 | %build | |
83 | %if %{with python2} | |
84 | %py_build %{?with_tests:test} | |
85 | %endif | |
86 | ||
87 | %if %{with python3} | |
88 | %py3_build %{?with_tests:test} | |
89 | %endif | |
90 | ||
91 | %if %{with doc} | |
92 | %{__make} -C docs html \ | |
93 | SPHINXBUILD=sphinx-build | |
94 | %endif | |
95 | ||
96 | %install | |
97 | rm -rf $RPM_BUILD_ROOT | |
98 | ||
99 | %if %{with python2} | |
100 | %py_install | |
101 | ||
102 | %py_postclean | |
103 | %endif | |
104 | ||
105 | %if %{with python3} | |
106 | %py3_install | |
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.rst COPYING README.rst | |
116 | %{py_sitescriptdir}/wsgiproxy | |
117 | %{py_sitescriptdir}/WSGIProxy2-%{version}-py*.egg-info | |
118 | %endif | |
119 | ||
120 | %if %{with python3} | |
121 | %files -n python3-WSGIProxy2 | |
122 | %defattr(644,root,root,755) | |
123 | %doc CHANGES.rst COPYING README.rst | |
124 | %{py3_sitescriptdir}/wsgiproxy | |
125 | %{py3_sitescriptdir}/WSGIProxy2-%{version}-py*.egg-info | |
126 | %endif | |
127 | ||
128 | %if %{with doc} | |
129 | %files apidocs | |
130 | %defattr(644,root,root,755) | |
131 | %doc docs/_build/html/{_static,*.html,*.js} | |
132 | %endif |