aboutsummaryrefslogtreecommitdiffstats
path: root/src/vhdl
diff options
context:
space:
mode:
Diffstat (limited to 'src/vhdl')
-rw-r--r--src/vhdl/python/libghdl/__init__.py11
1 files changed, 2 insertions, 9 deletions
diff --git a/src/vhdl/python/libghdl/__init__.py b/src/vhdl/python/libghdl/__init__.py
index 457d6f2bd..8ca7a977b 100644
--- a/src/vhdl/python/libghdl/__init__.py
+++ b/src/vhdl/python/libghdl/__init__.py
@@ -1,17 +1,10 @@
import ctypes
-import sys
import os.path
-
-_ext = {'linux': '.so',
- 'linux2': '.so',
- 'darwin': '.dylib',
- 'win32': '.dll',
- 'cygwin': '.dll'}
+from libghdl.config import libghdl_filename
# Load the DLL.
_basedir = os.path.dirname(__file__)
-libghdl = ctypes.CDLL(os.path.join(
- _basedir, 'libghdl' + _ext.get(sys.platform, '.so')))
+libghdl = ctypes.CDLL(os.path.join(_basedir, libghdl_filename))
# Low-level initialization (elaboration).
libghdl.libghdl_init()