Skip to content

Commit 718c73d

Browse files
committed
sudo apt-get update -qq ; sudo apt-get install --yes libmagic1
1 parent ab2a69c commit 718c73d

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

.github/workflows/ci.yml

+4
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@ jobs:
2222
- run: pip install --upgrade pip
2323
- run: pip install --upgrade pytest
2424
- run: pip install --editable .
25+
- if: runner.os == 'Linux'
26+
run: |
27+
sudo apt-get update -qq
28+
sudo apt-get install --yes libmagic1
2529
- if: runner.os == 'macOS'
2630
run: brew install libmagic
2731
- if: runner.os == 'Windows'

magic/loader.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ def _lib_candidates_linux():
1212
1313
This is necessary because alpine is bad
1414
"""
15-
yield "libmagic.so.1"
15+
for path in ("libmagic.so", "libmagic.so.1"):
16+
yield find_library(path)
1617

1718

1819
def _lib_candidates_macos():

0 commit comments

Comments
 (0)