Merge pull request #1195 from borglab/fix/python-install
commit
9c88249a0d
|
|
@ -16,6 +16,7 @@ if(GTSAM_BUILD_PYTHON OR GTSAM_INSTALL_MATLAB_TOOLBOX)
|
||||||
|
|
||||||
set(Python_VERSION_MAJOR ${PYTHON_VERSION_MAJOR})
|
set(Python_VERSION_MAJOR ${PYTHON_VERSION_MAJOR})
|
||||||
set(Python_VERSION_MINOR ${PYTHON_VERSION_MINOR})
|
set(Python_VERSION_MINOR ${PYTHON_VERSION_MINOR})
|
||||||
|
set(Python_VERSION_PATCH ${PYTHON_VERSION_PATCH})
|
||||||
set(Python_EXECUTABLE ${PYTHON_EXECUTABLE})
|
set(Python_EXECUTABLE ${PYTHON_EXECUTABLE})
|
||||||
|
|
||||||
else()
|
else()
|
||||||
|
|
@ -31,11 +32,12 @@ if(GTSAM_BUILD_PYTHON OR GTSAM_INSTALL_MATLAB_TOOLBOX)
|
||||||
|
|
||||||
set(Python_VERSION_MAJOR ${Python3_VERSION_MAJOR})
|
set(Python_VERSION_MAJOR ${Python3_VERSION_MAJOR})
|
||||||
set(Python_VERSION_MINOR ${Python3_VERSION_MINOR})
|
set(Python_VERSION_MINOR ${Python3_VERSION_MINOR})
|
||||||
|
set(Python_VERSION_PATCH ${Python3_VERSION_PATCH})
|
||||||
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set(GTSAM_PYTHON_VERSION
|
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."
|
CACHE STRING "The version of Python to build the wrappers against."
|
||||||
FORCE)
|
FORCE)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -188,7 +188,7 @@ endif()
|
||||||
# Add custom target so we can install with `make python-install`
|
# Add custom target so we can install with `make python-install`
|
||||||
set(GTSAM_PYTHON_INSTALL_TARGET python-install)
|
set(GTSAM_PYTHON_INSTALL_TARGET python-install)
|
||||||
add_custom_target(${GTSAM_PYTHON_INSTALL_TARGET}
|
add_custom_target(${GTSAM_PYTHON_INSTALL_TARGET}
|
||||||
COMMAND ${PYTHON_EXECUTABLE} -m pip install --user .
|
COMMAND ${PYTHON_EXECUTABLE} -m pip install .
|
||||||
DEPENDS ${GTSAM_PYTHON_DEPENDENCIES}
|
DEPENDS ${GTSAM_PYTHON_DEPENDENCIES}
|
||||||
WORKING_DIRECTORY ${GTSAM_PYTHON_BUILD_DIRECTORY})
|
WORKING_DIRECTORY ${GTSAM_PYTHON_BUILD_DIRECTORY})
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue