]> git.pld-linux.org Git - packages/python-WebOb.git/blame - python-WebOb.spec
rebuild with tests and docs
[packages/python-WebOb.git] / python-WebOb.spec
CommitLineData
5c52e332
ER
1#
2# Conditional build:
8fa05030 3%bcond_without python2 # CPython 2.x module
5c52e332 4%bcond_without python3 # CPython 3.x module
8fa05030
JB
5%bcond_without doc # Sphinx documentation
6%bcond_without tests # unit tests
5c52e332 7
12cb6b96
MB
8%define module WebOb
9Summary: WSGI request and response object
8fa05030 10Summary(pl.UTF-8): Obiekty żądań i odpowiedzi WSGI
12cb6b96 11Name: python-%{module}
62fa2b72 12Version: 1.8.5
34783247 13Release: 5
12cb6b96 14License: MIT
8fa05030
JB
15Group: Libraries/Python
16#Source0Download: https://pypi.org/simple/WebOb/
17Source0: https://files.pythonhosted.org/packages/source/W/WebOb/%{module}-%{version}.tar.gz
62fa2b72 18# Source0-md5: 1761f416e8cf53f6fb674149cc223bd1
8fa05030
JB
19URL: https://webob.org/
20%if %{with python2}
21BuildRequires: python-devel >= 1:2.7
12cb6b96 22BuildRequires: python-setuptools
8fa05030
JB
23%if %{with tests}
24BuildRequires: python-pytest >= 3.1.0
25%endif
26%endif
27%if %{with python3}
28BuildRequires: python3-devel >= 1:3.4
29BuildRequires: python3-setuptools
30%if %{with tests}
31BuildRequires: python3-pytest >= 3.1.0
32%endif
33%endif
12cb6b96 34BuildRequires: rpm-pythonprov
8fa05030
JB
35BuildRequires: rpmbuild(macros) >= 1.714
36%if %{with doc}
62fa2b72
JB
37BuildRequires: python3-pylons-sphinx-themes
38BuildRequires: sphinx-pdg-3 >= 1.7.5
8fa05030
JB
39%endif
40Requires: python-modules >= 1:2.7
12cb6b96
MB
41BuildArch: noarch
42BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
43
44%description
45WebOb provides wrappers around the WSGI request environment, and an
46object to help create WSGI responses.
47
48The objects map much of the specified behavior of HTTP, including
49header parsing and accessors for other standard parts of the
50environment.
51
8fa05030
JB
52%description -l pl.UTF-8
53Moduł WebOb udostępnia opakowanie środowiska żądań WSGI oraz
54obiekty pomagające przy tworzeniu odpowiedzi WSGI.
55
56Obiekty odwzorowują większość określonego zachowania HTTP, w tym
57analizę nagłówków oraz dostęp do innych standardowych elementów
58środowiska.
59
5c52e332 60%package -n python3-%{module}
8fa05030
JB
61Summary: WSGI request and response object
62Summary(pl.UTF-8): Obiekty żądań i odpowiedzi WSGI
5c52e332
ER
63Group: Libraries/Python
64
65%description -n python3-%{module}
66WebOb provides wrappers around the WSGI request environment, and an
67object to help create WSGI responses.
68
69The objects map much of the specified behavior of HTTP, including
70header parsing and accessors for other standard parts of the
71environment.
72
8fa05030
JB
73%description -n python3-%{module} -l pl.UTF-8
74Moduł WebOb udostępnia opakowanie środowiska żądań WSGI oraz
75obiekty pomagające przy tworzeniu odpowiedzi WSGI.
76
77Obiekty odwzorowują większość określonego zachowania HTTP, w tym
78analizę nagłówków oraz dostęp do innych standardowych elementów
79środowiska.
80
81%package apidocs
82Summary: API documentation for Python WebOb module
83Summary(pl.UTF-8): Dokumentacja API modułu Pythona WebOb
84Group: Documentation
85
86%description apidocs
87API documentation for Python WebOb module.
88
89%description apidocs -l pl.UTF-8
90Dokumentacja API modułu Pythona WebOb.
91
12cb6b96
MB
92%prep
93%setup -q -n %{module}-%{version}
94
95%build
8fa05030 96%if %{with python2}
3c9cadf5 97%py_build
12cb6b96 98
8fa05030
JB
99%if %{with tests}
100PYTHONPATH=$(pwd)/src \
101%{__python} -m unittest discover -s tests
102%endif
103%endif
104
5c52e332 105%if %{with python3}
3c9cadf5 106%py3_build
8fa05030
JB
107
108%if %{with tests}
109PYTHONPATH=$(pwd)/src \
110%{__python3} -m unittest discover -s tests
111%endif
112%endif
113
114%if %{with doc}
115PYTHONPATH=$(pwd)/src \
62fa2b72
JB
116%{__make} -C docs html \
117 SPHINXBUILD=sphinx-build-3
5c52e332
ER
118%endif
119
12cb6b96
MB
120%install
121rm -rf $RPM_BUILD_ROOT
8fa05030
JB
122
123%if %{with python2}
3c9cadf5 124%py_install
12cb6b96
MB
125
126%py_postclean
8fa05030 127%endif
12cb6b96 128
5c52e332 129%if %{with python3}
3c9cadf5 130%py3_install
5c52e332
ER
131%endif
132
12cb6b96
MB
133%clean
134rm -rf $RPM_BUILD_ROOT
135
8fa05030 136%if %{with python2}
12cb6b96
MB
137%files
138%defattr(644,root,root,755)
8fa05030
JB
139%doc CHANGES.txt HISTORY.txt README.rst docs/license.txt
140%{py_sitescriptdir}/webob
5c52e332
ER
141%{py_sitescriptdir}/WebOb-%{version}-py*.egg-info
142%endif
143
144%if %{with python3}
145%files -n python3-%{module}
146%defattr(644,root,root,755)
8fa05030
JB
147%doc CHANGES.txt HISTORY.txt README.rst docs/license.txt
148%{py3_sitescriptdir}/webob
5c52e332 149%{py3_sitescriptdir}/WebOb-%{version}-py*.egg-info
12cb6b96 150%endif
8fa05030
JB
151
152%if %{with doc}
153%files apidocs
154%defattr(644,root,root,755)
155%doc docs/_build/html/{_static,api,experimental,*.html,*.js}
156%endif
This page took 0.156486 seconds and 4 git commands to generate.