diff options
author | rgommers <ralf.gommers@googlemail.com> | 2011-06-19 11:49:13 +0200 |
---|---|---|
committer | Ralf Gommers <ralf.gommers@googlemail.com> | 2011-06-23 23:44:39 +0200 |
commit | 9a287ba152e26ec0c9a1d658a3532f61e9291faa (patch) | |
tree | 825ea77978e33700f0371bb276602bcd0860dcb0 /numpy/tests | |
parent | 8d451bcbdcd5f16342f779b94182d45738a8e8c6 (diff) | |
download | numpy-9a287ba152e26ec0c9a1d658a3532f61e9291faa.tar.gz |
BUG: deal with shared lib extension in a single place. Fix ctypes.load_library.
This is related to PEP 3149, tags in shared library extensions. Only applies
to Linux (for now). See also #1749.
Diffstat (limited to 'numpy/tests')
-rw-r--r-- | numpy/tests/test_ctypeslib.py | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/numpy/tests/test_ctypeslib.py b/numpy/tests/test_ctypeslib.py index 78403df9e..dfe7e90aa 100644 --- a/numpy/tests/test_ctypeslib.py +++ b/numpy/tests/test_ctypeslib.py @@ -2,6 +2,7 @@ import sys import numpy as np from numpy.ctypeslib import ndpointer, load_library +from numpy.distutils.misc_util import get_shared_lib_extension from numpy.testing import * try: @@ -29,12 +30,7 @@ class TestLoadLibrary(TestCase): (including extension) does not work.""" try: try: - from distutils import sysconfig - so = sysconfig.get_config_var('SO') - # fix long extension for Python >=3.2, see PEP 3149. - if 'SOABI' in sysconfig.get_config_vars(): - so = so.replace('.'+sysconfig.get_config_var('SOABI'), '', 1) - + so = get_shared_lib_extension(is_python_ext=True) cdll = load_library('multiarray%s' % so, np.core.multiarray.__file__) except ImportError: |