Skip to content

Commit 1f5555f

Browse files
authored
Allow py:phlex to work without install header (use source instead) (#28)
1 parent 862a60c commit 1f5555f

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

test/python/CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,11 @@ endif()
7777
set(TEST_PYTHONPATH ${TEST_PYTHONPATH}:$ENV{PYTHONPATH})
7878

7979

80+
set_property(TEST py:phlex
81+
PROPERTY ENVIRONMENT
82+
"PHLEX_INSTALL=${PYTHON_TEST_PHLEX_INSTALL}"
83+
)
84+
8085
set_property(TEST py:add
8186
PROPERTY ENVIRONMENT
8287
"SPDLOG_LEVEL=debug;PHLEX_PLUGIN_PATH=${CMAKE_CURRENT_BINARY_DIR};PYTHONPATH=${TEST_PYTHONPATH};PHLEX_INSTALL=${PYTHON_TEST_PHLEX_INSTALL}"

test/python/pyphlex.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,10 @@
1414
PHLEX_INSTALL = os.environ["PHLEX_INSTALL"]
1515

1616
# load phlex headers
17-
cppyy.add_include_path(os.path.join(PHLEX_INSTALL, "include"))
17+
includedir = os.path.join(PHLEX_INSTALL, "include")
18+
if not os.path.exists(includedir):
19+
includedir = PHLEX_INSTALL
20+
cppyy.add_include_path(includedir)
1821
cppyy.include("phlex/core/framework_graph.hpp")
1922
cppyy.include("phlex/configuration.hpp")
2023

0 commit comments

Comments
 (0)