[Python-checkins] cpython: fixed the way the cfg file markers values are split under win32
tarek.ziade
python-checkins at python.org
Sat May 21 12:00:17 CEST 2011
http://hg.python.org/cpython/rev/e39d1b6f0856
changeset: 70243:e39d1b6f0856
user: Tarek Ziade <tarek at ziade.org>
date: Sat May 21 12:00:10 2011 +0200
summary:
fixed the way the cfg file markers values are split under win32
files:
Lib/packaging/config.py | 3 ++-
Lib/packaging/tests/test_config.py | 2 +-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/Lib/packaging/config.py b/Lib/packaging/config.py
--- a/Lib/packaging/config.py
+++ b/Lib/packaging/config.py
@@ -21,7 +21,8 @@
if not vals_str:
return
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('--')
if len(tmp_vals) == 2 and not interpret(tmp_vals[1]):
continue
diff --git a/Lib/packaging/tests/test_config.py b/Lib/packaging/tests/test_config.py
--- a/Lib/packaging/tests/test_config.py
+++ b/Lib/packaging/tests/test_config.py
@@ -307,7 +307,7 @@
['/usr/include/gecode', '/usr/include/blitz'])
cargs = ['-fPIC', '-O2']
if sys.platform == 'win32':
- cargs.append("/DGECODE_VERSION='win32'")
+ cargs.append("/DGECODE_VERSION=win32")
else:
cargs.append('-DGECODE_VERSION=$(./gecode_version)')
self.assertEqual(ext.extra_compile_args, cargs)
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list