equal
deleted
inserted
replaced
|
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 %%{!?_python_sitelib: %%define _python_sitelib %%(%%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} |
|
10 |
|
11 Name: %(distname)s |
|
12 Version: 0.1.0 |
|
13 Release: logilab.1%%{?dist} |
|
14 Summary: %(shortdesc)s |
|
15 Group: Applications/Internet |
|
16 License: %(license)s |
|
17 Source0: %(distname)s-%%{version}.tar.gz |
|
18 |
|
19 BuildArch: noarch |
|
20 BuildRoot: %%{_tmppath}/%%{name}-%%{version}-%%{release}-buildroot |
|
21 |
|
22 BuildRequires: %%{python} %%{python}-setuptools |
|
23 Requires: cubicweb >= %(version)s |
|
24 |
|
25 %%description |
|
26 %(longdesc)s |
|
27 |
|
28 %%prep |
|
29 %%setup -q -n %(distname)s-%%{version} |
|
30 %%if 0%%{?el5} |
|
31 # change the python version in shebangs |
|
32 find . -name '*.py' -type f -print0 | xargs -0 sed -i '1,3s;^#!.*python.*$;#! /usr/bin/python2.6;' |
|
33 %%endif |
|
34 |
|
35 %%install |
|
36 NO_SETUPTOOLS=1 %%{__python} setup.py --quiet install --no-compile --prefix=%%{_prefix} --root="$RPM_BUILD_ROOT" |
|
37 # remove generated .egg-info file |
|
38 rm -rf $RPM_BUILD_ROOT/usr/lib/python* |
|
39 |
|
40 |
|
41 %%clean |
|
42 rm -rf $RPM_BUILD_ROOT |
|
43 |
|
44 %%files |
|
45 %%defattr(-, root, root) |
|
46 /* |