# HG changeset patch # User almar.klein # Date 1326279063 -3600 # Node ID a2af956394288f4fa6a8dca10cb7bb35ee4fa950 # Parent 0df85a2ebe4dda2eb0ad77a74dd09a70ecf5fa58 Fix that distutils does not put quotes around paths that contain spaces when compiling with MSVC. diff -r 0df85a2ebe4d -r a2af95639428 Lib/distutils/msvc9compiler.py --- a/Lib/distutils/msvc9compiler.py Wed Jan 11 03:32:43 2012 -0500 +++ b/Lib/distutils/msvc9compiler.py Wed Jan 11 11:51:03 2012 +0100 @@ -737,6 +737,8 @@ # ccompiler.py. def library_dir_option(self, dir): + if ' ' in dir and not dir.startswith('"'): + dir = '"%s"' % dir return "/LIBPATH:" + dir def runtime_library_dir_option(self, dir): diff -r 0df85a2ebe4d -r a2af95639428 Lib/distutils/msvccompiler.py --- a/Lib/distutils/msvccompiler.py Wed Jan 11 03:32:43 2012 -0500 +++ b/Lib/distutils/msvccompiler.py Wed Jan 11 11:51:03 2012 +0100 @@ -531,6 +531,8 @@ # ccompiler.py. def library_dir_option(self, dir): + if ' ' in dir and not dir.startswith('"'): + dir = '"%s"' % dir return "/LIBPATH:" + dir def runtime_library_dir_option(self, dir):