cubicweb.spec
author Aurelien Campeas <aurelien.campeas@logilab.fr>
Wed, 08 Jan 2014 12:09:44 +0100
changeset 9375 8e88576787c3
parent 9340 b1e933b0e850
child 9389 3d1fb7eedefb
permissions -rw-r--r--
[schema] fix unique together index handling We now provide a more compact indexname, using the schema constraint entity type and the position of the columns set in the entity type unique constraints list. This avoids a nasty name truncation issue. The UniqueTogetherError object is made smarter: it computes the rtypes, abstracting the underlying backend (pg/sqlserver vs sqlite). The `user friendly` adapter is much simplified since there is no longer any truncation issue. Uses a new logilab.database version (ticket #151507) and a new yams version (ticket #189299) Closes #2514939 [jcr: disable hooks when temporarily dropping CWUniqueTogetherConstraint entities]
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
8873
280c32415059 [packaging] add spec file to build RPMs (closes #2800850)
Julien Cristau <julien.cristau@logilab.fr>
parents:
diff changeset
     1
%if 0%{?el5}
280c32415059 [packaging] add spec file to build RPMs (closes #2800850)
Julien Cristau <julien.cristau@logilab.fr>
parents:
diff changeset
     2
%define python python26
280c32415059 [packaging] add spec file to build RPMs (closes #2800850)
Julien Cristau <julien.cristau@logilab.fr>
parents:
diff changeset
     3
%define __python /usr/bin/python2.6
280c32415059 [packaging] add spec file to build RPMs (closes #2800850)
Julien Cristau <julien.cristau@logilab.fr>
parents:
diff changeset
     4
%else
280c32415059 [packaging] add spec file to build RPMs (closes #2800850)
Julien Cristau <julien.cristau@logilab.fr>
parents:
diff changeset
     5
%define python python
280c32415059 [packaging] add spec file to build RPMs (closes #2800850)
Julien Cristau <julien.cristau@logilab.fr>
parents:
diff changeset
     6
%define __python /usr/bin/python
280c32415059 [packaging] add spec file to build RPMs (closes #2800850)
Julien Cristau <julien.cristau@logilab.fr>
parents:
diff changeset
     7
%endif
280c32415059 [packaging] add spec file to build RPMs (closes #2800850)
Julien Cristau <julien.cristau@logilab.fr>
parents:
diff changeset
     8
280c32415059 [packaging] add spec file to build RPMs (closes #2800850)
Julien Cristau <julien.cristau@logilab.fr>
parents:
diff changeset
     9
Name:           cubicweb
9338
7f67db7c848e prepare 3.17.11
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents: 9307
diff changeset
    10
Version:        3.17.11
8873
280c32415059 [packaging] add spec file to build RPMs (closes #2800850)
Julien Cristau <julien.cristau@logilab.fr>
parents:
diff changeset
    11
Release:        logilab.1%{?dist}
280c32415059 [packaging] add spec file to build RPMs (closes #2800850)
Julien Cristau <julien.cristau@logilab.fr>
parents:
diff changeset
    12
Summary:        CubicWeb is a semantic web application framework
280c32415059 [packaging] add spec file to build RPMs (closes #2800850)
Julien Cristau <julien.cristau@logilab.fr>
parents:
diff changeset
    13
Source0:        http://download.logilab.org/pub/cubicweb/cubicweb-%{version}.tar.gz
280c32415059 [packaging] add spec file to build RPMs (closes #2800850)
Julien Cristau <julien.cristau@logilab.fr>
parents:
diff changeset
    14
License:        LGPLv2+
280c32415059 [packaging] add spec file to build RPMs (closes #2800850)
Julien Cristau <julien.cristau@logilab.fr>
parents:
diff changeset
    15
Group:          Development/Languages/Python
280c32415059 [packaging] add spec file to build RPMs (closes #2800850)
Julien Cristau <julien.cristau@logilab.fr>
parents:
diff changeset
    16
Vendor:         Logilab <contact@logilab.fr>
280c32415059 [packaging] add spec file to build RPMs (closes #2800850)
Julien Cristau <julien.cristau@logilab.fr>
parents:
diff changeset
    17
Url:            http://www.cubicweb.org/project/cubicweb
280c32415059 [packaging] add spec file to build RPMs (closes #2800850)
Julien Cristau <julien.cristau@logilab.fr>
parents:
diff changeset
    18
280c32415059 [packaging] add spec file to build RPMs (closes #2800850)
Julien Cristau <julien.cristau@logilab.fr>
parents:
diff changeset
    19
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-buildroot
280c32415059 [packaging] add spec file to build RPMs (closes #2800850)
Julien Cristau <julien.cristau@logilab.fr>
parents:
diff changeset
    20
BuildArch:      noarch
280c32415059 [packaging] add spec file to build RPMs (closes #2800850)
Julien Cristau <julien.cristau@logilab.fr>
parents:
diff changeset
    21
280c32415059 [packaging] add spec file to build RPMs (closes #2800850)
Julien Cristau <julien.cristau@logilab.fr>
parents:
diff changeset
    22
Requires:       %{python}
280c32415059 [packaging] add spec file to build RPMs (closes #2800850)
Julien Cristau <julien.cristau@logilab.fr>
parents:
diff changeset
    23
Requires:       %{python}-logilab-common >= 0.59.0
280c32415059 [packaging] add spec file to build RPMs (closes #2800850)
Julien Cristau <julien.cristau@logilab.fr>
parents:
diff changeset
    24
Requires:       %{python}-logilab-mtconverter >= 0.8.0
280c32415059 [packaging] add spec file to build RPMs (closes #2800850)
Julien Cristau <julien.cristau@logilab.fr>
parents:
diff changeset
    25
Requires:       %{python}-rql >= 0.31.2
9299
c5eed908117d [schema] store default attribute values in a Bytes field, allowing python objects as default values
Aurélien Campeas <aurelien.campeas@logilab.fr>
parents: 9248
diff changeset
    26
Requires:       %{python}-yams >= 0.39.0
9375
8e88576787c3 [schema] fix unique together index handling
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents: 9340
diff changeset
    27
Requires:       %{python}-logilab-database >= 1.11.0
8873
280c32415059 [packaging] add spec file to build RPMs (closes #2800850)
Julien Cristau <julien.cristau@logilab.fr>
parents:
diff changeset
    28
Requires:       %{python}-passlib
280c32415059 [packaging] add spec file to build RPMs (closes #2800850)
Julien Cristau <julien.cristau@logilab.fr>
parents:
diff changeset
    29
Requires:       %{python}-lxml
280c32415059 [packaging] add spec file to build RPMs (closes #2800850)
Julien Cristau <julien.cristau@logilab.fr>
parents:
diff changeset
    30
Requires:       %{python}-twisted-web
280c32415059 [packaging] add spec file to build RPMs (closes #2800850)
Julien Cristau <julien.cristau@logilab.fr>
parents:
diff changeset
    31
# the schema view uses `dot'; at least on el5, png output requires graphviz-gd
280c32415059 [packaging] add spec file to build RPMs (closes #2800850)
Julien Cristau <julien.cristau@logilab.fr>
parents:
diff changeset
    32
Requires:       graphviz-gd
280c32415059 [packaging] add spec file to build RPMs (closes #2800850)
Julien Cristau <julien.cristau@logilab.fr>
parents:
diff changeset
    33
Requires:       gettext
280c32415059 [packaging] add spec file to build RPMs (closes #2800850)
Julien Cristau <julien.cristau@logilab.fr>
parents:
diff changeset
    34
280c32415059 [packaging] add spec file to build RPMs (closes #2800850)
Julien Cristau <julien.cristau@logilab.fr>
parents:
diff changeset
    35
BuildRequires:  %{python}
280c32415059 [packaging] add spec file to build RPMs (closes #2800850)
Julien Cristau <julien.cristau@logilab.fr>
parents:
diff changeset
    36
280c32415059 [packaging] add spec file to build RPMs (closes #2800850)
Julien Cristau <julien.cristau@logilab.fr>
parents:
diff changeset
    37
%description
280c32415059 [packaging] add spec file to build RPMs (closes #2800850)
Julien Cristau <julien.cristau@logilab.fr>
parents:
diff changeset
    38
a repository of entities / relations for knowledge management
280c32415059 [packaging] add spec file to build RPMs (closes #2800850)
Julien Cristau <julien.cristau@logilab.fr>
parents:
diff changeset
    39
280c32415059 [packaging] add spec file to build RPMs (closes #2800850)
Julien Cristau <julien.cristau@logilab.fr>
parents:
diff changeset
    40
%prep
280c32415059 [packaging] add spec file to build RPMs (closes #2800850)
Julien Cristau <julien.cristau@logilab.fr>
parents:
diff changeset
    41
%setup -q
280c32415059 [packaging] add spec file to build RPMs (closes #2800850)
Julien Cristau <julien.cristau@logilab.fr>
parents:
diff changeset
    42
%if 0%{?el5}
280c32415059 [packaging] add spec file to build RPMs (closes #2800850)
Julien Cristau <julien.cristau@logilab.fr>
parents:
diff changeset
    43
# change the python version in shebangs
280c32415059 [packaging] add spec file to build RPMs (closes #2800850)
Julien Cristau <julien.cristau@logilab.fr>
parents:
diff changeset
    44
find . -name '*.py' -type f -print0 |  xargs -0 sed -i '1,3s;^#!.*python.*$;#! /usr/bin/python2.6;'
280c32415059 [packaging] add spec file to build RPMs (closes #2800850)
Julien Cristau <julien.cristau@logilab.fr>
parents:
diff changeset
    45
%endif
280c32415059 [packaging] add spec file to build RPMs (closes #2800850)
Julien Cristau <julien.cristau@logilab.fr>
parents:
diff changeset
    46
280c32415059 [packaging] add spec file to build RPMs (closes #2800850)
Julien Cristau <julien.cristau@logilab.fr>
parents:
diff changeset
    47
%install
280c32415059 [packaging] add spec file to build RPMs (closes #2800850)
Julien Cristau <julien.cristau@logilab.fr>
parents:
diff changeset
    48
NO_SETUPTOOLS=1 %{__python} setup.py --quiet install --no-compile --prefix=%{_prefix} --root="$RPM_BUILD_ROOT"
9185
499f9ddc4470 [pkg] Add log directory to rpm
Rémi Cardona <remi.cardona@logilab.fr>
parents: 9000
diff changeset
    49
mkdir -p $RPM_BUILD_ROOT/var/log/cubicweb
8873
280c32415059 [packaging] add spec file to build RPMs (closes #2800850)
Julien Cristau <julien.cristau@logilab.fr>
parents:
diff changeset
    50
280c32415059 [packaging] add spec file to build RPMs (closes #2800850)
Julien Cristau <julien.cristau@logilab.fr>
parents:
diff changeset
    51
%clean
280c32415059 [packaging] add spec file to build RPMs (closes #2800850)
Julien Cristau <julien.cristau@logilab.fr>
parents:
diff changeset
    52
rm -rf $RPM_BUILD_ROOT
280c32415059 [packaging] add spec file to build RPMs (closes #2800850)
Julien Cristau <julien.cristau@logilab.fr>
parents:
diff changeset
    53
280c32415059 [packaging] add spec file to build RPMs (closes #2800850)
Julien Cristau <julien.cristau@logilab.fr>
parents:
diff changeset
    54
%files 
280c32415059 [packaging] add spec file to build RPMs (closes #2800850)
Julien Cristau <julien.cristau@logilab.fr>
parents:
diff changeset
    55
%defattr(-, root, root)
9185
499f9ddc4470 [pkg] Add log directory to rpm
Rémi Cardona <remi.cardona@logilab.fr>
parents: 9000
diff changeset
    56
%dir /var/log/cubicweb
8873
280c32415059 [packaging] add spec file to build RPMs (closes #2800850)
Julien Cristau <julien.cristau@logilab.fr>
parents:
diff changeset
    57
/*
280c32415059 [packaging] add spec file to build RPMs (closes #2800850)
Julien Cristau <julien.cristau@logilab.fr>
parents:
diff changeset
    58