Mayavi is part of the Enthought Tool Suite (ETS). Enthought has reorganized its SVN repository in order to break up the various parts of ETS into smaller chunks with a very clear set of dependencies. This should make it easy for people to get parts of ETS rather than have to get it all as part of ETS (which is quite huge). Ideally users will install released versions of ETS using prebuilt eggs or native packages (debs or rpms). However, if one wants to get the bleeding edge from SVN things can get messy. This is because mayavi depends on several other ETS packages and manually getting the right versions of each package from SVN can be a huge pain. In order to make life easier in this regard Dave Peterson has created a package called ETSProjectTools that let a user/developer checkout a particular package from ETS along with all its dependencies as well. Let us pick mayavi as an example to demonstrate how this works.
Say you want to get the latest, greatest version of mayavi. The current version that you should look to get would be the up and coming ets-2.7.0b1 release. The release isn't out yet but will be soon. Here is how you get it:
- Get hold of ETSProjectTools like so:
svn co https://svn.enthought.com/svn/enthought/ETSProjectTools/trunk ETSProjectTools
- Build and install it:
python setup.py install
- This will give you several new scripts that will let us checkout the sources etc. etsco, etsup, etsdevelop etc. More information on these is here https://svn.enthought.com/enthought/wiki/SVNScripts
- Now checkout ets==2.7.0b1 like so:
- Be patient, the above will checkout all of the ETS-2.7.0b1 (that is yet to be released).
- Now get the egg_builder script (this should soon be part of ETSProjectTools but isn't yet) like so:
svn cat https://svn.enthought.com/svn/enthought/sandbox/egg_builder.py > egg_builder.py
- Build the eggs for ets-2.7.0b1 (the command will build the eggs and put them in a "dist" directory under the current directory):
- Now install mayavi:
easy_install -f dist -H dist enthought.mayavi
python setup.py develop -f ../dist -H ../dist
This will install all the dependencies for mayavi as eggs and make an egg-link for mayavi alone so you can keep track of it via SVN.
If you want to keep track of every package you could always do:
This will do a setup.py develop in each and every subdirectory of ets_2.7.0b1.
Note that the ets* scripts only get the sources of other ETS packages and not everything else! Building ETS requires several other external packages like a compiler, swig, numpy, etc. For a complete list check the pages here:
The dependencies needed for Ubuntu Gutsy are listed in the ubuntu specific page for the last release (2.6.0b1).
As you can see, all the complexity of getting the ETS sources is made easy via etsco and the other scripts. In the future, as mayavi grows at its own pace, these tools will let us specify dependencies within ETS and thereby make it easier to cut new releases. This also makes it relatively easy to develop different branches that have entirely different dependencies.
Phew! That was a massive first blogspot post!
Nice post! One comment or potential change worth noting is that soon the 'etsco' et al will be refactored to be more like svn itself in that the commands will be 'ets co', 'ets develop', 'ets build', etc.
Post a Comment