]> granicus.if.org Git - python/commitdiff
bpo-34225: Ensure INCLUDE and LIB directories do not end with a backslash. (GH-8464)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Sun, 29 Jul 2018 09:02:16 +0000 (02:02 -0700)
committerSteve Dower <steve.dower@microsoft.com>
Sun, 29 Jul 2018 09:02:16 +0000 (10:02 +0100)
(cherry picked from commit 5473f061f518aef5367a535999a407305fb12aff)

Co-authored-by: Steve Dower <steve.dower@microsoft.com>
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.