File tree Expand file tree Collapse file tree 1 file changed +24
-2
lines changed
Expand file tree Collapse file tree 1 file changed +24
-2
lines changed Original file line number Diff line number Diff line change 11import os
2+ import platform
23
3- import cppyy .ll
44import importlib_resources
55import sys
66
7+ try :
8+ import cppyy
9+ import cppyy .ll
10+ except :
11+ print (
12+ "\n ##########\n "
13+ "ogdf-python couldn't load cppyy. "
14+ "This is not an ogdf-python error, but probably a problem with your cppyy installation or python environment. "
15+ "To use ogdf-python, check that you can `import cppyy` in a freshly-started python interpreter.\n " ,
16+ file = sys .stderr
17+ )
18+ if platform .system () == "Windows" :
19+ print (
20+ "Note that ogdf-python is not officially supported on Windows."
21+ "Instead, you should use ogdf-python within the Windows Subsystem for Linux (WSL)."
22+ "There, make sure to actually invoke the Linux python(3) binary instead of the Windows python.exe, which"
23+ "can be checked with `python -VV`.\n " ,
24+ file = sys .stderr
25+ )
26+ print ("##########\n \n " , file = sys .stderr )
27+ raise
28+
729cppyy .ll .set_signals_as_exception (True )
830cppyy .add_include_path (os .path .dirname (os .path .realpath (__file__ )))
931
4163 "If you haven't installed OGDF globally to your system, "
4264 "please set environment variables OGDF_INSTALL_DIR or OGDF_BUILD_DIR. "
4365 "The current search path is:\n %s\n "
44- "The current include path is:\n %s" %
66+ "The current include path is:\n %s\n " %
4567 (cppyy .gbl .gSystem .GetDynamicPath (), cppyy .gbl .gInterpreter .GetIncludePath ()),
4668 file = sys .stderr )
4769 raise
You can’t perform that action at this time.
0 commit comments