cubicweb-seda.spec
author Sylvain Thénault <sylvain.thenault@logilab.fr>
Tue, 12 Dec 2017 17:57:57 +0100
changeset 2915 451328134bee
parent 2874 301ca325d47e
child 2929 352167325f8f
permissions -rw-r--r--
[entities] Add a safety belt avoid unexpected error in some corner case e.g. while debugging an instance I attempted to display result of 'Any X, C WHERE X container C' with unexpectedly to container for the entity, but I wasn't able to display it because rset.one() raised an error since len(rset) was 2. Even if the caller may be wrong, it seems ok to not call rset.one() if function is called in an erroneous context and simply return None in such case.

# for el5, force use of python2.6
%if 0%{?el5}
%define python python26
%define __python /usr/bin/python2.6
%else
%define python python
%define __python /usr/bin/python
%endif
%{!?_python_sitelib: %define _python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}

Name:           cubicweb-seda
Version:        0.12.0
Release:        logilab.1%{?dist}
Summary:        Data Exchange Standard for Archival
Group:          Applications/Internet
License:        LGPL
Source0:        cubicweb-seda-%{version}.tar.gz

BuildArch:      noarch
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-buildroot

BuildRequires:  %{python} %{python}-setuptools
Requires:       cubicweb >= 3.25.3
Requires:       cubicweb-eac
Requires:       cubicweb-skos >= 0.12.1
Requires:       cubicweb-compound >= 0.6
Requires:       cubicweb-relationwidget >= 0.4l
Requires:       cubicweb-squareui
Requires:       %{python}-rdflib >= 4.1
Requires:       %{python}-pyxst >= 0.2
Requires:       %{python}-six >= 1.4.0

%description
Data Exchange Standard for Archival

%prep
%setup -q -n cubicweb-seda-%{version}
%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
%{__python} setup.py install --no-compile --skip-build --root $RPM_BUILD_ROOT

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-, root, root)
%{_python_sitelib}/*