Bug 813700

Summary: RFE: add python-magic to wsgi cartridge
Product: OKD Reporter: Alexander Todorov <atodorov>
Component: ContainersAssignee: Mike McGrath <mmcgrath>
Status: CLOSED CURRENTRELEASE QA Contact: libra bugs <libra-bugs>
Severity: low Docs Contact:
Priority: medium    
Version: 2.xCC: mpatel, xtian
Target Milestone: ---Keywords: Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-06-08 17:59:30 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Alexander Todorov 2012-04-18 09:05:22 UTC
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 17:07:29 UTC
Added, will be part of the next release.

Comment 2 Xiaoli Tian 2012-05-16 07:13:52 UTC
Verified it on devenv_1778, the packages are installed, will be available on next release.
rpm -qa|grep python-magic
python-magic-5.04-11.el6.x86_64

And it's already required in python cartridge spec.

ssh to my python app:
>>> import magic
>>> ms = magic.open(magic.MAGIC_NONE)
>>> ms.load()
0
>>> type =  ms.file("test.pdf")
>>> print type
ASCII text