8000 BLD: Fix `has_include_file` side-effect · matplotlib/matplotlib@d527a82 · GitHub
[go: up one dir, main page]

Skip to content

Commit d527a82

Browse files
committed
BLD: Fix has_include_file side-effect
The passed argument would be modified by function while it not designed to.
1 parent ddcfd82 commit d527a82

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

setupext.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,8 @@ def has_include_file(include_dirs, filename):
151151
directories in `include_dirs`.
152152
"""
153153
if sys.platform == 'win32':
154-
include_dirs += os.environ.get('INCLUDE', '.').split(';')
154+
include_dirs = list(include_dirs) # copy before modify
155+
include_dirs += os.environ.get('INCLUDE', '.').split(os.pathsep)
155156
for dir in include_dirs:
156157
if os.path.exists(os.path.join(dir, filename)):
157158
return True

0 commit comments

Comments
 (0)
0