depot/third_party/nixpkgs/pkgs/development/python-modules/python-magic/libmagic-path.patch
Default email 75ca762b89 Project import generated by Copybara.
GitOrigin-RevId: 29b0d4d0b600f8f5dd0b86e3362a33d4181938f9
2021-03-09 11:18:52 +08:00

17 lines
606 B
Diff

diff --git a/magic/loader.py b/magic/loader.py
index 6b2bfcb..69778af 100644
--- a/magic/loader.py
+++ b/magic/loader.py
@@ -5,11 +5,7 @@ import glob
def load_lib():
libmagic = None
# Let's try to find magic or magic1
- dll = ctypes.util.find_library('magic') \
- or ctypes.util.find_library('magic1') \
- or ctypes.util.find_library('cygmagic-1') \
- or ctypes.util.find_library('libmagic-1') \
- or ctypes.util.find_library('msys-magic-1') # for MSYS2
+ dll = '@libmagic@'
# necessary because find_library returns None if it doesn't find the library
if dll: