|
1 # for el5, force use of python2.6 |
|
2 %if 0%{?el5} |
|
3 %define python python26 |
|
4 %define __python /usr/bin/python2.6 |
|
5 %else |
|
6 %define python python |
|
7 %define __python /usr/bin/python |
|
8 %endif |
|
9 |
|
10 Name: cubicweb-pyramid |
|
11 Version: 0.3.2 |
|
12 Release: 1%{?dist} |
|
13 Summary: Add the 'pyramid' command to cubicweb-ctl |
|
14 |
|
15 Group: Development/Languages |
|
16 License: LGPL |
|
17 URL: https://www.cubicweb.org/project/cubicweb-pyramid |
|
18 Source0: http://pypi.python.org/packages/source/c/cubicweb-pyramid/cubicweb-pyramid-%{version}.tar.gz |
|
19 BuildArch: noarch |
|
20 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot |
|
21 |
|
22 Requires: cubicweb >= 3.20.0 |
|
23 Requires: python-waitress >= 0.8.9 |
|
24 Requires: pyramid-cubicweb |
|
25 Requires: python-wsgicors |
|
26 BuildRequires: python-setuptools |
|
27 |
|
28 %description |
|
29 Add the 'pyramid' command to cubicweb-ctl |
|
30 CubicWeb is a semantic web application framework. |
|
31 |
|
32 Add the 'pyramid' command to cubicweb-ctl |
|
33 |
|
34 This package will install all the components you need to run the |
|
35 cubicweb-pyramid application (cube :).. |
|
36 |
|
37 %prep |
|
38 %setup -q -n cubicweb-pyramid-%{version} |
|
39 %if 0%{?el5} |
|
40 # change the python version in shebangs |
|
41 find . -name '*.py' -type f -print0 | xargs -0 sed -i '1,3s;^#!.*python.*$;#! /usr/bin/python2.6;' |
|
42 %endif |
|
43 |
|
44 %install |
|
45 NO_SETUPTOOLS=1 %{__python} setup.py --quiet install --no-compile --prefix=%{_prefix} --root="$RPM_BUILD_ROOT" |
|
46 # remove generated .egg-info file |
|
47 rm -rf $RPM_BUILD_ROOT/usr/lib/python* |
|
48 |
|
49 |
|
50 %clean |
|
51 rm -rf $RPM_BUILD_ROOT |
|
52 |
|
53 %files |
|
54 %defattr(-, root, root) |
|
55 %{_prefix}/share/cubicweb* |