diff --git a/.github/workflows/test-windows.yml b/.github/workflows/test-windows.yml index c4b257833df..dd4deaf3395 100644 --- a/.github/workflows/test-windows.yml +++ b/.github/workflows/test-windows.yml @@ -86,7 +86,7 @@ jobs: with: path: winbuild\build key: - ${{ hashFiles('winbuild\build_prepare.py') }}-${{ hashFiles('.github\workflows\test-windows.yml') }}-${{ env.pythonLocation }}-${{ steps.install.outputs.vs }} + z-${{ hashFiles('winbuild\build_prepare.py') }}-${{ hashFiles('.github\workflows\test-windows.yml') }}-${{ env.pythonLocation }}-${{ steps.install.outputs.vs }} - name: Prepare build if: steps.build-cache.outputs.cache-hit != 'true' 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") )