Merge remote-tracking branch 'upstream/master' into adamodel-move-assign
This commit is contained in:
@@ -21,7 +21,7 @@ steps:
|
||||
unset BOOST_ROOT
|
||||
echo "##vso[task.setvariable variable=BOOST_ROOT]"$BOOST_ROOT
|
||||
|
||||
sudo apt-get install -y --allow-unauthenticated libopenblas-dev liblapack-dev g++ libboost1.70-dev libarmadillo-dev xz-utils
|
||||
sudo apt-get install -y --allow-unauthenticated libopenblas-dev g++ libboost1.70-dev xz-utils
|
||||
|
||||
if [ "$(binding)" == "python" ]; then
|
||||
export PYBIN=$(which python)
|
||||
|
||||
@@ -18,6 +18,9 @@
|
||||
|
||||
* Replace Boost serialization library by Cereal (#2458).
|
||||
|
||||
* Add `PYTHON_INSTALL_PREFIX` CMake option to specify installation root for
|
||||
Python bindings (#2797).
|
||||
|
||||
### mlpack 3.4.2
|
||||
###### 2020-10-26
|
||||
* Added Mean Absolute Percentage Error.
|
||||
|
||||
@@ -203,6 +203,7 @@ Options are specified with the -D flag. The allowed options include:
|
||||
BUILD_CLI_EXECUTABLES=(ON/OFF): whether or not to build command-line programs
|
||||
BUILD_PYTHON_BINDINGS=(ON/OFF): whether or not to build Python bindings
|
||||
PYTHON_EXECUTABLE=(/path/to/python_version): Path to specific Python executable
|
||||
PYTHON_INSTALL_PREFIX=(/path/to/python/): Path to root of Python installation
|
||||
BUILD_JULIA_BINDINGS=(ON/OFF): whether or not to build Julia bindings
|
||||
JULIA_EXECUTABLE=(/path/to/julia): Path to specific Julia executable
|
||||
BUILD_GO_BINDINGS=(ON/OFF): whether or not to build Go bindings
|
||||
|
||||
@@ -190,6 +190,7 @@ The full list of options mlpack allows:
|
||||
- BUILD_WITH_COVERAGE=(ON/OFF): Build with support for code coverage tools
|
||||
(gcc only) (default OFF)
|
||||
- PYTHON_EXECUTABLE=(/path/to/python_version): Path to specific Python executable
|
||||
- PYTHON_INSTALL_PREFIX=(/path/to/python/): Path to root of Python installation
|
||||
- JULIA_EXECUTABLE=(/path/to/julia): Path to specific Julia executable
|
||||
- BUILD_MARKDOWN_BINDINGS=(ON/OFF): Build Markdown bindings for website
|
||||
documentation (default OFF)
|
||||
|
||||
@@ -310,8 +310,8 @@ if (BUILD_R_BINDINGS)
|
||||
# Installation script for the packagae.
|
||||
install(CODE
|
||||
"execute_process(
|
||||
COMMAND R CMD INSTALL mlpack_${PACKAGE_VERSION}.tar.gz
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}"
|
||||
COMMAND ${R_EXECUTABLE} CMD INSTALL mlpack_${PACKAGE_VERSION}.tar.gz
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})"
|
||||
)
|
||||
|
||||
add_dependencies(R r_build)
|
||||
|
||||
@@ -214,14 +214,20 @@ add_custom_command(TARGET python POST_BUILD
|
||||
add_dependencies(python python_configured)
|
||||
|
||||
# Configure installation script file.
|
||||
if (NOT PYTHON_INSTALL_PREFIX)
|
||||
set(PYTHON_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}")
|
||||
endif ()
|
||||
|
||||
execute_process(COMMAND ${PYTHON_EXECUTABLE}
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/print_python_version.py" "${CMAKE_INSTALL_PREFIX}"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/print_python_version.py"
|
||||
"${PYTHON_INSTALL_PREFIX}"
|
||||
OUTPUT_VARIABLE CMAKE_PYTHON_PATH)
|
||||
string(STRIP "${CMAKE_PYTHON_PATH}" CMAKE_PYTHON_PATH)
|
||||
install(CODE "set(ENV{PYTHONPATH} ${CMAKE_PYTHON_PATH})")
|
||||
install(CODE "set(PYTHON_EXECUTABLE \"${PYTHON_EXECUTABLE}\")")
|
||||
install(CODE "set(CMAKE_BINARY_DIR \"${CMAKE_BINARY_DIR}\")")
|
||||
install(CODE "set(CMAKE_INSTALL_PREFIX \"${CMAKE_INSTALL_PREFIX}\")")
|
||||
|
||||
install(CODE "set(PYTHON_INSTALL_PREFIX \"${PYTHON_INSTALL_PREFIX}\")")
|
||||
install(CODE "execute_process(COMMAND mkdir -p $ENV{DESTDIR}${CMAKE_PYTHON_PATH})")
|
||||
install(SCRIPT "${CMAKE_CURRENT_SOURCE_DIR}/PythonInstall.cmake")
|
||||
|
||||
|
||||
@@ -5,13 +5,13 @@
|
||||
if (DEFINED ENV{DESTDIR})
|
||||
execute_process(COMMAND ${PYTHON_EXECUTABLE}
|
||||
"${CMAKE_BINARY_DIR}/src/mlpack/bindings/python/setup.py" install
|
||||
--prefix=${CMAKE_INSTALL_PREFIX} --root=$ENV{DESTDIR}
|
||||
--prefix=${PYTHON_INSTALL_PREFIX} --root=$ENV{DESTDIR}
|
||||
WORKING_DIRECTORY "${CMAKE_BINARY_DIR}/src/mlpack/bindings/python/"
|
||||
RESULT_VARIABLE setup_res)
|
||||
else ()
|
||||
execute_process(COMMAND ${PYTHON_EXECUTABLE}
|
||||
"${CMAKE_BINARY_DIR}/src/mlpack/bindings/python/setup.py" install
|
||||
--prefix=${CMAKE_INSTALL_PREFIX}
|
||||
--prefix=${PYTHON_INSTALL_PREFIX}
|
||||
WORKING_DIRECTORY "${CMAKE_BINARY_DIR}/src/mlpack/bindings/python/"
|
||||
RESULT_VARIABLE setup_res)
|
||||
endif ()
|
||||
|
||||
Reference in New Issue
Block a user