From 4368d5b59a6913fb2f2dbbe59b9f1411e4763cd4 Mon Sep 17 00:00:00 2001 From: MAKOMO Date: Sun, 2 Apr 2017 18:03:54 +0200 Subject: [PATCH] fixes search path to numpy dll's like numpy-atlas.dll --- src/setup-win.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/setup-win.py b/src/setup-win.py index 546870a..c28d8ce 100644 --- a/src/setup-win.py +++ b/src/setup-win.py @@ -26,6 +26,9 @@ import matplotlib as mpl import py2exe +import numpy +import sys + import os INCLUDES = [ @@ -71,6 +74,18 @@ 'c:\Python27\Lib\site-packages\PyQt4\plugins\iconengines\qsvgicon4.dll', ]), ] + +def numpy_dll_paths_fix(): + paths = set() + np_path = numpy.__path__[0] + for dirpath, _, filenames in os.walk(np_path): + for item in filenames: + if item.endswith('.dll'): + paths.add(dirpath) + + sys.path.append(*list(paths)) + +numpy_dll_paths_fix() setup( name ="Tonino",