[vtk-developers] python install prefix in setup.py

David Gobbi dgobbi at atamai.com
Wed Feb 8 12:44:26 EST 2006


Prabhu Ramachandran wrote:

>"David" == David Gobbi <dgobbi at atamai.com> writes:
>
>    David> The largest class of these users is probably Windows-users
>    David> who are taking VTK for a test-drive.  They are likely to
>    David> have installed Python themselves.  For these users,
>    David> installing into python's site-packages, as opposed to the
>    David> CMAKE_PREFIX, makes a lot of sense.
>
>OK, so under win32 and maybe the Mac we can default to using
>sys.prefix.  I'm not convinced about the Unix behavior since I think a
>good package should do what it is told to do.  If I set
>prefix=/usr/local I expect that nothing will be added into /usr/
>behind my back.
>  
>
I'll only make installing into the Python prefix the default on Win32.
The Mac is more like UNIX.

>    David> CMake should show the user very clearly where these python
>    David> modules are going to be installed, so that the user
>    David> immediately understands that he/she has an option to
>    David> install them somewhere else.
>
>OK.  Even if it is going to be made clear to the user that cmake will
>install things in sys.prefix, it still causes problems for those who
>need to build VTK in an RPM or deb.  I think things should be made as
>easy as possible for these folks.  At least the special cases should
>be documented prominently (README.packagers?).
>  
>
If the VTK_PYTHON_SETUP_ARGS is clearly shown by CMake (i.e. not
advanced) and described in a readme, that should be enough.

>    >> Then users simply do:
>    >> 
>    >> import vtkversion vtkversion.require('5.0')
>[...]
>    David> This would work.
>
>    David> We have to move forward here.  I have a proposal:
>
>    David> 1) Make VTK_PYTHON_SETUP_ARGS so that it is not advanced.
>    David> This will make it obvious to the user that they have an
>    David> option about where the python modules are installed.  The
>    David> "Help" tag should indicate that /usr/local and /usr are
>    David> other possible options.  We don't want to be dictators.
>
>OK.
>
>    David> 2) adopt your vtkversion strategy
>
>    David> The third thing that should be done, eventually, is that
>    David> CMake should create a shell script that the user can source
>    David> to automatically set the PYTHONPATH variable.  This will be
>    David> useful particularly for people that just do "make" and not
>    David> "make install".
>
>I think this sounds fine.  Only thing is I don't have the time for
>this during this semester, so count me out of helping with an
>implementation.
>  
>
I can handle most of it myself, so that should not be a problem.

 - David



More information about the vtk-developers mailing list