aboutsummaryrefslogtreecommitdiffstats
path: root/src/vhdl
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2018-03-21 18:33:54 +0100
committerTristan Gingold <tgingold@free.fr>2018-03-21 18:33:54 +0100
commitffca448651c5b7b0fc5fe6bdbbcf1e0dc13419e1 (patch)
treeaecf5e76a63c2906fa4ad2041505b740b0780209 /src/vhdl
parent047de40c7799e4186b16bd1ad2c6eb17a7cf0098 (diff)
downloadghdl-ffca448651c5b7b0fc5fe6bdbbcf1e0dc13419e1.tar.gz
ghdl-ffca448651c5b7b0fc5fe6bdbbcf1e0dc13419e1.tar.bz2
ghdl-ffca448651c5b7b0fc5fe6bdbbcf1e0dc13419e1.zip
Set a version to libghdl, put version in configure.
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()