summaryrefslogtreecommitdiff
path: root/src/python
diff options
context:
space:
mode:
Diffstat (limited to 'src/python')
-rw-r--r--src/python/gudhi/_distributor_init.py4
1 files changed, 2 insertions, 2 deletions
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))