Skip to content

Commit 3cc505e

Browse files
authored
bpo-34225: Ensure INCLUDE and LIB directories do not end with a backslash. (GH-8464)
1 parent 89352b0 commit 3cc505e

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

Lib/distutils/_msvccompiler.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -252,11 +252,11 @@ def initialize(self, plat_name=None):
252252

253253
for dir in vc_env.get('include', '').split(os.pathsep):
254254
if dir:
255-
self.add_include_dir(dir)
255+
self.add_include_dir(dir.rstrip(os.sep))
256256

257257
for dir in vc_env.get('lib', '').split(os.pathsep):
258258
if dir:
259-
self.add_library_dir(dir)
259+
self.add_library_dir(dir.rstrip(os.sep))
260260

261261
self.preprocess_options = None
262262
# If vcruntime_redist is available, link against it dynamically. Otherwise,
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Ensure INCLUDE and LIB directories do not end with a backslash.

0 commit comments

Comments
 (0)