]> granicus.if.org Git - python/commitdiff
fixed the way the cfg file markers values are split under win32
authorTarek Ziade <tarek@ziade.org>
Sat, 21 May 2011 10:00:10 +0000 (12:00 +0200)
committerTarek Ziade <tarek@ziade.org>
Sat, 21 May 2011 10:00:10 +0000 (12:00 +0200)
Lib/packaging/config.py
Lib/packaging/tests/test_config.py

index 6bbfdc30e9c91636c047ab00d57657931f20cd6c..6df2babb2713c2f3d82ceb3786653c8b6b72104c 100644 (file)
@@ -21,7 +21,8 @@ def _pop_values(values_dct, key):
     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
index ac4f40320f2cc48152e397f455a452f614544ce4..6f7081730094cb87196727ea3bab9be1c74d80cc 100644 (file)
@@ -307,7 +307,7 @@ class ConfigTestCase(support.TempdirManager,
             ['/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)