diff options
| author | Julian Taylor <jtaylor.debian@googlemail.com> | 2013-06-25 19:13:38 +0200 |
|---|---|---|
| committer | Julian Taylor <jtaylor.debian@googlemail.com> | 2013-06-25 19:18:36 +0200 |
| commit | 6c433aa3f089edda07fda4054fc13ddc8a294bad (patch) | |
| tree | dbb86b7318c23d4c1f24c88af3b5ea277f5dc858 /numpy | |
| parent | 596795bf697b6be29e21c23d7680e2d476c23436 (diff) | |
| download | numpy-6c433aa3f089edda07fda4054fc13ddc8a294bad.tar.gz | |
BUG: add module extensions to load_library search list
on mac, windows and linux (with >= py3.2) shared libraries and loadable
module have different extensions, so check both for all platforms.
Diffstat (limited to 'numpy')
| -rw-r--r-- | numpy/ctypeslib.py | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/numpy/ctypeslib.py b/numpy/ctypeslib.py index 0dc9cd1a5..961fa6012 100644 --- a/numpy/ctypeslib.py +++ b/numpy/ctypeslib.py @@ -102,17 +102,11 @@ else: from numpy.distutils.misc_util import get_shared_lib_extension so_ext = get_shared_lib_extension() libname_ext = [libname + so_ext] - if sys.version[:3] >= '3.2': - # For Python >= 3.2 a tag may be added to lib extension - # (platform dependent). If we find such a tag, try both with - # and without it. - so_ext2 = get_shared_lib_extension(is_python_ext=True) - if not so_ext2 == so_ext: - libname_ext.insert(0, libname + so_ext2) - if sys.platform == 'win32': - libname_ext.insert(0, '%s.dll' % libname) - elif sys.platform == 'darwin': - libname_ext.insert(0, '%s.dylib' % libname) + # mac, windows and linux >= py3.2 shared library and loadable + # module have different extensions so try both + so_ext2 = get_shared_lib_extension(is_python_ext=True) + if not so_ext2 == so_ext: + libname_ext.insert(0, libname + so_ext2) else: libname_ext = [libname] |
