From 3fd0c1b0001c2b7e492754a214934e8acb872b0b Mon Sep 17 00:00:00 2001 From: Nathan Jensen Date: Mon, 16 Aug 2021 22:21:54 -0500 Subject: [PATCH] update and re-enable newer windows build also use visual studio 2017 image on appveyor --- appveyor.yml | 2 ++ commands/_msvccompiler.py | 6 ++++++ commands/build_ext.py | 4 ++-- 3 files changed, 10 insertions(+), 2 deletions(-) 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