From 8ed91011ffeeb38b725a5645e76efe3969d152c9 Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Mon, 24 Jun 2019 21:13:51 +0200 Subject: libghdl: fix support for non-posix OS. --- python/libghdl/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'python') 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 -- cgit v1.2.3