Version 2 (modified by flip, 10 years ago) (diff)


Developer Setup

This explains what you need to set up Vespa if you want to make changes to the code, GUI and/or database. It assumes you know a bit about Python, the command line, how to use SVN, etc.


Prerequisites are described on the page Dependencies?. You can skip the prerequisites if all you want to do is look at the code (or run the depcheck feature of described below). But in order to run Vespa, you need to satisfy all of the prerequisites.

In addition, you also need a Subversion client.

When working out your dependencies, you might find [SetupPy#depcheck the `depcheck` command of Vespa's `` useful].

If you've already installed Vespa the "normal" way on your machine, you need to uninstall it before creating developement setup. (If you don't, you'll have two copies of the Vespa code on your machine and both you and Python will get very confused as to which set of code is executing.) To uninstall, follow [SetupPy#UninstallingorUnwindingaBrokenInstall the uninstall instructions]. Removing the data directory is optional.

Getting the Source Code from SVN

  1. Decide where your source tree is going to live. For this example, I'm going to install in /home/me/w (w == work).
  2. Check out the Vespa source code:
    svn co  vespa
  3. Find your Python's site-packages directory (or dist-packages if you're running Ubuntu with Python > 2.5) and add a plain text file called vespa.pth that contains the fully-qualified path to your vespa directory. Here's the contents of vespa.pth for this example --
    This command should tell you where site-packages resides:
    python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()"
  4. Optional: You might want some sample data with which to work. For now, that's in a separate Subversion repository from vespa. Vespa doesn't care where these files live on your local hard drive, so you can put this directory anywhere you like. In this example, I'm going to leave it under vespa.
    svn co    sample_data

You're ready to start hacking!

Running Vespa Applications

To run any of the apps, type

python /home/me/w/vespa/NAME_OF_APP/src/

where NAME_OF_APP is one of rfpulse, simulation or analysis.

User Interface Modifications (wxPython and wxGlade)

If you want to modify the GUI, you'll also need to install wxGlade.

wxGlade on Windows

If you're a Windows user, be sure to [wx:wiki:InstallingWxGladeUnderWindows read this note about installing wxGlade properly].

All wxGlade Users

Make sure you [wx:wiki:WxGladeCustomControls read this note about configuring wxGlade] to use our custom controls, regardless of what platform you are using.

Also check our "wx" wiki page at this location: including the section entitled, "TipsBugsAndQuirks".

Database Modifications

Editing the database is described in ChangingTheDatabaseStructure.