Version 10 (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 in the installation instructions?. 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 a development 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/work
  2. Check out the Vespa source code:
    svn co  /home/me/work/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    /home/me/work/vespa/sample_data

You're ready to start hacking!

Running Vespa Applications

To run any of the apps, type

python /home/me/work/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 read this note about installing wxGlade properly.

All wxGlade Users

Make sure you read this note about configuring wxGlade to use our custom controls, regardless of what platform you are using.

Note that the technical documentation has a whole section on wx-related topics, including tips, bugs and quirks.

Database Modifications

Editing the database is described in ChangingTheDatabaseStructure.