[packaging] add spec file for centos python-nerdy-centos-version-0.1.0-1 python-nerdy-debian-version-0.1.0-1 python-nerdy-version-0.1.0
authorFlorent Cayre <florent.cayre@logilab.fr>
Mon, 01 Jul 2013 01:40:02 +0200
changeset 340 909e2284d79f
parent 339 d4f9bcffd1f2
child 341 f65ced304b63
[packaging] add spec file for centos
python-nerdy.spec
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/python-nerdy.spec	Mon Jul 01 01:40:02 2013 +0200
@@ -0,0 +1,48 @@
+%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}-nerdy
+Version:        0.1.0
+Release:        logilab.1%{?dist}
+Summary:        Python library for data alignment
+Group:          Development/Languages/Python
+License:        LGPL
+Source0:        nerdy-%{version}.tar.gz
+
+BuildArch:      noarch
+BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-buildroot
+
+BuildRequires:  %{python}
+Requires:       %{python}, %{python}-lxml
+
+
+%description
+entity / relation schema
+
+%prep
+%setup -q -n nerdy-%{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
+rm -rf $RPM_BUILD_ROOT
+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)
+/*
+