4 %bcond_without python2 # build python 2 module
5 %bcond_without python3 # build python 3 module
6 %bcond_with tests # unit/functional tests [one fails on py3 as of 0.12.18, probably network is used]
10 Summary: Fast and simple WSGI-framework for small web-applications
11 Summary(pl.UTF-8): Szybki i prosty szkielet WSGI dla małych aplikacji sieciowych
12 Name: python-%{module}
16 Group: Development/Languages/Python
17 #Source0Download: https://pypi.org/simple/bottle/
18 Source0: https://files.pythonhosted.org/packages/source/b/bottle/%{module}-%{version}.tar.gz
19 # Source0-md5: a00b7e9a1ab3be7c19c1235fea2ccb40
20 URL: http://bottlepy.org/
22 BuildRequires: python-modules >= 1:2.5
23 BuildRequires: python-setuptools
26 BuildRequires: python3-devel >= 1:3.2
27 BuildRequires: python3-modules >= 1:3.2
28 BuildRequires: python3-setuptools
30 BuildRequires: rpm-pythonprov
31 BuildRequires: rpmbuild(macros) >= 1.714
32 Requires: python-modules >= 1:2.5
34 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
37 Bottle is a fast and simple micro-framework for small
38 web-applications. It offers request dispatching (Routes) with url
39 parameter support, Templates, a build-in HTTP Server and adapters for
40 many third party WSGI/HTTP-server and template engines. All in a
41 single file and with no dependencies other than the Python Standard
44 %description -l pl.UTF-8
45 Bottle jest szybkim i prostym szkieletem dla małych aplikcaji WSGI.
46 Oferuje mapowanie urli poprzez Routes wspierając urle z parametrami,
47 wzroce, wbudowany serwer HTTP i wtyczki dla wielu serwerów WSGI/HTTP i
48 silników wzorców. Wszystko w jednym pliku bez zalezności innych niż
49 standardowej biblioteki Pythona.
51 %package -n python3-%{module}
52 Summary: Fast and simple WSGI-framework for small web-applications
53 Summary(pl.UTF-8): Szybki i prosty szkielet WSGI dla małych aplikacji sieciowych
54 Group: Development/Languages/Python
55 Requires: python3-modules
57 %description -n python3-%{module}
58 Bottle is a fast and simple micro-framework for small
59 web-applications. It offers request dispatching (Routes) with url
60 parameter support, Templates, a build-in HTTP Server and adapters for
61 many third party WSGI/HTTP-server and template engines. All in a
62 single file and with no dependencies other than the Python Standard
65 %description -n python3-%{module} -l pl.UTF-8
66 Bottle jest szybkim i prostym szkieletem dla małych aplikcaji WSGI.
67 Oferuje mapowanie urli poprzez Routes wspierając urle z parametrami,
68 wzroce, wbudowany serwer HTTP i wtyczki dla wielu serwerów WSGI/HTTP i
69 silników wzorców. Wszystko w jednym pliku bez zalezności innych niż
70 standardowej biblioteki Pythona.
73 %setup -q -n %{module}-%{version}
80 %{__python} test/testall.py
88 %{__python3} test/testall.py
93 rm -rf $RPM_BUILD_ROOT
98 %{__mv} $RPM_BUILD_ROOT%{_bindir}/{bottle.py,bottle-2}
106 %{__mv} $RPM_BUILD_ROOT%{_bindir}/{bottle.py,bottle-3}
107 ln -s bootle-3 $RPM_BUILD_ROOT%{_bindir}/bottle
111 rm -rf $RPM_BUILD_ROOT
115 %defattr(644,root,root,755)
117 %attr(755,root,root) %{_bindir}/bottle-2
118 %{py_sitescriptdir}/bottle.py[co]
119 %{py_sitescriptdir}/bottle-%{version}-py*.egg-info
123 %files -n python3-%{module}
124 %defattr(644,root,root,755)
126 %attr(755,root,root) %{_bindir}/bottle
127 %attr(755,root,root) %{_bindir}/bottle-3
128 %{py3_sitescriptdir}/bottle.py
129 %{py3_sitescriptdir}/__pycache__/bottle.cpython-*.py[co]
130 %{py3_sitescriptdir}/bottle-%{version}-py*.egg-info