From 0f7cc48907e1b28e114d37e3bd30a2237d9f6c8c Mon Sep 17 00:00:00 2001 From: ROUVREAU Vincent Date: Thu, 11 Jun 2020 08:09:01 +0200 Subject: cannot import WinDLL from ctypes on non-windows systems --- src/python/gudhi/_distributor_init.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/python/gudhi/_distributor_init.py b/src/python/gudhi/_distributor_init.py index 0ed451f9..6f3dc8a2 100644 --- a/src/python/gudhi/_distributor_init.py +++ b/src/python/gudhi/_distributor_init.py @@ -3,8 +3,6 @@ Helper to preload windows dlls to prevent dll not found errors. Once a DLL is preloaded, its namespace is made available to any subsequent DLL. ''' import os -from ctypes import WinDLL -import glob if os.name == 'nt': # convention for storing / loading the DLL from gudhi/.libs/, if present try: @@ -14,5 +12,7 @@ if os.name == 'nt': else: libs_dir = os.path.abspath(os.path.join(basedir, '.libs')) if os.path.isdir(libs_dir): + from ctypes import WinDLL + import glob for filename in glob.glob(os.path.join(libs_dir, '*dll')): WinDLL(os.path.abspath(filename)) -- cgit v1.2.3