From 1c8e6d5c9c8ef52ecaf8a96491714f13ff51ca98 Mon Sep 17 00:00:00 2001 From: Sylvain Th?nault Date: Sat, 27 Feb 2010 14:32:13 +0100 Subject: fix bad comparison of distutils version: comparing a list of string with a tuple of int... --- db.py | 1 + setup.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/db.py b/db.py index 3dca8f7..6115aad 100644 --- a/db.py +++ b/db.py @@ -513,6 +513,7 @@ class _PySqlite2Adapter(DBAPIAdapter): return self._cnx.cursor(PySqlite2Cursor) def __getattr__(self, attrname): return getattr(self._cnx, attrname) + cnx = sqlite.connect(database, detect_types=sqlite.PARSE_DECLTYPES) return self._wrap_if_needed(PySqlite2CnxWrapper(cnx), user) diff --git a/setup.py b/setup.py index 7cee364..29633df 100644 --- a/setup.py +++ b/setup.py @@ -177,7 +177,7 @@ def install(**kwargs): try: if not USE_SETUPTOOLS: from distutils import __version__ as distutils_version - if distutils_version.split('.') <= (2, 5, 1): + if tuple([int(x) for x in distutils_version.split('.')]) <= (2, 5, 1): sys.argv.remove('--install-layout=deb') print "W: remove '--install-layout=deb' option" except: -- cgit v1.2.1