]> git.pld-linux.org Git - packages/python-bottle.git/blob - python-bottle.spec
7c13b37d0db73db3cba654e2e5604e708084fa5f
[packages/python-bottle.git] / python-bottle.spec
1 # TODO: fix tests
2 #
3 # Conditional build:
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]
7 #
8 %define         module  bottle
9 #
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}
13 Version:        0.12.18
14 Release:        4
15 License:        MIT
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/
21 %if %{with python2}
22 BuildRequires:  python-modules >= 1:2.5
23 BuildRequires:  python-setuptools
24 %endif
25 %if %{with python3}
26 BuildRequires:  python3-devel >= 1:3.2
27 BuildRequires:  python3-modules >= 1:3.2
28 BuildRequires:  python3-setuptools
29 %endif
30 BuildRequires:  rpm-pythonprov
31 BuildRequires:  rpmbuild(macros) >= 1.714
32 Requires:       python-modules >= 1:2.5
33 BuildArch:      noarch
34 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
35
36 %description
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
42 Library.
43
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.
50
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
56
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
63 Library.
64
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.
71
72 %prep
73 %setup -q -n %{module}-%{version}
74
75 %build
76 %if %{with python2}
77 %py_build
78
79 %if %{with tests}
80 %{__python} test/testall.py
81 %endif
82 %endif
83
84 %if %{with python3}
85 %py3_build
86
87 %if %{with tests}
88 %{__python3} test/testall.py
89 %endif
90 %endif
91
92 %install
93 rm -rf $RPM_BUILD_ROOT
94
95 %if %{with python2}
96 %py_install
97
98 %{__mv} $RPM_BUILD_ROOT%{_bindir}/{bottle.py,bottle-2}
99
100 %py_postclean
101 %endif
102
103 %if %{with python3}
104 %py3_install
105
106 %{__mv} $RPM_BUILD_ROOT%{_bindir}/{bottle.py,bottle-3}
107 ln -s bootle-3 $RPM_BUILD_ROOT%{_bindir}/bottle
108 %endif
109
110 %clean
111 rm -rf $RPM_BUILD_ROOT
112
113 %if %{with python2}
114 %files
115 %defattr(644,root,root,755)
116 %doc README.rst
117 %attr(755,root,root) %{_bindir}/bottle-2
118 %{py_sitescriptdir}/bottle.py[co]
119 %{py_sitescriptdir}/bottle-%{version}-py*.egg-info
120 %endif
121
122 %if %{with python3}
123 %files -n python3-%{module}
124 %defattr(644,root,root,755)
125 %doc README.rst
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
131 %endif
This page took 0.081827 seconds and 2 git commands to generate.