# Default prefix (as python --user) -> installation in site.USER_SITE
# Default prefix (as python --user) -> installation in site.USER_SITE
# Note FP : for brew users, you need to set prefix= nothing in file /usr/local/Cellar/python/2.7.6_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/distutils.cfg
# or create a ~/.pydistutils.cfg with:
# [install]
# prefix=
set(install-opt "--user")
set(install-opt "--user")
# Need to set the CMAKE_INSTALL_PREFIX to site.USER_SITE
# Need to set the CMAKE_INSTALL_PREFIX to site.USER_SITE
# Get python user site and install path = USER_SITE + project_name
# Get python user site and install path = USER_SITE + project_name
set(PYTHON_COMMAND_GET_INSTALL_DIR "import site, os ; print os.path.join(site.USER_SITE, \"${PROJECT_NAME}\")")
set(PYTHON_COMMAND_GET_INSTALL_DIR "import site, os ; print os.path.join(site.USER_SITE, \"${PROJECT_NAME}\")")
# Set cmake PREFIX variable only for summary
# Set cmake PREFIX variable only for summary
# Get python user base
set(PREFIX "No User prefix given, install process with python --user (in site.USER_SITE)")
execute_process(
COMMAND ${PYTHON_EXECUTABLE} -c "import site ; print site.USER_BASE"
OUTPUT_VARIABLE PY_USER_BASE)
string(STRIP ${PY_USER_BASE} PY_USER_BASE)
set(PREFIX "No User prefix given, use python --user (site.USER_BASE=${PY_USER_BASE})")
else()# user site not included in the path, which probably means that python is run using virtualenv
else()# user site not included in the path, which probably means that python is run using virtualenv