3 %bcond_without python2 # build python 2 module
4 %bcond_without python3 # build python 3 module
8 Summary: Fast and simple WSGI-framework for small web-applications
9 Summary(pl.UTF-8): Szybki i prosty szkielet WSGI dla małych aplikacji sieciowych
10 Name: python-%{module}
14 Group: Development/Languages/Python
15 Source0: http://pypi.python.org/packages/source/b/%{module}/%{module}-%{version}.tar.gz
16 # Source0-md5: 3bfd6aa9459ab88ad9a7e50ecd7149e4
17 URL: http://bottlepy.org
19 BuildRequires: python-modules >= 1:2.5
22 BuildRequires: python3-2to3
23 BuildRequires: python3-devel
24 BuildRequires: python3-modules
26 BuildRequires: rpm-pythonprov
27 # if py_postclean is used
28 BuildRequires: rpmbuild(macros) >= 1.219
29 Requires: python-modules >= 1:2.5
31 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
34 Bottle is a fast and simple micro-framework for small
35 web-applications. It offers request dispatching (Routes) with url
36 parameter support, Templates, a build-in HTTP Server and adapters for
37 many third party WSGI/HTTP-server and template engines. All in a
38 single file and with no dependencies other than the Python Standard
41 %description -l pl.UTF-8
42 Bottle jest szybkim i prostym szkieletem dla małych aplikcaji WSGI.
43 Oferuje mapowanie urli poprzez Routes wspierając urle z parametrami,
44 wzroce, wbudowany serwer HTTP i wtyczki dla wielu serwerów WSGI/HTTP i
45 silników wzorców. Wszystko w jednym pliku bez zalezności innych niż
46 standardowej biblioteki Pythona.
48 %package -n python3-%{module}
49 Summary: Fast and simple WSGI-framework for small web-applications
50 Summary(pl.UTF-8): Szybki i prosty szkielet WSGI dla małych aplikacji sieciowych
51 Group: Development/Languages/Python
52 Requires: python3-modules
54 %description -n python3-%{module}
55 Bottle is a fast and simple micro-framework for small
56 web-applications. It offers request dispatching (Routes) with url
57 parameter support, Templates, a build-in HTTP Server and adapters for
58 many third party WSGI/HTTP-server and template engines. All in a
59 single file and with no dependencies other than the Python Standard
62 %description -n python3-%{module} -l pl.UTF-8
63 Bottle jest szybkim i prostym szkieletem dla małych aplikcaji WSGI.
64 Oferuje mapowanie urli poprzez Routes wspierając urle z parametrami,
65 wzroce, wbudowany serwer HTTP i wtyczki dla wielu serwerów WSGI/HTTP i
66 silników wzorców. Wszystko w jednym pliku bez zalezności innych niż
67 standardowej biblioteki Pythona.
70 %setup -q -n %{module}-%{version}
74 %{__python} setup.py build -b build-2
78 %{__python3} setup.py build -b build-3
82 rm -rf $RPM_BUILD_ROOT
85 %{__python} setup.py \
89 --root=$RPM_BUILD_ROOT
91 %py_ocomp $RPM_BUILD_ROOT%%{py_sitescriptdir}
92 %py_comp $RPM_BUILD_ROOT%%{py_sitescriptdir}
97 %{__python3} setup.py \
101 --root=$RPM_BUILD_ROOT
105 rm -rf $RPM_BUILD_ROOT
109 %defattr(644,root,root,755)
110 %{py_sitescriptdir}/*.py[co]
111 %if "%{py_ver}" > "2.4"
112 %{py_sitescriptdir}/%{module}-*.egg-info
117 %files -n python3-%{module}
118 %defattr(644,root,root,755)
119 %{py3_sitescriptdir}/*.py
120 %{py3_sitescriptdir}/__pycache__
121 %{py3_sitescriptdir}/%{module}-*.egg-info