Skip to content

Commit e6a7d02

Browse files
committed
do not preload COIN on Windows
1 parent c6ba5a7 commit e6a7d02

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/ogdf_python/loader.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -152,10 +152,12 @@ def get_macro(m):
152152

153153
try:
154154
if IS_DEBUG:
155-
cppyy.load_library("COIN-debug")
155+
if platform.system() != "Windows": # Windows dll includes COIN
156+
cppyy.load_library("COIN-debug")
156157
cppyy.load_library("OGDF-debug")
157158
else:
158-
cppyy.load_library("COIN")
159+
if platform.system() != "Windows": # Windows dll includes COIN
160+
cppyy.load_library("COIN")
159161
cppyy.load_library("OGDF")
160162

161163
config_autogen_h = "ogdf/basic/internal/config_autogen.h"
@@ -173,7 +175,7 @@ def get_macro(m):
173175
cppyy.include("ogdf/basic/LayoutStandards.h")
174176
except (RuntimeError, ImportError) as e:
175177
raise ImportError(
176-
f"ogdf-python couldn't load OGDF in mode '{CONFIG}'.\n"
178+
f"ogdf-python couldn't load OGDF (or one of its dependencies like COIN) in mode '{CONFIG}'.\n"
177179
"Please check the above underlying error and check that the below search paths contain "
178180
"OGDF headers and shared libraries in the correct release/debug configuration.\n"
179181
"If you haven't installed OGDF globally to your system, "

0 commit comments

Comments
 (0)