diff --git a/CMakeLists.txt b/CMakeLists.txt index 4bf1e4a9a..144784143 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -509,6 +509,23 @@ if (INSTALL_HEADERS) DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/caliper/fortran FILES_MATCHING PATTERN "*.mod") endif() + + install( + DIRECTORY + "python/caliper-reader/caliperreader" + DESTINATION + "${CMAKE_INSTALL_LIBDIR}/caliper" + FILES_MATCHING + PATTERN "*.py" + ) + + install( + PROGRAMS + "python/cali2traceevent.py" + "python/cali2traceevent" + DESTINATION + ${CMAKE_INSTALL_BINDIR} + ) endif() if (INSTALL_CONFIG) @@ -559,9 +576,9 @@ if (INSTALL_CONFIG) ) install( - FILES + FILES ${PROJECT_BINARY_DIR}/caliper.pc - DESTINATION + DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig ) endif() diff --git a/python/cali2traceevent b/python/cali2traceevent new file mode 100755 index 000000000..2cbd95cca --- /dev/null +++ b/python/cali2traceevent @@ -0,0 +1,20 @@ +#!/usr/bin/env python3 +# +# Copyright (c) 2024, Lawrence Livermore National Security, LLC. +# See top-level LICENSE file for details. +# +# SPDX-License-Identifier: BSD-3-Clause + +import os +import os.path +import sys + +exe_file = os.path.realpath(os.path.expanduser(__file__)) +cali_prefix = os.path.dirname(os.path.dirname(exe_file)) +cali_lib_path = os.path.join(cali_prefix, "lib64", "caliper") +sys.path.insert(0, cali_lib_path) + +from cali2traceevent import main + +if __name__ == "__main__": + sys.exit(main())