Bug 813700 - RFE: add python-magic to wsgi cartridge
RFE: add python-magic to wsgi cartridge
Product: OpenShift Origin
Classification: Red Hat
Component: Containers (Show other bugs)
Unspecified Unspecified
medium Severity low
: ---
: ---
Assigned To: Mike McGrath
libra bugs
: Triaged
Depends On:
  Show dependency treegraph
Reported: 2012-04-18 05:05 EDT by Alexander Todorov
Modified: 2015-05-14 18:53 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2012-06-08 13:59:30 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Alexander Todorov 2012-04-18 05:05:22 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.
Comment 1 Mike McGrath 2012-05-15 13:07:29 EDT
Added, will be part of the next release.
Comment 2 Xiaoli Tian 2012-05-16 03:13:52 EDT
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)
>>> ms.load()
>>> type =  ms.file("test.pdf")
>>> print type
ASCII text

Note You need to log in before you can comment on or make changes to this bug.