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

1234567891011121314151617181920212223242526272829
  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. Forwarded: not-needed
  6. --- a/README.md
  7. +++ b/README.md
  8. @@ -75,6 +75,10 @@
  9. - When using Homebrew: `brew install libmagic`
  10. - When using macports: `port install file`
  11. +### SmartOS:
  12. +- Install libmagic for source https://github.com/threatstack/libmagic/
  13. +- Depending on your ./configure --prefix settings set your LD_LIBRARY_PATH to <prefix>/lib
  14. +
  15. ### Troubleshooting
  16. - 'MagicException: could not find any magic files!': some
  17. --- a/magic/loader.py
  18. +++ b/magic/loader.py
  19. @@ -49,6 +49,7 @@
  20. "darwin": _lib_candidates_macos,
  21. "linux": _lib_candidates_linux,
  22. "win32": _lib_candidates_windows,
  23. + "sunos5": _lib_candidates_linux,
  24. }.get(sys.platform)
  25. if func is None:
  26. raise ImportError("python-magic: Unsupported platform: " + sys.platform)