[vtk-developers] python install prefix in setup.py
David Gobbi
dgobbi at atamai.com
Wed Feb 1 12:11:19 EST 2006
Thanks for the link, I'll take a lood and add the comments from my email
to the bug report.
Mathieu Malaterre wrote:
> The whole python support IMHO should be rewritten as mentioned here:
>
> http://vtk.org/Bug/bug.php?op=show&bugid=2257
>
> As for the installation thing, it would be nice if the CMake Modules
> had an interface (?mymodule_INSTALL_PREFIX ?) to specify default
> installation path. I am thinking that this should be the same issue
> for Tcl, Python, Java.
>
> 2 cents,
> Mathieu
>
> David Gobbi wrote:
>
>> 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
>> _______________________________________________
>> vtk-developers mailing list
>> vtk-developers at vtk.org
>> http://www.vtk.org/mailman/listinfo/vtk-developers
>>
>
>
More information about the vtk-developers
mailing list