]> git.pld-linux.org Git - SPECS.git/blob - python-WSGIProxy2.spec
SPECS updated Tue 30 Apr 15:13:02 CEST 2024
[SPECS.git] / python-WSGIProxy2.spec
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 # keep 0.4.x here for python2 support
12 Version:        0.4.6
13 Release:        1
14 License:        MIT
15 Group:          Libraries/Python
16 #Source0Download: https://pypi.org/simple/wsgiproxy2/
17 Source0:        https://files.pythonhosted.org/packages/source/W/WSGIProxy2/WSGIProxy2-%{version}.tar.gz
18 # Source0-md5:  cf4f45bed6ab74ad644bee58bcad4e83
19 URL:            https://github.com/gawel/WSGIProxy2/
20 %if %{with python2}
21 BuildRequires:  python-modules >= 1:2.6
22 BuildRequires:  python-setuptools
23 %if %{with tests}
24 BuildRequires:  python-WebOb
25 BuildRequires:  python-requests
26 BuildRequires:  python-six
27 BuildRequires:  python-urllib3
28 BuildRequires:  python-webtest
29 %endif
30 %endif
31 %if %{with python3}
32 BuildRequires:  python3-modules >= 1:3.2
33 BuildRequires:  python3-setuptools
34 %if %{with tests}
35 BuildRequires:  python3-WebOb
36 BuildRequires:  python3-requests
37 BuildRequires:  python3-six
38 BuildRequires:  python3-urllib3
39 BuildRequires:  python3-webtest
40 %endif
41 %endif
42 BuildRequires:  rpm-pythonprov
43 BuildRequires:  rpmbuild(macros) >= 1.714
44 %if %{with doc}
45 BuildRequires:  sphinx-pdg-2
46 %endif
47 Requires:       python-modules >= 1:2.6
48 BuildArch:      noarch
49 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
50
51 %description
52 WSGI Proxy with various HTTP client backends.
53
54 %description -l pl.UTF-8
55 Proxy WSGI z różnymi backendami klienta HTTP.
56
57 %package -n python3-WSGIProxy2
58 Summary:        WSGI Proxy with various HTTP client backends
59 Summary(pl.UTF-8):      Proxy WSGI z różnymi backendami klienta HTTP
60 Group:          Libraries/Python
61 Requires:       python3-modules >= 1:3.2
62
63 %description -n python3-WSGIProxy2
64 WSGI Proxy with various HTTP client backends.
65
66 %description -n python3-WSGIProxy2 -l pl.UTF-8
67 Proxy WSGI z różnymi backendami klienta HTTP.
68
69 %package apidocs
70 Summary:        API documentation for Python WSGIProxy2 module
71 Summary(pl.UTF-8):      Dokumentacja API modułu Pythona WSGIProxy2
72 Group:          Documentation
73
74 %description apidocs
75 API documentation for Python WSGIProxy2 module.
76
77 %description apidocs -l pl.UTF-8
78 Dokumentacja API modułu Pythona WSGIProxy2.
79
80 %prep
81 %setup -q -n WSGIProxy2-%{version}
82
83 %build
84 %if %{with python2}
85 %py_build
86
87 %if %{with tests}
88 # test_quoted_utf8_url fails with InvalidURL
89 nosetests-%{py_ver} wsgiproxy -e test_quoted_utf8_url
90 %endif
91 %endif
92
93 %if %{with python3}
94 %py3_build
95
96 %if %{with tests}
97 nosetests-%{py3_ver} wsgiproxy
98 %endif
99 %endif
100
101 %if %{with doc}
102 %{__make} -C docs html \
103         SPHINXBUILD=sphinx-build-2
104 %endif
105
106 %install
107 rm -rf $RPM_BUILD_ROOT
108
109 %if %{with python2}
110 %py_install
111
112 %py_postclean
113 %endif
114
115 %if %{with python3}
116 %py3_install
117 %endif
118
119 %clean
120 rm -rf $RPM_BUILD_ROOT
121
122 %if %{with python2}
123 %files
124 %defattr(644,root,root,755)
125 %doc CHANGES.rst COPYING README.rst
126 %{py_sitescriptdir}/wsgiproxy
127 %{py_sitescriptdir}/WSGIProxy2-%{version}-py*.egg-info
128 %endif
129
130 %if %{with python3}
131 %files -n python3-WSGIProxy2
132 %defattr(644,root,root,755)
133 %doc CHANGES.rst COPYING README.rst
134 %{py3_sitescriptdir}/wsgiproxy
135 %{py3_sitescriptdir}/WSGIProxy2-%{version}-py*.egg-info
136 %endif
137
138 %if %{with doc}
139 %files apidocs
140 %defattr(644,root,root,755)
141 %doc docs/_build/html/{_modules,_static,*.html,*.js}
142 %endif
This page took 1.497691 seconds and 3 git commands to generate.