summaryrefslogtreecommitdiff
path: root/Lib
diff options
context:
space:
mode:
Diffstat (limited to 'Lib')
-rw-r--r--Lib/distutils/sysconfig.py5
-rw-r--r--Lib/sysconfig.py5
2 files changed, 10 insertions, 0 deletions
diff --git a/Lib/distutils/sysconfig.py b/Lib/distutils/sysconfig.py
index 4d16b2674c..9888cd52cb 100644
--- a/Lib/distutils/sysconfig.py
+++ b/Lib/distutils/sysconfig.py
@@ -318,6 +318,11 @@ def parse_makefile(fn, g=None):
fp.close()
+ # strip spurious spaces
+ for k, v in done.items():
+ if isinstance(v, str):
+ done[k] = v.strip()
+
# save the results in the global dictionary
g.update(done)
return g
diff --git a/Lib/sysconfig.py b/Lib/sysconfig.py
index 4559cd712a..b8880f5355 100644
--- a/Lib/sysconfig.py
+++ b/Lib/sysconfig.py
@@ -251,6 +251,11 @@ def _parse_makefile(filename, vars=None):
else:
# bogus variable reference; just drop it since we can't deal
del notdone[name]
+ # strip spurious spaces
+ for k, v in done.items():
+ if isinstance(v, str):
+ done[k] = v.strip()
+
# save the results in the global dictionary
vars.update(done)
return vars