Skip to content

Commit 7030050

Browse files
committed
Check dependencies
1 parent 09000e2 commit 7030050

2 files changed

Lines changed: 6 additions & 1 deletion

File tree

.github/workflows/wheels.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,11 @@ jobs:
114114
cp "/msys64/${{ endsWith(matrix.only, '32') && 'mingw32' || 'mingw64' }}/bin/libcharset-1.dll" "magic"
115115
cp "/msys64/${{ endsWith(matrix.only, '32') && 'mingw32' || 'mingw64' }}/bin/libiconv-2.dll" "magic"
116116
117+
- name: Analyze DLL dependencies
118+
if: runner.os == 'Windows' && endsWith(matrix.only, '32')
119+
run: |
120+
/msys64/mingw32/bin/objdump -p "magic/libmagic-1.dll" | grep "DLL"
121+
117122
- uses: pypa/cibuildwheel@v2.17.0 # sync version with pip install cibuildwheel above
118123
timeout-minutes: 10
119124
with:

magic/loader.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ def _lib_candidates_macos():
5252

5353
def _lib_candidates_windows():
5454
"""Yield possible libmagic library names on Windows."""
55+
os.environ['PATH'] = here + os.pathsep + os.environ['PATH'] # for DLLs in site-packages
5556
fnames = (
5657
"libmagic",
5758
"magic1",
@@ -89,7 +90,6 @@ def _lib_candidates():
8990

9091

9192
def load_lib():
92-
os.environ['PATH'] = here + os.pathsep + os.environ['PATH'] # for DLLs in site-packages
9393
exc = []
9494
for lib in _lib_candidates():
9595
# find_library returns None when lib not found

0 commit comments

Comments
 (0)