[vtk-developers] VTK 5.0 branch in mid-August

Brad King brad.king at kitware.com
Mon Aug 1 10:03:44 EDT 2005


Prabhu Ramachandran wrote:
> I had plans to make some small changes to the Python extension
> modules.  The idea is to use the Apple approach, i.e. build a
> vtk*PythonD.so and install that along with the other VTK libraries and
> then build a separate vtk*Python.so that links to the vtk*PythonD.so.
> This makes it much easier to install vtkpython.  However, this might
> be too much of a change, so I am willing to do this after 5.0 is
> released (maybe for 5.1).

Take a look at how we do this in ITK:

http://www.itk.org/cgi-bin/viewcvs.cgi/Wrapping/CSwig/Python/itkbase.py.in?rev=1.8&root=Insight&view=auto

The itkbase.py script gets configured with all the information it needs 
to load the wrapper modules from the proper directory.  One copy gets 
created for the build tree and one copy gets created for the install 
tree.  The installed one knows how to look relative to its location. 
The modules get compiled with . in their rpath on UNIX (and the script 
sets the cwd properly before loading them), and on Windows .dll files 
are loaded from the proper directory anyway.  We just have to change the 
installation to put the python .dll files in the bin directory with the 
rest of the VTK .dll files.

As long as the .py modules are in the PYTHONPATH they can be configured 
to get the .dll files from the proper location.

-Brad



More information about the vtk-developers mailing list