[vtk-developers] python install prefix in setup.py
David Gobbi
dgobbi at atamai.com
Wed Feb 1 11:45:46 EST 2006
The default install location for the VTK python wrappers in VTKcvs
doesn't make sense to me.
If the VTK install prefix is /usr/local, then the python wrappers will
be installed here:
/usr/local/python2.3/site-packages/
If python is installed somewhere else, (e.g. /usr/ is a common location)
then installing
the wrappers in /usr/local isn't very useful.
The default behaviour of setup.py is to query the python executable to
find out where it is
installed. This behaviour is explicitly overridden by
VTK/Wrapping/Python/CMakeList.txt:
SET(VTK_PYTHON_SETUP_ARGS "--prefix=\"${DOLLAR}{CMAKE_INSTALL_PREFIX}\""
CACHE STRING "Arguments passed to \"python setup.py install ...\"
during installation.")
I think that having a customizable VTK_PYTHON_SETUP_ARGS is a good idea,
but the default
value of this variable is not going to work for most people.
The best option is to query the PYTHON_EXECUTABLE to see where it was
installed, and use that
as the wrapper install prefix instead of using CMAKE_INSTALL_PREFIX.
The python install prefix can be queried by running 'python -c "import
sys; print sys.prefix"',
where 'python' is whatever PYTHON_EXECUTABLE has been set by cmake.
Does this make sense to anyone else?
- David
More information about the vtk-developers
mailing list