Skip to content

Commit 339eac0

Browse files
committed
smartos support, adapted from ahupp#132
1 parent 4b776d7 commit 339eac0

2 files changed

Lines changed: 5 additions & 0 deletions

File tree

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,10 @@ pip install python-magic-bin
7575
- When using Homebrew: `brew install libmagic`
7676
- When using macports: `port install file`
7777

78+
### SmartOS:
79+
- Install libmagic for source https://github.com/threatstack/libmagic/
80+
- Depending on your ./configure --prefix settings set your LD_LIBRARY_PATH to <prefix>/lib
81+
7882
### Troubleshooting
7983

8084
- 'MagicException: could not find any magic files!': some

magic/loader.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ def _lib_candidates():
4949
"darwin": _lib_candidates_macos,
5050
"linux": _lib_candidates_linux,
5151
"win32": _lib_candidates_windows,
52+
"sunos5": _lib_candidates_linux,
5253
}.get(sys.platform)
5354
if func is None:
5455
raise ImportError("python-magic: Unsupported platform: " + sys.platform)

0 commit comments

Comments
 (0)