]> granicus.if.org Git - python/commitdiff
bpo-34225: Ensure INCLUDE and LIB directories do not end with a backslash. (GH-8464)
authorSteve Dower <steve.dower@microsoft.com>
Thu, 26 Jul 2018 11:23:10 +0000 (04:23 -0700)
committerGitHub <noreply@github.com>
Thu, 26 Jul 2018 11:23:10 +0000 (04:23 -0700)
Lib/distutils/_msvccompiler.py
Misc/NEWS.d/next/Windows/2018-07-25-16-13-12.bpo-34225.ngemNL.rst [new file with mode: 0644]

index c9d3c6c67120a5109d05de9d094b328e29fca544..30b3b4739851bad041e94c4285e7fec82c7038f6 100644 (file)
@@ -252,11 +252,11 @@ class MSVCCompiler(CCompiler) :
 
         for dir in vc_env.get('include', '').split(os.pathsep):
             if dir:
-                self.add_include_dir(dir)
+                self.add_include_dir(dir.rstrip(os.sep))
 
         for dir in vc_env.get('lib', '').split(os.pathsep):
             if dir:
-                self.add_library_dir(dir)
+                self.add_library_dir(dir.rstrip(os.sep))
 
         self.preprocess_options = None
         # If vcruntime_redist is available, link against it dynamically. Otherwise,
diff --git a/Misc/NEWS.d/next/Windows/2018-07-25-16-13-12.bpo-34225.ngemNL.rst b/Misc/NEWS.d/next/Windows/2018-07-25-16-13-12.bpo-34225.ngemNL.rst
new file mode 100644 (file)
index 0000000..d29c869
--- /dev/null
@@ -0,0 +1 @@
+Ensure INCLUDE and LIB directories do not end with a backslash.