1
0

0.4.27-34-g339eac0.smartos-support-adapted-from-132.patch 993 B

12345678910111213141516171819202122232425262728
  1. Subject: Smartos support, adapted from #132
  2. Origin: upstream, commit 0.4.27-34-g339eac0 <https://github.com/ahupp/python-magic/commit/0.4.27-34-g339eac0>
  3. Author: Adam Hupp <adam@hupp.org>
  4. Date: Sun May 26 01:15:00 2024 -0700
  5. --- a/README.md
  6. +++ b/README.md
  7. @@ -75,6 +75,10 @@
  8. - When using Homebrew: `brew install libmagic`
  9. - When using macports: `port install file`
  10. +### SmartOS:
  11. +- Install libmagic for source https://github.com/threatstack/libmagic/
  12. +- Depending on your ./configure --prefix settings set your LD_LIBRARY_PATH to <prefix>/lib
  13. +
  14. ### Troubleshooting
  15. - 'MagicException: could not find any magic files!': some
  16. --- a/magic/loader.py
  17. +++ b/magic/loader.py
  18. @@ -49,6 +49,7 @@
  19. "darwin": _lib_candidates_macos,
  20. "linux": _lib_candidates_linux,
  21. "win32": _lib_candidates_windows,
  22. + "sunos5": _lib_candidates_linux,
  23. }.get(sys.platform)
  24. if func is None:
  25. raise ImportError("python-magic: Unsupported platform: " + sys.platform)