Bump metadata version.

Clean up setup.cfg so it doesn't break RPM builds on files which
are no longer included.

Add a test case for warnings for column truncation.

Clean up warnings; was working around the introduced bug that
returned (var)char columns with binary collations as array.

Exposed the column flags (values from constants.FLAG) as
description_flags on the cursor.
This commit is contained in:
adustman
2006-03-05 04:59:14 +00:00
parent 9e4c5ec971
commit 21a3d3397b
6 changed files with 78 additions and 19 deletions

View File

@ -31,7 +31,7 @@ def mysql_config(what):
# of mysql_config
def dequote(s):
if (s[0] == "'" or s[0] == '"') and (s[0] == s[-1]):
if s[0] in "\"'" and s[0] == s[-1]:
s = s[1:-1]
return s
@ -45,10 +45,6 @@ def enabled(option):
else:
raise Abort, "Unknown value %s for option %s" % (value, option)
include_dirs = [ dequote(i[2:])
for i in mysql_config('include')
if i.startswith('-i') ]
extra_objects = []
static = enabled('static')
if enabled('embedded'):
@ -69,7 +65,16 @@ metadata['name'] = name
library_dirs = [ dequote(i[2:]) for i in libs if i.startswith("-L") ]
libraries = [ dequote(i[2:]) for i in libs if i.startswith("-l") ]
extra_compile_args = mysql_config("cflags")
removable_compile_args = '-I -L -l'.split()
extra_compile_args = [ i for i in mysql_config("cflags")
if i[:2] not in removable_compile_args ]
include_dirs = [ dequote(i[2:])
for i in mysql_config('include')
if i.startswith('-I') ]
if not include_dirs: # fix for MySQL-3.23
include_dirs = [ dequote(i[2:])
for i in mysql_config('cflags')
if i.startswith('-I') ]
if static:
extra_objects.append(os.path.join(