diff --git a/appveyor.yml b/appveyor.yml index a1f89b62..709a1775 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,3 +1,5 @@ +image: Visual Studio 2017 + environment: matrix: diff --git a/commands/_msvccompiler.py b/commands/_msvccompiler.py index 45b4c209..ee2cfa9a 100644 --- a/commands/_msvccompiler.py +++ b/commands/_msvccompiler.py @@ -44,3 +44,9 @@ def link(self, build_temp, target_lang) + + # Escape any backslash in the Windows path as a trailing backslash + # will escape a end quote in the link command. + def library_dir_option(self, dir): + dir = dir.replace('\\', '\\\\') + return python_MSVCCompiler.library_dir_option(self, dir) diff --git a/commands/build_ext.py b/commands/build_ext.py index c397de75..4ceac703 100644 --- a/commands/build_ext.py +++ b/commands/build_ext.py @@ -23,13 +23,13 @@ def run(self): import sys import distutils import distutils.ccompiler - from commands import msvc9compiler + from commands import _msvccompiler # See commands.msvc9compiler method comments for information on # this override. distutils.ccompiler.compiler_class['msvc'] = ( 'jepmsvccompiler', 'MSVCCompiler', "Microsoft Visual C++") - sys.modules['distutils.jepmsvccompiler'] = msvc9compiler + sys.modules['distutils.jepmsvccompiler'] = _msvccompiler old_build_ext.run(self) # copy the jep.pyd to jep.dll early to avoid confusion