From f87f02d78011cbfca557ebf5dde7db77e37c6e46 Mon Sep 17 00:00:00 2001 From: tpeulen Date: Tue, 30 Jan 2024 21:26:27 +0100 Subject: [PATCH] Fix MY_INSTALL_PREFIX --- ext/CMakeLists.txt | 6 ++---- pyproject.toml | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/ext/CMakeLists.txt b/ext/CMakeLists.txt index cf727664..6de8d2da 100644 --- a/ext/CMakeLists.txt +++ b/ext/CMakeLists.txt @@ -31,18 +31,16 @@ IF(BUILD_PYTHON_INTERFACE) LINK_LIBRARIES(${Python_LIBRARY} Python3::NumPy) # Handle where to install the resulting Python package + SET_SOURCE_FILES_PROPERTIES(python/tttrlib.i PROPERTIES CPLUSPLUS ON SWIG_MODULE_NAME ${PROJECT_NAME}) if(CALL_FROM_SETUP_PY) # The CMakeExtension will set CMAKE_INSTALL_PREFIX to the root # of the resulting wheel archive SET(MODULE_NAME ${PROJECT_NAME}) SET(MY_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX}) - SET_SOURCE_FILES_PROPERTIES(python/tttrlib.i PROPERTIES CPLUSPLUS ON SWIG_MODULE_NAME ${PROJECT_NAME}) else() # The Python package is installed directly in the folder of the # detected interpreter (system, user, or virtualenv) set(MY_INSTALL_PREFIX ${Python3_SITELIB}) - MESSAGE(STATUS "Use Python_SITELIB as install prefix: '${MY_INSTALL_PREFIX}'") - SET_SOURCE_FILES_PROPERTIES(python/tttrlib.i PROPERTIES CPLUSPLUS ON SWIG_MODULE_NAME ${PROJECT_NAME}) endif() # Did not find installation prefix library location of python if(NOT MY_INSTALL_PREFIX) @@ -54,9 +52,9 @@ IF(BUILD_PYTHON_INTERFACE) # Fix file path on Windows systems FILE(TO_CMAKE_PATH "${CMAKE_SWIG_OUTDIR}" CMAKE_SWIG_OUTDIR) + MESSAGE(STATUS "MY_INSTALL_PREFIX: '${MY_INSTALL_PREFIX}'") MESSAGE(STATUS "CMAKE_SWIG_OUTDIR: '${CMAKE_SWIG_OUTDIR}'") MESSAGE(STATUS "SWIG_SUPPORT_FILES_DIRECTORY: '${SWIG_SUPPORT_FILES_DIRECTORY}'") - MESSAGE(STATUS "MY_INSTALL_PREFIX: '${MY_INSTALL_PREFIX}'") SWIG_ADD_LIBRARY( ${MODULE_NAME} TYPE MODULE diff --git a/pyproject.toml b/pyproject.toml index ccee5f24..2b94f074 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,5 +1,5 @@ [project] -version = "0.24.0" +version = "0.24.1" name = "tttrlib" requires-python = ">=3.8" description = "Read, write & process time-tagged time-resolved (TTTR) data."