Skip to content

Commit 65f1c4b

Browse files
committed
When installing OpenMC locally, set PYTHONPATH to avoid error
1 parent 195f81c commit 65f1c4b

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -317,6 +317,7 @@ if(PYTHONINTERP_FOUND)
317317
--root=debian/openmc --install-layout=deb
318318
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})")
319319
else()
320+
install(CODE "set(ENV{PYTHONPATH} \"${CMAKE_INSTALL_PREFIX}/lib/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}/site-packages\")")
320321
install(CODE "execute_process(
321322
COMMAND ${PYTHON_EXECUTABLE} setup.py install
322323
--prefix=${CMAKE_INSTALL_PREFIX}

0 commit comments

Comments
 (0)