From: Steve Dower Date: Thu, 26 Jul 2018 11:23:10 +0000 (-0700) Subject: bpo-34225: Ensure INCLUDE and LIB directories do not end with a backslash. (GH-8464) X-Git-Tag: v3.8.0a1~1307 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5473f061f518aef5367a535999a407305fb12aff;p=python bpo-34225: Ensure INCLUDE and LIB directories do not end with a backslash. (GH-8464) --- diff --git a/Lib/distutils/_msvccompiler.py b/Lib/distutils/_msvccompiler.py index c9d3c6c671..30b3b47398 100644 --- a/Lib/distutils/_msvccompiler.py +++ b/Lib/distutils/_msvccompiler.py @@ -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 index 0000000000..d29c869630 --- /dev/null +++ b/Misc/NEWS.d/next/Windows/2018-07-25-16-13-12.bpo-34225.ngemNL.rst @@ -0,0 +1 @@ +Ensure INCLUDE and LIB directories do not end with a backslash.