aboutsummaryrefslogtreecommitdiffstats
path: root/python
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2019-06-24 21:13:51 +0200
committerTristan Gingold <tgingold@free.fr>2019-06-24 21:14:11 +0200
commit8ed91011ffeeb38b725a5645e76efe3969d152c9 (patch)
tree7dc960350f088c17afe13e76ce0a3519020febac /python
parent7844307638c4666c0fc4a330b7d536722fc13460 (diff)
downloadghdl-8ed91011ffeeb38b725a5645e76efe3969d152c9.tar.gz
ghdl-8ed91011ffeeb38b725a5645e76efe3969d152c9.tar.bz2
ghdl-8ed91011ffeeb38b725a5645e76efe3969d152c9.zip
libghdl: fix support for non-posix OS.
Diffstat (limited to 'python')
-rw-r--r--python/libghdl/__init__.py3
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