diff --git a/setup.py b/setup.py index 6d3610098b8..ea5e23c1091 100755 --- a/setup.py +++ b/setup.py @@ -222,7 +222,11 @@ def _find_include_file(self, include): def _find_shared_library_file(self, library): - for dir_ in self.compiler.library_dirs: + if sys.platform == "win32": + dirs = (os.environ.get("PATH") or "").split(os.pathsep) + else: + dirs = self.compiler.library_dirs + for dir_ in dirs: libfile = os.path.join( dir_, self.compiler.library_filename(library, lib_type="shared") )