Bug 813700 - RFE: add python-magic to wsgi cartridge
Summary: RFE: add python-magic to wsgi cartridge
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OKD
Classification: Red Hat
Component: Containers
Version: 2.x
Hardware: Unspecified
OS: Unspecified
medium
low
Target Milestone: ---
: ---
Assignee: Mike McGrath
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-04-18 09:05 UTC by Alexander Todorov
Modified: 2015-05-14 22:53 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-06-08 17:59:30 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

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


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