hamster-applet r608 - in branches/gnome-2-24: . hamster
- From: tbaugis svn gnome org
- To: svn-commits-list gnome org
- Subject: hamster-applet r608 - in branches/gnome-2-24: . hamster
- Date: Sat, 25 Oct 2008 11:06:28 +0000 (UTC)
Author: tbaugis
Date: Sat Oct 25 11:06:28 2008
New Revision: 608
URL: http://svn.gnome.org/viewvc/hamster-applet?rev=608&view=rev
Log:
fix from trunk - do not require pysqlite for python 2.5 and
remove requirement on gvfs
Modified:
branches/gnome-2-24/configure.ac
branches/gnome-2-24/hamster/about.py
branches/gnome-2-24/hamster/db.py
Modified: branches/gnome-2-24/configure.ac
==============================================================================
--- branches/gnome-2-24/configure.ac (original)
+++ branches/gnome-2-24/configure.ac Sat Oct 25 11:06:28 2008
@@ -100,20 +100,38 @@
AC_MSG_RESULT($PYGTK_DEFSDIR)
-AC_MSG_CHECKING([for pysqlite2 module])
-if AC_RUN_LOG([DISPLAY= $PYTHON -c '
+if test "x$PYTHON_VERSION" = "x2.5"; then
+ AC_MSG_CHECKING([for python sqlite module])
+ if AC_RUN_LOG([DISPLAY= $PYTHON -c '
+try:
+ import sqlite3
+except ImportError, e:
+ if str(e).find("sqlite3") >= 0:
+ raise
+except:
+ pass
+ ']); then
+ AC_MSG_RESULT([yes])
+ else
+ AC_MSG_RESULT([no])
+ AC_MSG_ERROR([Python 2.5: inbuilt sqlite is required to build hamster])
+ fi
+else
+ AC_MSG_CHECKING([for pysqlite2 module])
+ if AC_RUN_LOG([DISPLAY= $PYTHON -c '
try:
import pysqlite2
except ImportError, e:
if str(e).find("pysqlite2") >= 0:
- raise
+ raise
except:
pass
-']); then
- AC_MSG_RESULT([yes])
-else
- AC_MSG_RESULT([no])
- AC_MSG_ERROR([pysqlite2 Python module required to build hamster])
+ ']); then
+ AC_MSG_RESULT([yes])
+ else
+ AC_MSG_RESULT([no])
+ AC_MSG_ERROR([Python 2.4: pysqlite2 module required to build hamster])
+ fi
fi
Modified: branches/gnome-2-24/hamster/about.py
==============================================================================
--- branches/gnome-2-24/hamster/about.py (original)
+++ branches/gnome-2-24/hamster/about.py Sat Oct 25 11:06:28 2008
@@ -21,15 +21,15 @@
from os.path import join
from hamster import SHARED_DATA_DIR
from hamster.defs import VERSION
-import gtk, gnomevfs
+import gtk
import hamster
def on_email(about, mail):
- gnomevfs.url_show("mailto:%s" % mail)
+ gtk.show_uri(gtk.gdk.Screen(), "mailto:%s" % mail, 0L)
def on_url(about, link):
- gnomevfs.url_show(link)
+ gtk.show_uri(gtk.gdk.Screen(), link, 0L)
gtk.about_dialog_set_email_hook(on_email)
gtk.about_dialog_set_url_hook(on_url)
Modified: branches/gnome-2-24/hamster/db.py
==============================================================================
--- branches/gnome-2-24/hamster/db.py (original)
+++ branches/gnome-2-24/hamster/db.py Sat Oct 25 11:06:28 2008
@@ -21,7 +21,14 @@
"""separate file for database operations"""
-from pysqlite2 import dbapi2 as sqlite
+try:
+ import sqlite3 as sqlite
+except ImportError:
+ try:
+ from pysqlite2 import dbapi2 as sqlite
+ except ImportError:
+ print "Error: Neither sqlite3 nor pysqlite2 found"
+ raise
import os, time
import datetime
import hamster
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]