diff options
author | Tristan Gingold <tgingold@free.fr> | 2019-06-24 21:13:51 +0200 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2019-06-24 21:14:11 +0200 |
commit | 8ed91011ffeeb38b725a5645e76efe3969d152c9 (patch) | |
tree | 7dc960350f088c17afe13e76ce0a3519020febac /python/libghdl/__init__.py | |
parent | 7844307638c4666c0fc4a330b7d536722fc13460 (diff) | |
download | ghdl-8ed91011ffeeb38b725a5645e76efe3969d152c9.tar.gz ghdl-8ed91011ffeeb38b725a5645e76efe3969d152c9.tar.bz2 ghdl-8ed91011ffeeb38b725a5645e76efe3969d152c9.zip |
libghdl: fix support for non-posix OS.
Diffstat (limited to 'python/libghdl/__init__.py')
-rw-r--r-- | python/libghdl/__init__.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/python/libghdl/__init__.py b/python/libghdl/__init__.py index 3050a82da..2ae52a4a2 100644 --- a/python/libghdl/__init__.py +++ b/python/libghdl/__init__.py @@ -1,5 +1,6 @@ import ctypes import os +import sys from os.path import dirname, join, exists from shutil import which from libghdl.version import __version__ @@ -10,7 +11,7 @@ def _get_libghdl_name(): ver = __version__.replace('-', '_').replace('.', '_') ext = {'win32': 'dll', 'cygwin': 'dll', - 'darwin': 'dylib'}.get(os.name, 'so') + 'darwin': 'dylib'}.get(sys.platform, 'so') return 'libghdl-' + ver + '.' + ext |