Red Hat Bugzilla – Bug 813700
RFE: add python-magic to wsgi cartridge
Last modified: 2015-05-14 18:53:33 EDT
Description of problem:
Please add python-magic to the cartridge.
There are 2 packages named python-magic:
1) The rpm package python-magic which comes with RHEL (6). It is part of the file project. This is not available in PyPI and can't be installed from there.
2) A python-magic module from PyPI, which does the same thing as 1) but is from different author and the code is different.
I'm asking for the package from RHEL to get installed into the cartridge.
I'm using RHEL6 as my development box (python-magic.rpm) but on OpenShift currently I need to use the other python module (python-magic.tar.gz). This can lead to inconsistent behaviour.
Added, will be part of the next release.
Verified it on devenv_1778, the packages are installed, will be available on next release.
rpm -qa|grep python-magic
And it's already required in python cartridge spec.
ssh to my python app:
>>> import magic
>>> ms = magic.open(magic.MAGIC_NONE)
>>> type = ms.file("test.pdf")
>>> print type