Skip to content

Adapt to new location of config_autogen.h #9

@milsen

Description

@milsen

In loader.py, we include config_autogen.h as follows:

cppyy.include("ogdf/basic/internal/config_autogen.h")

and use the include directories defined as follows:

if "OGDF_INSTALL_DIR" in os.environ:
INSTALL_DIR = os.path.expanduser(os.getenv("OGDF_INSTALL_DIR"))
cppyy.add_include_path(os.path.join(INSTALL_DIR, "include"))
cppyy.add_library_path(os.path.join(INSTALL_DIR, "lib")) # TODO windows?
if "OGDF_BUILD_DIR" in os.environ:
BUILD_DIR = os.path.expanduser(os.getenv("OGDF_BUILD_DIR"))
cppyy.add_include_path(os.path.join(BUILD_DIR, "include"))
cppyy.add_include_path(os.path.join(BUILD_DIR, "..", "include")) # TODO not canonical
cppyy.add_library_path(BUILD_DIR)
try:
wheel_inst_dir = importlib_resources.files("ogdf_wheel") / "install"
if wheel_inst_dir.is_dir():
cppyy.add_library_path(str(wheel_inst_dir / "lib"))
cppyy.add_library_path(str(wheel_inst_dir / "bin"))
cppyy.add_include_path(str(wheel_inst_dir / "include"))

However, because of ogdf/ogdf#253, config_autogen.h now is not anymore in ...include/ogdf/basic/ (like the other header files) but in ...include/ogdf-release/ogdf/basic/ or ...include/ogdf-debug/ogdf/basic/. So we need an additional include directory. Otherwise using ogdf-python with the newest ogdf fails.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions