# 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")
# Need to set the CMAKE_INSTALL_PREFIX to site.USER_SITE
# 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 cmake PREFIX variable only for summary
set(PREFIX "No User prefix given, install process with python --user (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")
# Need to set the CMAKE_INSTALL_PREFIX to site.USER_SITE
# 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}\")")
else()# user site not included in the path, which probably means that python is run using virtualenv
COMMAND ${PYTHON_EXECUTABLE} -c "import distutils.util as ut ; import distutils.sysconfig as sy; print 'lib.'+ut.get_platform()+'-'+sy.get_python_version()"