]> git.pld-linux.org Git - packages/python-bottle.git/blame - python-bottle.spec
rebuild with python 3.10
[packages/python-bottle.git] / python-bottle.spec
CommitLineData
f3362331 1# TODO: fix tests
06942a5c
MB
2#
3# Conditional build:
4%bcond_without python2 # build python 2 module
5%bcond_without python3 # build python 3 module
ce76f618 6%bcond_with tests # unit/functional tests [one fails on py3 as of 0.12.18, probably network is used]
06942a5c 7#
d9d42a70 8%define module bottle
06942a5c 9#
d9d42a70
MK
10Summary: Fast and simple WSGI-framework for small web-applications
11Summary(pl.UTF-8): Szybki i prosty szkielet WSGI dla małych aplikacji sieciowych
12Name: python-%{module}
ce76f618 13Version: 0.12.18
7677d578 14Release: 4
d9d42a70
MK
15License: MIT
16Group: Development/Languages/Python
f3362331
JB
17#Source0Download: https://pypi.org/simple/bottle/
18Source0: https://files.pythonhosted.org/packages/source/b/bottle/%{module}-%{version}.tar.gz
ce76f618 19# Source0-md5: a00b7e9a1ab3be7c19c1235fea2ccb40
f3362331 20URL: http://bottlepy.org/
06942a5c
MB
21%if %{with python2}
22BuildRequires: python-modules >= 1:2.5
f3362331 23BuildRequires: python-setuptools
06942a5c
MB
24%endif
25%if %{with python3}
f3362331
JB
26BuildRequires: python3-devel >= 1:3.2
27BuildRequires: python3-modules >= 1:3.2
28BuildRequires: python3-setuptools
06942a5c 29%endif
d9d42a70 30BuildRequires: rpm-pythonprov
f3362331 31BuildRequires: rpmbuild(macros) >= 1.714
06942a5c 32Requires: python-modules >= 1:2.5
d9d42a70
MK
33BuildArch: noarch
34BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
35
36%description
37Bottle is a fast and simple micro-framework for small
38web-applications. It offers request dispatching (Routes) with url
39parameter support, Templates, a build-in HTTP Server and adapters for
40many third party WSGI/HTTP-server and template engines. All in a
41single file and with no dependencies other than the Python Standard
42Library.
43
44%description -l pl.UTF-8
45Bottle jest szybkim i prostym szkieletem dla małych aplikcaji WSGI.
46Oferuje mapowanie urli poprzez Routes wspierając urle z parametrami,
47wzroce, wbudowany serwer HTTP i wtyczki dla wielu serwerów WSGI/HTTP i
48silników wzorców. Wszystko w jednym pliku bez zalezności innych niż
49standardowej biblioteki Pythona.
50
06942a5c
MB
51%package -n python3-%{module}
52Summary: Fast and simple WSGI-framework for small web-applications
53Summary(pl.UTF-8): Szybki i prosty szkielet WSGI dla małych aplikacji sieciowych
54Group: Development/Languages/Python
55Requires: python3-modules
56
57%description -n python3-%{module}
58Bottle is a fast and simple micro-framework for small
59web-applications. It offers request dispatching (Routes) with url
60parameter support, Templates, a build-in HTTP Server and adapters for
61many third party WSGI/HTTP-server and template engines. All in a
62single file and with no dependencies other than the Python Standard
63Library.
64
65%description -n python3-%{module} -l pl.UTF-8
66Bottle jest szybkim i prostym szkieletem dla małych aplikcaji WSGI.
67Oferuje mapowanie urli poprzez Routes wspierając urle z parametrami,
68wzroce, wbudowany serwer HTTP i wtyczki dla wielu serwerów WSGI/HTTP i
69silników wzorców. Wszystko w jednym pliku bez zalezności innych niż
70standardowej biblioteki Pythona.
71
d9d42a70
MK
72%prep
73%setup -q -n %{module}-%{version}
74
4c21fd30 75%build
06942a5c 76%if %{with python2}
1dac93d3 77%py_build
f3362331
JB
78
79%if %{with tests}
ce76f618 80%{__python} test/testall.py
f3362331 81%endif
06942a5c
MB
82%endif
83
84%if %{with python3}
1dac93d3 85%py3_build
f3362331
JB
86
87%if %{with tests}
ce76f618 88%{__python3} test/testall.py
f3362331 89%endif
06942a5c 90%endif
d9d42a70
MK
91
92%install
93rm -rf $RPM_BUILD_ROOT
06942a5c
MB
94
95%if %{with python2}
1dac93d3 96%py_install
d9d42a70 97
f3362331
JB
98%{__mv} $RPM_BUILD_ROOT%{_bindir}/{bottle.py,bottle-2}
99
d9d42a70 100%py_postclean
06942a5c
MB
101%endif
102
103%if %{with python3}
1dac93d3 104%py3_install
f3362331
JB
105
106%{__mv} $RPM_BUILD_ROOT%{_bindir}/{bottle.py,bottle-3}
107ln -s bootle-3 $RPM_BUILD_ROOT%{_bindir}/bottle
06942a5c 108%endif
d9d42a70
MK
109
110%clean
111rm -rf $RPM_BUILD_ROOT
112
06942a5c 113%if %{with python2}
d9d42a70
MK
114%files
115%defattr(644,root,root,755)
f3362331
JB
116%doc README.rst
117%attr(755,root,root) %{_bindir}/bottle-2
118%{py_sitescriptdir}/bottle.py[co]
ce76f618 119%{py_sitescriptdir}/bottle-%{version}-py*.egg-info
06942a5c
MB
120%endif
121
122%if %{with python3}
123%files -n python3-%{module}
124%defattr(644,root,root,755)
f3362331
JB
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]
ce76f618 130%{py3_sitescriptdir}/bottle-%{version}-py*.egg-info
06942a5c 131%endif
This page took 0.108545 seconds and 4 git commands to generate.