You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/app-text/bibus/files/bibus-1.5.0-pysqlite.patch

20 lines
907 B

diff -Naur bibus-1.5.0/dbBibSQLite.py bibus-1.5.0.new/dbBibSQLite.py
--- bibus-1.5.0/dbBibSQLite.py 2009-10-08 16:53:13.000000000 -0400
+++ bibus-1.5.0.new/dbBibSQLite.py 2009-11-12 17:53:00.000000000 -0500
@@ -19,7 +19,14 @@
# Part of the Wizard code has been copied from the example "Simple Wizard" included with
# wxPython
-from sqlite3 import Error,IntegrityError,connect,version_info,paramstyle # python >= 2.5
+# we try to load python-sqlite2 if it exists
+try:
+ from sqlite3 import Error,IntegrityError,connect,version_info,paramstyle # python >= 2.5
+except ImportError:
+ try:
+ from pysqlite2.dbapi2 import Error,IntegrityError,connect,version_info,paramstyle # try pysqlite2
+ except ImportError:
+ from sqlite import Error,IntegrityError,connect,version_info,paramstyle # try pysqlite < 2
#
import getpass, os
import dbBibBase