[vtk-developers] VTK-Python: out-of-source builds: an update.

Prabhu Ramachandran prabhu at aero.iitm.ernet.in
Thu Feb 6 04:12:36 EST 2003


hi,

I've committed a modified Wrapping/Python/CMakeLists.txt and
setup.py.in that handle out-of-source builds cleanly and lets one
install the Python files from VTK_BINARY_DIR/Wrapping/Python.

Many thanks to Andy for all the initial work on this and for helping
me!

I've tested the new files under Debian GNU/Linux and would appreciate
if others could test it on other Unices and also on Win32.

What should work now:

 1. An out of source build should work perfectly as far as Python is
 concerned.  Just do the usual make, make install and then cd
 VTK_BINARY_DIR/Wrapping/Python and do 'python setup.py install
 --prefix=<your-prefix>' to install the Python related files.

 2. The in-source build should work as before with no issues.

How:

 [skip to next section if not interested in "how".  Maybe Andy is the
 only one interested in this.]

 I basically modified Andy's CMakeLists.txt to copy all the python
 files from VTK_SOURCE_DIR/Wrapping/Python to the binary dir and then
 added a rule to run compileall.compile_dir(...) when building VTK.
 This means that at the end of each build, "pyc" files are generated
 in the VTK_BINARY_DIR.


What needs testing:

 1. Test the stuff under Win32.  So far all my tests were on Linux.
 Would appreciate if someone could test this on win32 before the
 release.

 2. Test under other Unices.  Again I'd appreciate if others test it
 and give me feedback.


Later tonight I'll update the Wrapping/Python/README.txt to note this
and also write a small section on running and writing the Python unit
tests for VTK.  I'll also update README.html with some Python
information.

Hopefully this will cover VTK-Python for the 4.2 release.

cheers,
prabhu



More information about the vtk-developers mailing list