Subject: Smartos support, adapted from #132 Origin: upstream, commit 0.4.27-34-g339eac0 Author: Adam Hupp Date: Sun May 26 01:15:00 2024 -0700 --- a/README.md +++ b/README.md @@ -75,6 +75,10 @@ - When using Homebrew: `brew install libmagic` - When using macports: `port install file` +### SmartOS: +- Install libmagic for source https://github.com/threatstack/libmagic/ +- Depending on your ./configure --prefix settings set your LD_LIBRARY_PATH to /lib + ### Troubleshooting - 'MagicException: could not find any magic files!': some --- a/magic/loader.py +++ b/magic/loader.py @@ -49,6 +49,7 @@ "darwin": _lib_candidates_macos, "linux": _lib_candidates_linux, "win32": _lib_candidates_windows, + "sunos5": _lib_candidates_linux, }.get(sys.platform) if func is None: raise ImportError("python-magic: Unsupported platform: " + sys.platform)