From b689b903a911fdc6c98bef8bf908476254049a8a Mon Sep 17 00:00:00 2001 From: jmcarcell Date: Fri, 1 Dec 2023 22:01:07 +0100 Subject: [PATCH] Add an extra podio_version.py file --- CMakeLists.txt | 5 +++++ python/CMakeLists.txt | 6 ++++++ tools/podio-dump | 2 +- 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 83c74dbe5..b9bca5cd0 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -172,6 +172,11 @@ install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/include/podio/podioVersion.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/podio ) configure_file(${CMAKE_CURRENT_SOURCE_DIR}/python/__version__.py.in ${CMAKE_CURRENT_SOURCE_DIR}/python/podio/__version__.py) +# Quality of life improvement to be able to use podio-dump --help +# without having to import ROOT +configure_file(${CMAKE_CURRENT_SOURCE_DIR}/python/__version__.py.in + ${CMAKE_CURRENT_SOURCE_DIR}/python/podio_version.py) + #--- add license files --------------------------------------------------------- install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/NOTICE diff --git a/python/CMakeLists.txt b/python/CMakeLists.txt index 2613f7d6a..273ecd4a4 100644 --- a/python/CMakeLists.txt +++ b/python/CMakeLists.txt @@ -23,6 +23,12 @@ else() ) endif() +# Quality of life improvement to be able to use podio-dump --help +# without having to import ROOT +install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/podio_version.py + DESTINATION ${podio_PYTHON_INSTALLDIR} +) + install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/podio_gen DESTINATION ${podio_PYTHON_INSTALLDIR} REGEX test_.*\\.py$ EXCLUDE # Do not install test files diff --git a/tools/podio-dump b/tools/podio-dump index 757c3bd83..bd7b0f60a 100755 --- a/tools/podio-dump +++ b/tools/podio-dump @@ -7,7 +7,7 @@ import yaml from tabulate import tabulate -from podio import __version__ +from podio_version import __version__ def print_general_info(reader, filename):