You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The current Python/CMakeLists.txt is responsible for setting the destination directory of the shared python library PyHSPlasma.so. It currently does so by executing a Python code snippet obtaining the value of distutils.sysconfig.get_python_lib().
Unfortunately it does so with a call to that routine with no arguments, which sets PYTHON_LIB_DIR to the installation directory of the currently running Python interpreter.
While that may be appropriate for building/installing as a manner of installing HSPlasma for the machine performing the build, it becomes inappropriate when HSPlasma is being built in a build environment such as Jenkins, where the Jenkins build process attempts to do a make install with CMAKE_INSTALL_PREFIX set to a non-live destination. If the build is performed (as it should be) in Jenkins under a non-privileged user, the make install operation will attempt to install PyHSPlasma.so into the working Python library directories, and fail because of privileges. As it should. If for no other reason than that make install ignored CMAKE_INSTALL_PREFIX.
I am suggesting for the NOT WIN32 situation to alter your snippet to use
get_python_lib(prefix='${CMAKE_INSTALL_PREFIX}')
instead of the base get_python_lib() call. This will properly pick up the destination for the Python library in an isolated build environment.
-rarified
The text was updated successfully, but these errors were encountered:
tallpgr
added a commit
to tallpgr/libhsplasma
that referenced
this issue
Dec 10, 2019
…mines PYTHON_LIB_DIR
Allow ${CMAKE_INSTALL_PREFIX} to override Python's installation prefix
when determining where to place PyHSPlasma.so library for Python.
The current
Python/CMakeLists.txt
is responsible for setting the destination directory of the shared python libraryPyHSPlasma.so
. It currently does so by executing a Python code snippet obtaining the value ofdistutils.sysconfig.get_python_lib()
.Unfortunately it does so with a call to that routine with no arguments, which sets
PYTHON_LIB_DIR
to the installation directory of the currently running Python interpreter.While that may be appropriate for building/installing as a manner of installing HSPlasma for the machine performing the build, it becomes inappropriate when HSPlasma is being built in a build environment such as Jenkins, where the Jenkins build process attempts to do a
make install
withCMAKE_INSTALL_PREFIX
set to a non-live destination. If the build is performed (as it should be) in Jenkins under a non-privileged user, themake install
operation will attempt to installPyHSPlasma.so
into the working Python library directories, and fail because of privileges. As it should. If for no other reason than thatmake install
ignoredCMAKE_INSTALL_PREFIX
.I am suggesting for the
NOT WIN32
situation to alter your snippet to useget_python_lib(prefix='${CMAKE_INSTALL_PREFIX}')
instead of the base
get_python_lib()
call. This will properly pick up the destination for the Python library in an isolated build environment.-rarified
The text was updated successfully, but these errors were encountered: