]>
Commit | Line | Data |
---|---|---|
5b5acce9 | 1 | # |
2 | # Conditional build: | |
3 | %bcond_without tests # do not perform "make test" | |
4 | ||
5 | %define module Flask | |
6 | Summary: A microframework based on Werkzeug, Jinja2 and good intentions | |
5b5acce9 | 7 | Name: python-%{module} |
8 | Version: 0.8 | |
9 | Release: 0.1 | |
10 | License: BSD | |
11 | Group: Development/Languages/Python | |
12 | Source0: http://pypi.python.org/packages/source/F/Flask/%{module}-%{version}.tar.gz | |
13 | # Source0-md5: a5169306cfe49b3b369086f2a63816ab | |
14 | URL: http://flask.pocoo.org/ | |
15 | BuildRequires: python-Jinja2 >= 2.4 | |
16 | BuildRequires: python-Werkzeug >= 0.6.1 | |
17 | BuildRequires: python-distribute | |
18 | BuildRequires: rpm-pythonprov | |
5b5acce9 | 19 | BuildRequires: rpmbuild(macros) >= 1.219 |
20 | Requires: python-Jinja2 >= 2.4 | |
21 | Requires: python-Werkzeug >= 0.6.1 | |
5666ac48 | 22 | Requires: python-modules |
5b5acce9 | 23 | BuildArch: noarch |
24 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
25 | ||
26 | %description | |
27 | Flask is a microframework for Python based on Werkzeug, Jinja 2 and | |
28 | good intentions. | |
29 | ||
5b5acce9 | 30 | %prep |
31 | %setup -q -n %{module}-%{version} | |
32 | ||
33 | %build | |
34 | %{__python} setup.py build | |
35 | ||
36 | %{?with_tests:%{__python} setup.py test} | |
37 | ||
38 | %install | |
39 | rm -rf $RPM_BUILD_ROOT | |
40 | %{__python} setup.py install \ | |
41 | --skip-build \ | |
42 | --optimize=2 \ | |
43 | --root=$RPM_BUILD_ROOT | |
44 | ||
45 | install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} | |
46 | cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} | |
47 | ||
48 | %py_ocomp $RPM_BUILD_ROOT%{py_sitescriptdir} | |
49 | %py_comp $RPM_BUILD_ROOT%{py_sitescriptdir} | |
50 | %py_postclean | |
51 | ||
52 | %clean | |
53 | rm -rf $RPM_BUILD_ROOT | |
54 | ||
55 | %files | |
56 | %defattr(644,root,root,755) | |
57 | %doc AUTHORS CHANGES README | |
58 | %{py_sitescriptdir}/flask | |
59 | %if "%{py_ver}" > "2.4" | |
60 | %{py_sitescriptdir}/%{module}-*.egg-info | |
61 | %endif | |
62 | %{_examplesdir}/%{name}-%{version} |