]> git.pld-linux.org Git - packages/python-bottle.git/blob - python-bottle.spec
d9cd2d752a81cc2f53810ba54ebfe111450ac375
[packages/python-bottle.git] / python-bottle.spec
1 #
2 # Conditional build:
3 %bcond_without  python2         # build python 2 module
4 %bcond_without  python3         # build python 3 module
5 #
6 %define         module  bottle
7 #
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}
11 Version:        0.12.5
12 Release:        2
13 License:        MIT
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
18 %if %{with python2}
19 BuildRequires:  python-modules >= 1:2.5
20 %endif
21 %if %{with python3}
22 BuildRequires:  python3-2to3
23 BuildRequires:  python3-devel
24 BuildRequires:  python3-modules
25 %endif
26 BuildRequires:  rpm-pythonprov
27 # if py_postclean is used
28 BuildRequires:  rpmbuild(macros) >= 1.219
29 Requires:       python-modules >= 1:2.5
30 BuildArch:      noarch
31 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
32
33 %description
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
39 Library.
40
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.
47
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
53
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
60 Library.
61
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.
68
69 %prep
70 %setup -q -n %{module}-%{version}
71
72 %build
73 %if %{with python2}
74 %{__python} setup.py build -b build-2
75 %endif
76
77 %if %{with python3}
78 %{__python3} setup.py build -b build-3
79 %endif
80
81 %install
82 rm -rf $RPM_BUILD_ROOT
83
84 %if %{with python2}
85 %{__python} setup.py \
86         build -b build-2 \
87         install \
88         --optimize=2 \
89         --root=$RPM_BUILD_ROOT
90
91 %py_ocomp $RPM_BUILD_ROOT%%{py_sitescriptdir}
92 %py_comp $RPM_BUILD_ROOT%%{py_sitescriptdir}
93 %py_postclean
94 %endif
95
96 %if %{with python3}
97 %{__python3} setup.py \
98         build -b build-3 \
99         install \
100         --optimize=2 \
101         --root=$RPM_BUILD_ROOT
102 %endif
103
104 %clean
105 rm -rf $RPM_BUILD_ROOT
106
107 %if %{with python2}
108 %files
109 %defattr(644,root,root,755)
110 %{py_sitescriptdir}/*.py[co]
111 %if "%{py_ver}" > "2.4"
112 %{py_sitescriptdir}/%{module}-*.egg-info
113 %endif
114 %endif
115
116 %if %{with python3}
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
122 %endif
This page took 0.115281 seconds and 2 git commands to generate.