Fix the unity-lens for the new python module setup

This commit is contained in:
Jean-Francois Dockes 2012-12-23 08:24:09 +01:00
parent 9eb77d032c
commit 0ad84b575f
2 changed files with 13 additions and 3 deletions

View File

@ -9,7 +9,13 @@ import locale
from gi.repository import Unity, GObject, Gio
import recoll
try:
from recoll import recoll
from recoll import rclextract
hasextract = True
except:
import recoll
hasextract = False
BUS_PATH = "/org/recoll/unitylensrecoll/scope/main"
@ -68,7 +74,8 @@ class Scope (Unity.Scope):
try:
self.db = recoll.connect()
self.db.setAbstractParams(maxchars=200, contextwords=4)
except:
except Exception, s:
print >> sys.stderr, "recoll-lens: Error connecting to db:", s
return
def get_search_string (self):

View File

@ -41,6 +41,9 @@ if test -n "$DESTDIR" ; then
mandir=$DESTDIR/$mandir
ROOTFORPYTHON="--root=${DESTDIR}"
fi
if test -f /etc/debian_version ; then
OPTSFORPYTHON=--install-layout=deb
fi
echo "Installing to $PREFIX"
@ -140,4 +143,4 @@ ${INSTALL} -m 0444 ${I18N}/recoll_zh_CN.qm \
@NOPYTHON@(cd python/recoll;python setup.py install \
@NOPYTHON@ --prefix=${REALPREFIX} ${ROOTFORPYTHON})
@NOPYTHON@ --prefix=${REALPREFIX} ${ROOTFORPYTHON} ${OPTSFORPYTHON})