]> git.pld-linux.org Git - SPECS.git/blob - python-webtest.spec
SPECS updated Wed 28 Jul 14:48:01 CEST 2021
[SPECS.git] / python-webtest.spec
1 #
2 # Conditional build:
3 %bcond_without  python2 # CPython 2.x module
4 %bcond_without  python3 # CPython 3.x module
5 %bcond_without  doc     # Sphinx documentation
6 %bcond_without  tests   # unit tests
7
8 %define         module  webtest
9 Summary:        Helper to test WSGI applications
10 Summary(pl.UTF-8):      Moduł pomocniczy do testowania aplikacji WSGI
11 Name:           python-%{module}
12 Version:        2.0.30
13 Release:        4
14 License:        MIT
15 Group:          Libraries/Python
16 #Source0Download: https://pypi.org/simple/webtest/
17 Source0:        https://files.pythonhosted.org/packages/source/W/WebTest/WebTest-%{version}.tar.gz
18 # Source0-md5:  0dd5a9093922e08e452f60d7d2eae99a
19 Patch0:         %{name}-deps.patch
20 URL:            http://webtest.pythonpaste.org/
21 %if %{with python2}
22 BuildRequires:  python-modules >= 1:2.7
23 BuildRequires:  python-setuptools
24 %if %{with tests}
25 BuildRequires:  python-PasteDeploy
26 BuildRequires:  python-WSGIProxy2
27 BuildRequires:  python-WebOb >= 1.2
28 BuildRequires:  python-bs4
29 BuildRequires:  python-dtopt
30 BuildRequires:  python-lxml
31 BuildRequires:  python-mock
32 BuildRequires:  python-nose
33 BuildRequires:  python-pyquery
34 BuildRequires:  python-six
35 BuildRequires:  python-waitress >= 0.8.5
36 %endif
37 %endif
38 %if %{with python3}
39 BuildRequires:  python3-modules >= 1:3.3
40 BuildRequires:  python3-setuptools
41 %if %{with tests}
42 BuildRequires:  python3-PasteDeploy
43 BuildRequires:  python3-WSGIProxy2
44 BuildRequires:  python3-WebOb >= 1.2
45 BuildRequires:  python3-bs4
46 BuildRequires:  python3-dtopt
47 BuildRequires:  python3-nose >= 1.3.1
48 BuildRequires:  python3-pyquery
49 BuildRequires:  python3-six
50 BuildRequires:  python3-waitress >= 0.8.5
51 %endif
52 %endif
53 BuildRequires:  rpm-pythonprov
54 BuildRequires:  rpmbuild(macros) >= 1.714
55 %if %{with doc}
56 BuildRequires:  sphinx-pdg
57 %endif
58 Requires:       python-modules >= 1:2.7
59 Obsoletes:      python-WebTest
60 BuildArch:      noarch
61 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
62
63 %description
64 WebTest wraps any WSGI application and makes it easy to send test
65 requests to that application, without starting up an HTTP server.
66
67 This provides convenient full-stack testing of applications written
68 with any WSGI-compatible framework.
69
70 %description -l pl.UTF-8
71 WebTest obudowuje dowolną aplikację WSGI i ułatwia wysyłanie do niej
72 testowych żądań bez uruchamiania serwera HTTP.
73
74 Daje to wygodne, oparte o pełny stos testowanie aplikacji napisanych
75 przy użyciu dowolnego szkieletu zgodnego z WSGI.
76
77 %package -n python3-webtest
78 Summary:        Helper to test WSGI applications
79 Summary(pl.UTF-8):      Moduł pomocniczy do testowania aplikacji WSGI
80 Group:          Libraries/Python
81 Requires:       python3-modules >= 1:3.3
82
83 %description -n python3-webtest
84 WebTest wraps any WSGI application and makes it easy to send test
85 requests to that application, without starting up an HTTP server.
86
87 This provides convenient full-stack testing of applications written
88 with any WSGI-compatible framework.
89
90 %description -n python3-webtest -l pl.UTF-8
91 WebTest obudowuje dowolną aplikację WSGI i ułatwia wysyłanie do niej
92 testowych żądań bez uruchamiania serwera HTTP.
93
94 Daje to wygodne, oparte o pełny stos testowanie aplikacji napisanych
95 przy użyciu dowolnego szkieletu zgodnego z WSGI.
96
97 %package apidocs
98 Summary:        API documentation for Python WebTest module
99 Summary(pl.UTF-8):      Dokumentacja API modułu Pythona WebTest
100 Group:          Documentation
101
102 %description apidocs
103 API documentation for Python WebTest module.
104
105 %description apidocs -l pl.UTF-8
106 Dokumentacja API modułu Pythona WebTest.
107
108 %prep
109 %setup -q -n WebTest-%{version}
110 %patch0 -p1
111
112 # Remove bundled egg info
113 %{__rm} -r *.egg-info
114
115 %build
116 %if %{with python2}
117 %py_build %{?with_tests:test}
118 %endif
119
120 %if %{with python3}
121 %py3_build %{?with_tests:test}
122 %endif
123
124 %if %{with doc}
125 PYTHONPATH=$(pwd) \
126 %{__make} -C docs html
127 %endif
128
129 %install
130 rm -rf $RPM_BUILD_ROOT
131
132 %if %{with python2}
133 %py_install
134
135 %py_postclean
136 %endif
137
138 %if %{with python3}
139 %py3_install
140 %endif
141
142 %clean
143 rm -rf $RPM_BUILD_ROOT
144
145 %if %{with python2}
146 %files
147 %defattr(644,root,root,755)
148 %doc CHANGELOG.rst README.rst docs/license.rst
149 %{py_sitescriptdir}/webtest
150 %{py_sitescriptdir}/WebTest-%{version}-py*.egg-info
151 %endif
152
153 %if %{with python3}
154 %files -n python3-webtest
155 %defattr(644,root,root,755)
156 %doc CHANGELOG.rst README.rst docs/license.rst
157 %{py3_sitescriptdir}/webtest
158 %{py3_sitescriptdir}/WebTest-%{version}-py*.egg-info
159 %endif
160
161 %if %{with doc}
162 %files apidocs
163 %defattr(644,root,root,755)
164 %doc docs/_build/html/{_static,*.html,*.js}
165 %endif
This page took 0.306424 seconds and 3 git commands to generate.