summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSylvain Th?nault <sylvain.thenault@logilab.fr>2010-02-27 14:32:13 +0100
committerSylvain Th?nault <sylvain.thenault@logilab.fr>2010-02-27 14:32:13 +0100
commit1c8e6d5c9c8ef52ecaf8a96491714f13ff51ca98 (patch)
treeadc6a2cc5b69e806cf190bcb395693de53427d64
parent9111b1556c6190a3932272edcb65a5446cd85df7 (diff)
downloadlogilab-common-1c8e6d5c9c8ef52ecaf8a96491714f13ff51ca98.tar.gz
fix bad comparison of distutils version: comparing a list of string with a tuple of int...
-rw-r--r--db.py1
-rw-r--r--setup.py2
2 files changed, 2 insertions, 1 deletions
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: