Commit 54bbe0a9 authored by Aurel's avatar Aurel Committed by Kazuhiko Shiozaki

python-magic : do not fail to import the lib

ctypes lib does not read the rpath of the current binary to look after the
desired library, so although it exits the import failed. Pass-by the first
find to make the import work
parent 4745d992
--- python-magic-0.4.10/magic.py.orig 2016-01-14 23:41:31.867145173 +0100
+++ python-magic-0.4.10/magic.py 2016-01-14 23:41:54.563401069 +0100
@@ -143,7 +143,7 @@
libmagic = None
# Let's try to find magic or magic1
-dll = ctypes.util.find_library('magic') or ctypes.util.find_library('magic1') or ctypes.util.find_library('cygmagic-1')
+dll = ctypes.util.find_library('magic') or ctypes.util.find_library('magic1') or ctypes.util.find_library('cygmagic-1') or 'libmagic.so'
# This is necessary because find_library returns None if it doesn't find the library
if dll:
......@@ -567,6 +567,8 @@ Acquisition-patches = ${:_profile_base_location_}/../../component/egg-patch/Acqu
Acquisition-patch-options = -p1
Products.DCWorkflow-patches = ${:_profile_base_location_}/../../component/egg-patch/Products.DCWorkflow/workflow_method.patch
Products.DCWorkflow-patch-options = -p1
python-magic-patches = ${:_profile_base_location_}/../../component/egg-patch/python_magic/magic.patch
python-magic-patch-options = -p1
[zodbanalyze]
recipe = zc.recipe.egg
......@@ -602,6 +604,7 @@ Acquisition = 2.13.8+SlapOSPatched001
Products.DCWorkflow = 2.2.4+SlapOSPatched001
pysvn = 1.7.10+SlapOSPatched002
python-ldap = 2.4.22+SlapOSPatched001
python-magic = 0.4.10+SlapOSPatched001
# specify dev version to be sure that an old released version is not used
cloudooo = 1.2.5-dev
......@@ -683,7 +686,6 @@ pycountry = 1.19
pyflakes = 1.0.0
# pylint 1.5.1 breaks testDynamicClassGeneration
pylint = 1.4.4
python-magic = 0.4.10
python-memcached = 1.57
pytracemalloc = 1.2
qrcode = 5.1
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment