Skip to content

Commit 0ad5655

Browse files
committed
fix imports for newer OGDF versions
1 parent c6213df commit 0ad5655

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/ogdf_python/loader.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,12 @@
5353
cppyy.include("ogdf/basic/internal/config_autogen.h")
5454
cppyy.include("ogdf/basic/internal/config.h")
5555
cppyy.include("ogdf/basic/Graph.h")
56-
cppyy.include("ogdf/cluster/ClusterGraphObserver.h") # otherwise only pre-declared
56+
try:
57+
cppyy.include("ogdf/cluster/ClusterGraphObserver.h") # otherwise only pre-declared
58+
except ImportError:
59+
pass # gone in newer versions
5760
cppyy.include("ogdf/fileformats/GraphIO.h")
61+
cppyy.include("ogdf/basic/LayoutStandards.h")
5862

5963
cppyy.load_library("OGDF")
6064
except:

0 commit comments

Comments
 (0)