Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Undocumented pre-requisite libmagic #83

Open
burnpanck opened this issue May 29, 2021 · 1 comment
Open

Undocumented pre-requisite libmagic #83

burnpanck opened this issue May 29, 2021 · 1 comment

Comments

@burnpanck
Copy link

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.)

@wallyhall
Copy link

I'm guessing related to this, I had issues bundling into an Alpine based container due to libmagic missing.
I had to explicitly install it:

apk add libmagic

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants