[vtk-developers] New setup.py for vtk-python!
Prabhu Ramachandran
prabhu at aero.iitm.ernet.in
Thu Jun 13 13:49:28 EDT 2002
hi,
I've just committed the first version of a distutils based setup.py.in
into the repository.
1. Update your tree and re-run cmake to generate the actual
setup.py.
2. Build VTK and then run make install.
3. *After you do make install* cd to Wrapping/Python and run
python setup.py install
This should hopefully install VTK-Python in the right places.
What it does:
1. Installs the stuff in Wrapping/Python into
sys.prefix/lib/pythonX.Y/site-packages/vtk_python/
I've deliberately chosen vtk_python because it will avoid potential
problems with names like vtkpython.py etc.
2. Adds a vtk.pth in
sys.prefix/lib/pythonX.Y/site-packages/
3. Under *nix make symlinks in
sys.prefix/lib/pythonX.Y/site-packages/vtk_python/ that point to
${CMAKE_INSTALL_PREFIX}/lib/vtk/libvtk*Python*.so.
Under Win32 the vtk*Python*.dll's will be copied into the
sys.prefix/lib/pythonX.Y/site-packages/vtk_python/ directory.
4. Installs vtkpython/vtkpython.exe into sys.prefix/bin/ (I dont
know the equivalent directory under win32).
I've tested it on my Linux system and it seems to work fine. Please
do test it out.
Once this is tested and everyone is happy, the CMakeLists.txt files
must be modified so that if the platform is not Win32 the
libvtk*Python* are not installed by make install. I will need help
with that since I'm no CMake expert.
cheers,
prabhu
p.s. I have no clue on the name of the libvtk*Python libraries under
Mac OSX. If the libraries dont match libvtk*Python*.so then I'd need
to modify the setup appropriately. Again feedback is appreciated.
More information about the vtk-developers
mailing list