diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 3305e8a..7365840 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -30,6 +30,11 @@ jobs: uses: actions/setup-python@v5 with: python-version: '3.12' +# - name: find instances of msvcp140.dll +# working-directory: ${{ github.workspace }} +# run: | +# pip install pefile +# python scripts\find_library.py - name: build and install working-directory: ${{ github.workspace }} run: | diff --git a/scripts/find_library.py b/scripts/find_library.py new file mode 100644 index 0000000..3b08dc1 --- /dev/null +++ b/scripts/find_library.py @@ -0,0 +1,13 @@ +"""Find all instances of a given DLL in PATH and output information about +each.""" + +import os +import pefile + +dll_name = 'msvcp140.dll' + +for d in os.environ['PATH'].split(os.pathsep): + if os.path.isfile(path := os.path.join(d, dll_name)): + print(path, end=': ') + with pefile.PE(path) as pe: + print((pe.OPTIONAL_HEADER.MajorLinkerVersion, pe.OPTIONAL_HEADER.MinorLinkerVersion))