Commit 4087512f authored by Michel Salim's avatar Michel Salim Committed by Facebook GitHub Bot

fix Python binding installation

Summary:
Honor `DESTDIR` on Unix-like platforms (important when building packages),
and use `CMAKE_INSTALL_PREFIX` instead of the default prefix.

Reviewed By: yfeldblum

Differential Revision: D24821935

fbshipit-source-id: 42a311f920ed74760597f8908cd339b914ecb92e
parent 477a4c23
......@@ -93,8 +93,17 @@ if (PYTHON_EXTENSIONS)
)
# Install Folly Python Bindings
if (UNIX)
set(ROOT_ARG "--root \$DESTDIR/")
endif ()
install(CODE "
execute_process(COMMAND
python3 ${CMAKE_CURRENT_SOURCE_DIR}/python/setup.py install
WORKING_DIRECTORY ${_cybld})")
execute_process(
COMMAND
python3 ${CMAKE_CURRENT_SOURCE_DIR}/python/setup.py install
--prefix ${CMAKE_INSTALL_PREFIX} ${ROOT_ARG}
COMMAND_ECHO STDOUT
WORKING_DIRECTORY ${_cybld}
)"
)
endif ()
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment