Installing DC Packages Using Setuptools

setuptools is a python library facilitating
the distribution of python modules to systems lacking a real
package manager or systems the modules have not been packaged for.
For our packages, you should use the apt-based method
if you can. If you cannot, read on.

To use setuptools, you first need to have python installed;
GAVO's python tools usually require the python version current in Debian
stable, which is 2.5 in 2010. Then,,install the setuptools themselves.
We don't do that automatically any more since this automagic turned out
to be more trouble than it's worth. Thus, if setuptools is not already
installed on your system, first follow the setuptools
installation instructions.

To install a package using setuptools, get the tarball as pointed
to from the child pages of our distribution page, unpack it
(e.g., using tar xvzf), go into the directory you just created
and say sudo setup.py install.
If you cannot become root on your system or would prefer not to do so,
refer to user installation.

Setuptools contains a simple
package management. It may therefore (and in all likelihood will) pull in
dependencies, which means it generally needs network connectivity.
A downside this automagic is that setuptool's dependency management
tends to ignore packages already installed by other package managers (in
particular those of the distribution in use). This could be
particularly nasty for a package like numpy, since you then could have
two different versions of the same package on your system, which in turn
might lead to confusing behavior (we told you you should use the APT
method...). To avoid this clobbering of installed packages, use
sudo python setup.py install
--single-version-externally-managed. However, you will need to
manually install the dependencies then.

User Installation

If you cannot become root on your system or would prefer not to do so,
you can still install our packages. The virtual
python documentation
has the gory details. However, in short, the following recipe should work
on Bourne-derived shells:

cd # go to your home
mkdir vpython # make a root for your private python installation
# get a nifty script that sets your private python up
# run the thing
wget http://soft.g-vo.org/virtualenv.py
python virtualenv.py ~/vpython
# fix the path -- you may want to add this to your startup scripts
# later
export PATH=~/vpython/bin:$PATH
hash -r # make the shell forget the location of the system python
cd pkgdir # i.e. python-votable, or whatever
python setup.py install # no sudo necessary any more

As stated in the comment above, you will want to add the line with
"export" above to your .bashrc or .profile.

On OS X, it seems the python shipped by the vendor doesn't really
support being virtualized like this. Any hints by OS X experts are
welcome.