mirror of
https://git.freebsd.org/ports.git
synced 2025-07-13 15:29:15 -04:00
filemagic provides a Python API for libmagic, the library behind Unix file command. It enables the Python developer to easilty test for file types from the extensive identification library that is shipped with libmagic. Features: * Simple, Python API * Identifies named files or strings * Return a textual description, mime type or mime encoding * Provide custom magic files to customize file detection * Support for both Python2 and Python3 * Support for both CPython and PyPy WWW: https://filemagic.readthedocs.org
11 lines
345 B
Python
11 lines
345 B
Python
--- magic/api.py.orig 2014-12-23 03:21:58 UTC
|
|
+++ magic/api.py
|
|
@@ -9,7 +9,7 @@ import ctypes
|
|
import platform
|
|
import warnings
|
|
|
|
-libname = ctypes.util.find_library('magic')
|
|
+libname = ctypes.util.find_library('magic') or ctypes.util.find_library('magic1')
|
|
if not libname:
|
|
if platform.system() == 'SunOS':
|
|
libname = 'libmagic.so'
|