1.7 is now stable stable
authorDavid Douard <david.douard@logilab.fr>
Mon, 12 May 2014 11:09:43 +0200
branchstable
changeset 151 4cccff0c097a
parent 123 bf94b01b0ae3 (current diff)
parent 132 a5c5d224031c (diff)
child 152 69e5736fdc1e
1.7 is now stable
debian/cubicweb-keyword.dirs
debian/cubicweb-keyword.prerm
--- a/.hgtags	Tue Feb 28 09:33:42 2012 +0100
+++ b/.hgtags	Mon May 12 11:09:43 2014 +0200
@@ -12,3 +12,6 @@
 36d3106df60c89d8d79fde1b56a73806a19567f9 1.6.1
 0f5d9e769d63919cd7b814d28d211fc90772bc53 cubicweb-keyword-version-1.6.2
 a070a505873ea573ba3b11c879a78d7eeb5b37b0 cubicweb-keyword-debian-version-1.6.2
+baf594692e6222789845f973c56a910c62a47e04 cubicweb-keyword-centos-version-1.7.0-1
+baf594692e6222789845f973c56a910c62a47e04 cubicweb-keyword-version-1.7.0
+baf594692e6222789845f973c56a910c62a47e04 cubicweb-keyword-debian-version-1.7.0-1
--- a/__pkginfo__.py	Tue Feb 28 09:33:42 2012 +0100
+++ b/__pkginfo__.py	Mon May 12 11:09:43 2014 +0200
@@ -4,7 +4,7 @@
 modname = 'keyword'
 distname = "cubicweb-keyword"
 
-numversion = (1, 6, 2)
+numversion = (1, 7, 0)
 version = '.'.join(str(num) for num in numversion)
 
 license = 'LGPL'
@@ -53,7 +53,7 @@
     ]
 
 __depends_cubes__ = {}
-__depends__ = {'cubicweb': '>= 3.6.0'}
+__depends__ = {'cubicweb': '>= 3.15.0'}
 __use__ = tuple(__depends_cubes__)
 
 from os import listdir as _listdir
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cubicweb-keyword.spec	Mon May 12 11:09:43 2014 +0200
@@ -0,0 +1,48 @@
+# 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-keyword
+Version:        1.7.0
+Release:        logilab.1%{?dist}
+Summary:        keyword component for the CubicWeb framework
+Group:          Applications/Internet
+License:        LGPL
+Source0:        cubicweb-keyword-%{version}.tar.gz
+
+BuildArch:      noarch
+BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-buildroot
+
+BuildRequires:  %{python} %{python}-setuptools
+Requires:       cubicweb >= 3.15.0
+
+%description
+keyword component for the CubicWeb framework
+This Cubicweb component provides classification (hierarchies of keywords)
+to classify content. See also cubicweb-tag.
+
+%prep
+%setup -q -n cubicweb-keyword-%{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
+NO_SETUPTOOLS=1 %{__python} setup.py --quiet install --no-compile --prefix=%{_prefix} --root="$RPM_BUILD_ROOT"
+# remove generated .egg-info file
+rm -rf $RPM_BUILD_ROOT/usr/lib/python*
+
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(-, root, root)
+/*
--- a/debian/changelog	Tue Feb 28 09:33:42 2012 +0100
+++ b/debian/changelog	Mon May 12 11:09:43 2014 +0200
@@ -1,3 +1,9 @@
+cubicweb-keyword (1.7.0-1) unstable; urgency=low
+
+  * new upstream release
+
+ -- Adrien Di Mascio <Adrien.DiMascio@logilab.fr>  Wed, 05 Mar 2014 18:03:33 +0100
+
 cubicweb-keyword (1.6.2-1) unstable; urgency=low
 
   * new upstream release
--- a/debian/compat	Tue Feb 28 09:33:42 2012 +0100
+++ b/debian/compat	Mon May 12 11:09:43 2014 +0200
@@ -1,1 +1,1 @@
-5
+7
--- a/debian/control	Tue Feb 28 09:33:42 2012 +0100
+++ b/debian/control	Mon May 12 11:09:43 2014 +0200
@@ -3,15 +3,19 @@
 Priority: optional
 Maintainer: Logilab Packaging Team <contact@logilab.fr>
 Uploaders: Sylvain Thenault <sylvain.thenault@logilab.fr>
-Build-Depends: debhelper (>= 5.0.37.1), python (>=2.4), python-dev (>=2.4)
-Standards-Version: 3.8.0
+Build-Depends: debhelper (>= 7), python (>= 2.6), python-support
+Standards-Version: 3.9.3
 Homepage: http://www.cubicweb.org/project/cubicweb-keyword
+XS-Python-Version: >= 2.6
 
 Package: cubicweb-keyword
 Conflicts: cubicweb-keywords
 Replaces: cubicweb-keywords
 Architecture: all
-Depends: cubicweb-common (>= 3.6.0)
+Depends:
+ cubicweb-common (>= 3.15.0),
+ ${python:Depends},
+ ${misc:Depends},
 Description: keyword component for the Cubicweb framework
  This Cubicweb component provides classification (hierarchies of keywords)
  to classify content. See also cubicweb-tag.
--- a/debian/cubicweb-keyword.dirs	Tue Feb 28 09:33:42 2012 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-usr/share/cubicweb/cubes/keyword
--- a/debian/cubicweb-keyword.prerm	Tue Feb 28 09:33:42 2012 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,27 +0,0 @@
-#!/bin/sh -e
-
-delete_pyo_pyc () {
-  find /usr/share/cubicweb/cubes/keyword -name "*.pyc" | xargs rm -f
-  find /usr/share/cubicweb/cubes/keyword -name "*.pyo" | xargs rm -f
-}
-
-
-case "$1" in
-    failed-upgrade|abort-install|abort-upgrade|disappear)
-    ;;
-    upgrade)
-    delete_pyo_pyc
-    ;;
-    remove)
-    delete_pyo_pyc
-    ;;
-    purge)
-    ;;
-
-    *)
-        echo "postrm called with unknown argument \`$1'" >&2
-        exit 1
-
-esac
-
-#DEBHELPER#
--- a/debian/rules	Tue Feb 28 09:33:42 2012 +0100
+++ b/debian/rules	Mon May 12 11:09:43 2014 +0200
@@ -4,19 +4,21 @@
 
 # Uncomment this to turn on verbose mode.
 #export DH_VERBOSE=1
-build: build-stamp
-build-stamp: 
+build: build-arch build-indep
+build-arch:
+	# Nothing to do
+
+build-indep: build-stamp
+build-stamp:
 	dh_testdir
 	python setup.py -q build
-	touch build-stamp
+	>$@
 
-clean: 
+clean:
 	dh_testdir
-	dh_testroot
-	rm -f build-stamp configure-stamp
+	rm -f build-stamp
 	rm -rf build
-	find . -name "*.pyc" | xargs rm -f
-	rm -f changelog.gz
+	find . -name "*.pyc" -delete
 	dh_clean
 
 install: build
@@ -25,31 +27,30 @@
 	dh_clean -k
 	dh_installdirs -i
 	python setup.py -q install --no-compile --prefix=debian/cubicweb-keyword/usr/
-
+	# remove generated .egg-info file
+	rm -rf debian/cubicweb-keyword/usr/lib/python*
 
 # Build architecture-independent files here.
 binary-indep: build install
 	dh_testdir
 	dh_testroot
 	dh_install -i
-#	dh_pycentral -i 
-#	dh_python -i
-#	gzip -9 -c ChangeLog > changelog.gz
 	dh_installchangelogs -i
 	dh_installexamples -i
 	dh_installdocs -i
 	dh_installman -i
+	dh_pysupport -i /usr/share/cubicweb
 	dh_link -i
 	dh_compress -i -X.py -X.ini -X.xml -Xtest
 	dh_fixperms -i
 	dh_installdeb -i
-	dh_gencontrol -i 
+	dh_gencontrol -i
 	dh_md5sums -i
 	dh_builddeb -i
 
 
 # Build architecture-dependent files here.
-binary-arch: 
+binary-arch:
 
-binary: binary-indep 
+binary: binary-indep
 .PHONY: build clean binary-arch binary-indep binary
--- a/entities.py	Tue Feb 28 09:33:42 2012 +0100
+++ b/entities.py	Mon May 12 11:09:43 2014 +0200
@@ -12,11 +12,11 @@
 from cubicweb.entities import AnyEntity, fetch_config, adapters
 from cubicweb.interfaces import ITree
 from cubicweb.view import EntityAdapter
-from cubicweb.selectors import is_instance
+from cubicweb.predicates import is_instance
 
 class Classification(AnyEntity):
     __regid__ = 'Classification'
-    fetch_attrs, fetch_order = fetch_config(['name'])
+    fetch_attrs, cw_fetch_order = fetch_config(['name'])
 
 
 class ClassificationITreeAdapter(EntityAdapter):
@@ -60,7 +60,7 @@
 
 class Keyword(AnyEntity):
     __regid__ = 'Keyword'
-    fetch_attrs, fetch_order = fetch_config(['name'])
+    fetch_attrs, cw_fetch_order = fetch_config(['name'])
 
 
 class KeywordITreeAdapter(adapters.ITreeAdapter):
@@ -121,7 +121,7 @@
 class CodeKeyword(Keyword):
     __regid__ = 'CodeKeyword'
     rest_attr = 'code'
-    fetch_attrs, fetch_order = fetch_config(['code','name'])
+    fetch_attrs, cw_fetch_order = fetch_config(['code','name'])
 
     def dc_title(self):
         return u'%s - %s' % (self.code, self.name)
--- a/sobjects.py	Tue Feb 28 09:33:42 2012 +0100
+++ b/sobjects.py	Mon May 12 11:09:43 2014 +0200
@@ -8,7 +8,7 @@
 
 from logilab.common.decorators import cached
 
-from cubicweb.selectors import is_instance
+from cubicweb.predicates import is_instance
 from cubicweb.sobjects.notification import NotificationView
 
 
--- a/views.py	Tue Feb 28 09:33:42 2012 +0100
+++ b/views.py	Mon May 12 11:09:43 2014 +0200
@@ -10,10 +10,11 @@
 from logilab.mtconverter import xml_escape
 
 from cubicweb import Unauthorized
-from cubicweb.selectors import is_instance, rql_condition, relation_possible
+from cubicweb.predicates import is_instance, rql_condition, relation_possible
 from cubicweb.view import EntityView
 from cubicweb.web import stdmsgs, uicfg, component, facet
 from cubicweb.web.views import primary, basecontrollers, treeview
+from cubicweb.web.views.ajaxcontroller import ajaxfunc
 
 
 _pvs = uicfg.primaryview_section
@@ -242,16 +243,14 @@
 
 # add some classification schema related methods to the Jsoncontroller ########
 
-@monkeypatch(basecontrollers.JSonController)
-@basecontrollers.jsonize
+@ajaxfunc(output_type='json')
 def js_possible_keywords(self, eid):
     rql = ('DISTINCT Any N WHERE K is Keyword, K name N, NOT K applied_to X, '
            'X eid %(x)s, K included_in C, C classifies ET, X is ET')
     rset = self.cursor.execute(rql, {'x' : eid, 'u' : self._cw.user.eid}, 'x')
     return [name for (name,) in rset]
 
-@monkeypatch(basecontrollers.JSonController)
-@basecontrollers.jsonize
+@ajaxfunc(output_type='json')
 def js_add_keywords(self, eid, kwlist):
     msg = self._cw._('keywords applied')
     kwrset = self.cursor.execute('Any K,N,C WHERE K is Keyword, K name N, K included_in C, '