fixed the way the cfg file markers values are split under win32

This commit is contained in:
Tarek Ziade 2011-05-21 12:00:10 +02:00
parent ec9b76d282
commit 91f0e346cc
2 changed files with 3 additions and 2 deletions

View File

@ -21,7 +21,8 @@ def _pop_values(values_dct, key):
if not vals_str: if not vals_str:
return return
fields = [] fields = []
for field in vals_str.split(os.linesep): # the line separator is \n for setup.cfg files
for field in vals_str.split('\n'):
tmp_vals = field.split('--') tmp_vals = field.split('--')
if len(tmp_vals) == 2 and not interpret(tmp_vals[1]): if len(tmp_vals) == 2 and not interpret(tmp_vals[1]):
continue continue

View File

@ -307,7 +307,7 @@ class ConfigTestCase(support.TempdirManager,
['/usr/include/gecode', '/usr/include/blitz']) ['/usr/include/gecode', '/usr/include/blitz'])
cargs = ['-fPIC', '-O2'] cargs = ['-fPIC', '-O2']
if sys.platform == 'win32': if sys.platform == 'win32':
cargs.append("/DGECODE_VERSION='win32'") cargs.append("/DGECODE_VERSION=win32")
else: else:
cargs.append('-DGECODE_VERSION=$(./gecode_version)') cargs.append('-DGECODE_VERSION=$(./gecode_version)')
self.assertEqual(ext.extra_compile_args, cargs) self.assertEqual(ext.extra_compile_args, cargs)