default is stable stable
authorFlorent Cayre <florent.cayre@logilab.fr>
Mon, 08 Apr 2013 23:09:16 +0200
branchstable
changeset 705 91188a83186e
parent 703 b25b944d7336 (current diff)
parent 704 47cce2221f93 (diff)
child 706 496945a4ed23
default is stable
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/python-rql.spec	Mon Apr 08 23:09:16 2013 +0200
@@ -0,0 +1,49 @@
+%if 0%{?el5}
+%define python python26
+%define __python /usr/bin/python2.6
+%{!?python_scriptarch: %define python_scriptarch %(%{__python} -c "from distutils.sysconfig import get_python_lib; from os.path import join; print join(get_python_lib(1, 1), 'scripts')")}
+%else
+%define python python
+%define __python /usr/bin/python
+%endif
+
+Name:           %{python}-rql
+Version:        0.31.2
+Release:        logilab.1%{?dist}
+Summary:        relationship query language (RQL) utilities
+
+Group:          Development/Languages/Python
+License:        LGPLv2+
+URL:            http://www.logilab.org/project/rql
+Source0:        http://download.logilab.org/pub/rql/rql-%{version}.tar.gz
+BuildArch:      noarch
+BuildRoot:      %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
+
+BuildRequires:  %{python}-devel
+BuildRequires:  gecode-devel
+Requires:       %{python}, %{python}-logilab-common >= 0.47.0, %{python}-logilab-database >= 1.6.0, %{python}-yapps2 >= 2.1.1, %{python}-logilab-constraint >= 0.5.0
+
+
+%description
+relationship query language (RQL) utilities
+
+%prep
+%setup -q -n rql-%{version}
+
+%build
+%{__python} setup.py build
+%if 0%{?el5}
+# change the python version in shebangs
+find . -name '*.py' -type f -print0 |  xargs -0 sed -i '1,3s;^#!.*python.*$;#! /usr/bin/python2.6;'
+%endif
+
+%install
+NO_SETUPTOOLS=1 %{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT %{?python_scriptarch: --install-scripts=%{python_scriptarch}}
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files 
+%defattr(-, root, root)
+/*
+