From 1d67019f54004b87493cf0a7437300fd5e464ad6 Mon Sep 17 00:00:00 2001 From: Varun Agrawal Date: Wed, 11 May 2022 12:06:11 -0400 Subject: [PATCH 1/2] remove user flag for pip install --- python/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/CMakeLists.txt b/python/CMakeLists.txt index 05606c5844..c14f02ddab 100644 --- a/python/CMakeLists.txt +++ b/python/CMakeLists.txt @@ -188,7 +188,7 @@ endif() # Add custom target so we can install with `make python-install` set(GTSAM_PYTHON_INSTALL_TARGET python-install) add_custom_target(${GTSAM_PYTHON_INSTALL_TARGET} - COMMAND ${PYTHON_EXECUTABLE} -m pip install --user . + COMMAND ${PYTHON_EXECUTABLE} -m pip install . DEPENDS ${GTSAM_PYTHON_DEPENDENCIES} WORKING_DIRECTORY ${GTSAM_PYTHON_BUILD_DIRECTORY}) From dab30890032ae829fa384dff2ad86a0f819342ba Mon Sep 17 00:00:00 2001 From: Varun Agrawal Date: Wed, 11 May 2022 12:06:33 -0400 Subject: [PATCH 2/2] include patch version for Python interpreter to help disambiguate --- cmake/HandlePython.cmake | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cmake/HandlePython.cmake b/cmake/HandlePython.cmake index 0c24824bcd..16215986b6 100644 --- a/cmake/HandlePython.cmake +++ b/cmake/HandlePython.cmake @@ -16,6 +16,7 @@ if(GTSAM_BUILD_PYTHON OR GTSAM_INSTALL_MATLAB_TOOLBOX) set(Python_VERSION_MAJOR ${PYTHON_VERSION_MAJOR}) set(Python_VERSION_MINOR ${PYTHON_VERSION_MINOR}) + set(Python_VERSION_PATCH ${PYTHON_VERSION_PATCH}) set(Python_EXECUTABLE ${PYTHON_EXECUTABLE}) else() @@ -31,11 +32,12 @@ if(GTSAM_BUILD_PYTHON OR GTSAM_INSTALL_MATLAB_TOOLBOX) set(Python_VERSION_MAJOR ${Python3_VERSION_MAJOR}) set(Python_VERSION_MINOR ${Python3_VERSION_MINOR}) + set(Python_VERSION_PATCH ${Python3_VERSION_PATCH}) endif() set(GTSAM_PYTHON_VERSION - "${Python_VERSION_MAJOR}.${Python_VERSION_MINOR}" + "${Python_VERSION_MAJOR}.${Python_VERSION_MINOR}.${Python_VERSION_PATCH}" CACHE STRING "The version of Python to build the wrappers against." FORCE)