While setup.py correctly declares a dependency on python-magic, relying on PIP for dependency resolution still fails; python-magic requires that the libmagic shared library is installed into the system separately, and refuses to import otherwise. Because this library imports magic at the top-level, it therefore transitively also depends on that shared library to be installed at the top-level. This should at least be documented prominently,
(Personally, I would prefer if that functionality were made an optional dependency. The docstring already indicates that if inferring the mime-type fails, that task is left to the cloud storage. By not raising an exception, this library already made the design choice that leaving mime-type determination to the cloud storage as an acceptable solution. Therefore, allowing a dependency-free installation for simple use-cases would be preferrable IMHO.)
While
setup.py
correctly declares a dependency onpython-magic
, relying on PIP for dependency resolution still fails;python-magic
requires that thelibmagic
shared library is installed into the system separately, and refuses to import otherwise. Because this library importsmagic
at the top-level, it therefore transitively also depends on that shared library to be installed at the top-level. This should at least be documented prominently,(Personally, I would prefer if that functionality were made an optional dependency. The docstring already indicates that if inferring the mime-type fails, that task is left to the cloud storage. By not raising an exception, this library already made the design choice that leaving mime-type determination to the cloud storage as an acceptable solution. Therefore, allowing a dependency-free installation for simple use-cases would be preferrable IMHO.)