From 6a4518d635eb72182562b9e7587cc80112c6439f Mon Sep 17 00:00:00 2001 From: Gregory Lee Date: Tue, 31 Oct 2023 14:34:21 -0400 Subject: [PATCH] reduce number of separate VERSION files being used by CMake (CMakeLists.txt now use top-level VERSION_CPP) --- ci/build_wheel.sh | 4 ++++ ci/release/update-version.sh | 3 --- cpp/plugins/cucim.kit.cumed/CMakeLists.txt | 2 +- cpp/plugins/cucim.kit.cumed/VERSION | 1 - cpp/plugins/cucim.kit.cuslide/CMakeLists.txt | 2 +- cpp/plugins/cucim.kit.cuslide/VERSION | 1 - python/CMakeLists.txt | 2 +- python/cucim/VERSION | 1 - 8 files changed, 7 insertions(+), 9 deletions(-) delete mode 100644 cpp/plugins/cucim.kit.cumed/VERSION delete mode 100644 cpp/plugins/cucim.kit.cuslide/VERSION delete mode 100644 python/cucim/VERSION diff --git a/ci/build_wheel.sh b/ci/build_wheel.sh index 88d38b38a..9723ecaa8 100755 --- a/ci/build_wheel.sh +++ b/ci/build_wheel.sh @@ -57,6 +57,7 @@ else fi # First build the C++ lib using CMake via the run script +echo "libcucim version: `cat VERSION_CPP`" ./run build_local libcucim ${CMAKE_BUILD_TYPE} # Current `pip wheel` build assumes all shared libraries exist in this path @@ -64,12 +65,15 @@ PYTHON_CLARA_SO_PREFIX_PATH="./python/cucim/src/cucim/clara/" # Build the C++ cuslide and cumed plugins # (omit copying binaries as they don't go in the wheel) +echo "cuslide version: `cat cpp/plugins/cucim.kit.cuslide/VERSION`" ./run build_local cuslide ${CMAKE_BUILD_TYPE} cp -P -r cpp/plugins/cucim.kit.cuslide/install/lib/* ${PYTHON_CLARA_SO_PREFIX_PATH} +echo "cumed version: `cat cpp/plugins/cucim.kit.cumed/VERSION`" ./run build_local cumed ${CMAKE_BUILD_TYPE} cp -P -r cpp/plugins/cucim.kit.cumed/install/lib/* ${PYTHON_CLARA_SO_PREFIX_PATH} # Compile the Python bindings +echo "cucim bindings version: `cat VERSION_CPP`" ./run build_local cucim ${CMAKE_BUILD_TYPE} cp -P install/lib/*.so ${PYTHON_CLARA_SO_PREFIX_PATH} diff --git a/ci/release/update-version.sh b/ci/release/update-version.sh index 133cfac3b..cdd32d466 100755 --- a/ci/release/update-version.sh +++ b/ci/release/update-version.sh @@ -40,9 +40,6 @@ echo "${NEXT_FULL_TAG}" > VERSION # update VERSION files used by C++/CMake (TODO: avoid these duplicate copies) NEXT_CPP_LONG_TAG=${NEXT_MAJOR}.${NEXT_MINOR}.${NEXT_PATCH} # no leading 'v' or trailing 'a' echo "${NEXT_CPP_LONG_TAG}" > VERSION_CPP -sed_runner "s/${CURRENT_LONG_TAG}/${NEXT_CPP_LONG_TAG}/g" python/cucim/VERSION -sed_runner "s/${CURRENT_LONG_TAG}/${NEXT_CPP_LONG_TAG}/g" cpp/plugins/cucim.kit.cuslide/VERSION -sed_runner "s/${CURRENT_LONG_TAG}/${NEXT_CPP_LONG_TAG}/g" cpp/plugins/cucim.kit.cumed/VERSION sed_runner "s#\[Version ${CURRENT_LONG_TAG}\](release_notes/v${CURRENT_LONG_TAG}.md)#\[Version ${NEXT_FULL_TAG}\](release_notes/v${NEXT_FULL_TAG}.md)#g" python/cucim/docs/index.md sed_runner "s/v${CURRENT_LONG_TAG}/v${NEXT_FULL_TAG}/g" python/cucim/docs/getting_started/index.md diff --git a/cpp/plugins/cucim.kit.cumed/CMakeLists.txt b/cpp/plugins/cucim.kit.cumed/CMakeLists.txt index 4073ecfd5..46f61a34d 100644 --- a/cpp/plugins/cucim.kit.cumed/CMakeLists.txt +++ b/cpp/plugins/cucim.kit.cumed/CMakeLists.txt @@ -23,7 +23,7 @@ cmake_minimum_required(VERSION 3.18) # Set VERSION unset(VERSION CACHE) -file(STRINGS ${CMAKE_CURRENT_LIST_DIR}/VERSION VERSION) +file(STRINGS ${CMAKE_CURRENT_LIST_DIR}/../../../VERSION_CPP VERSION) # Append local cmake module path list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake/modules") diff --git a/cpp/plugins/cucim.kit.cumed/VERSION b/cpp/plugins/cucim.kit.cumed/VERSION deleted file mode 100644 index a193fff41..000000000 --- a/cpp/plugins/cucim.kit.cumed/VERSION +++ /dev/null @@ -1 +0,0 @@ -23.12.00 diff --git a/cpp/plugins/cucim.kit.cuslide/CMakeLists.txt b/cpp/plugins/cucim.kit.cuslide/CMakeLists.txt index 37dbca4f7..4e89df64d 100644 --- a/cpp/plugins/cucim.kit.cuslide/CMakeLists.txt +++ b/cpp/plugins/cucim.kit.cuslide/CMakeLists.txt @@ -23,7 +23,7 @@ cmake_minimum_required(VERSION 3.18) # Set VERSION unset(VERSION CACHE) -file(STRINGS ${CMAKE_CURRENT_LIST_DIR}/VERSION VERSION) +file(STRINGS ${CMAKE_CURRENT_LIST_DIR}/../../../VERSION_CPP VERSION) # Append local cmake module path list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake/modules") diff --git a/cpp/plugins/cucim.kit.cuslide/VERSION b/cpp/plugins/cucim.kit.cuslide/VERSION deleted file mode 100644 index a193fff41..000000000 --- a/cpp/plugins/cucim.kit.cuslide/VERSION +++ /dev/null @@ -1 +0,0 @@ -23.12.00 diff --git a/python/CMakeLists.txt b/python/CMakeLists.txt index 2a3277457..502b70241 100644 --- a/python/CMakeLists.txt +++ b/python/CMakeLists.txt @@ -23,7 +23,7 @@ cmake_minimum_required(VERSION 3.18) # Set VERSION unset(VERSION CACHE) -file(STRINGS ${CMAKE_CURRENT_LIST_DIR}/../VERSION VERSION) +file(STRINGS ${CMAKE_CURRENT_LIST_DIR}/../VERSION_CPP VERSION) # Append local cmake module path list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake/modules") diff --git a/python/cucim/VERSION b/python/cucim/VERSION deleted file mode 100644 index a193fff41..000000000 --- a/python/cucim/VERSION +++ /dev/null @@ -1 +0,0 @@ -23.12.00