summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorMark Hammond <mhammond@skippinet.com.au>2008-09-18 03:51:46 (GMT)
committerMark Hammond <mhammond@skippinet.com.au>2008-09-18 03:51:46 (GMT)
commit900155fa42a78b2c0b5fb6d01bb81264162d9fdc (patch)
treeaaaa7c0564c00013896da72360e8217f1bfbe45e /Lib
parent9f381ec50bb82cc441250c6eefd8355ea14187d7 (diff)
downloadcpython-900155fa42a78b2c0b5fb6d01bb81264162d9fdc.zip
cpython-900155fa42a78b2c0b5fb6d01bb81264162d9fdc.tar.gz
cpython-900155fa42a78b2c0b5fb6d01bb81264162d9fdc.tar.bz2
avoid putting unicode objects in the environment causing
later test failures. As discussed on #python-dev
Diffstat (limited to 'Lib')
-rw-r--r--Lib/distutils/msvc9compiler.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/Lib/distutils/msvc9compiler.py b/Lib/distutils/msvc9compiler.py
index 0b27428..804f175 100644
--- a/Lib/distutils/msvc9compiler.py
+++ b/Lib/distutils/msvc9compiler.py
@@ -357,9 +357,10 @@ class MSVCCompiler(CCompiler) :
vc_env = query_vcvarsall(VERSION, plat_spec)
- self.__paths = vc_env['path'].split(os.pathsep)
- os.environ['lib'] = vc_env['lib']
- os.environ['include'] = vc_env['include']
+ # take care to only use strings in the environment.
+ self.__paths = vc_env['path'].encode('mbcs').split(os.pathsep)
+ os.environ['lib'] = vc_env['lib'].encode('mbcs')
+ os.environ['include'] = vc_env['include'].encode('mbcs')
if len(self.__paths) == 0:
raise DistutilsPlatformError("Python was built with %s, "