Steve Richardson edited this page Jul 17, 2014 · 2 revisions

Getting Started with Veusz Development

The following instructions assume a computer running Ubuntu (tested on 12.04). Generally speaking, development of Python based applications is best done from with a "virtualenv sandbox" to avoid messing around with the system Python installation. These instructions walk through the process of creating such a sandbox, cloning the latest Veusz from !GitHub and installing it into the sandbox.


Firstly, we require the virutalenv package itself, and several development packages (my apologies if I miss any pre-requisites here -- I probably will as I've got a lot of dev stuff on my machine already and it's quite hard to keep track of it all - if you find any packages missing, please add them!):

~$ sudo apt-get install python-virtualenv python-dev python-qt4 python-qt4-dev python-sip python-sip-dev build-essential gfortran git

Next, construct a virtualenv. Modern versions of virtualenv don't require the --no-site-packages option as it's the default, but it's included here just in case someone attempts to use these instructions with an older version:

~$ virtualenv --no-site-packages sandbox
~$ source sandbox/bin/activate

Because the virtualenv has no access to site packages we now need to install Veusz's pre-requisites within the sandbox (everything excepy numpy is optional, and ipython isn't a requirement of veusz at all - I simply include it as it's a common aid to development):

(sandbox)~$ pip install numpy astropy sampy pyfits ipython

Now to install SIP and !PyQt4 in the virtualenv. Unfortunately, the scripts for these packages won't run by default from the easy_install/pip environments so we'll need to fix them up afterward. Firstly, run the following two installation statements -- '''they will fail, but ignore that for now''':

(sandbox)~$ pip install SIP
(sandbox)~$ pip install PyQt

To fix the installations (note: the make portions will take a ''long'' time):

(sandbox)~$ cd sandbox/build/SIP
(sandbox)~/sandbox/build/SIP$ python -e ../../local/include/SIP
(sandbox)~/sandbox/build/SIP$ make
(sandbox)~/sandbox/build/SIP$ make install
(sandbox)~/sandbox/build/SIP$ cd
(sandbox)~$ cd sandbox/build/PyQt
(sandbox)~/sandbox/build/PyQt$ python --no-designer-plugin
(sandbox)~/sandbox/build/PyQt$ make
(sandbox)~/sandbox/build/PyQt$ make install
(sandbox)~/sandbox/build/PyQt$ cd
(sandbox)~$ rm -fr sandbox/build # this is optional


Now we clone the latest version of Veusz from, and install it into the virtualenv sandbox we created above:

(sandbox)~$ git clone
(sandbox)~$ cd veusz
(sandbox)~/veusz$ python install

At this point you should be able to launch the sandboxed copy of veusz using:

(sandbox)~/veusz$ veusz

To deactivate the virtualenv sandbox and return to using the system's Python installation, simply:

(sandbox)~$ deactivate

Pulling Changes

At some point in the future you will likely wish to pull in changes from the master repository. To do so from within your home directory:

~$ source sandbox/bin/activate
(sandbox)~$ cd veusz
(sandbox)~/veusz$ git pull
(sandbox)~/veusz$ python install

The last step isn't strictly necessary, but if the Veusz is updated in future to include additional requirements it might pull those in automatically.

Removing Everything

Should you wish to remove everything created above and start from scratch, it's easy (this is one of the major advantages of working in a virtualenv sandbox):

~$ rm -fr sandbox/ veusz/
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.