get MIME types without strictly requiring python-magic

There are two forms of python-magic, one included in libmagic that is
default on Debian, and another Python wrapper for libmagic that is
called 'python-magic' on pypi.  Those both rely on the compiled binary
library libmagic.  For platforms without good package management, fallback
to using the built-in 'mimetypes' library if 'magic' is not available.

This supports OSX, Windows, and BSD.
This commit is contained in:
Hans-Christoph Steiner 2015-07-31 15:50:20 +02:00
parent 37694a6155
commit 752b258ba7
2 changed files with 34 additions and 16 deletions

View file

@ -26,11 +26,10 @@ setup(name='fdroidserver',
'examples/opensc-fdroid.cfg',
'examples/fdroid-icon.png']),
],
install_requires=[
install_requires=[ # should include 'python-magic' but its not strictly required
'mwclient',
'paramiko',
'Pillow',
'python-magic',
'apache-libcloud >= 0.14.1',
'pyasn1',
'pyasn1-modules',