[BioPython] development question
Peter
biopython at maubp.freeserve.co.uk
Thu Aug 28 09:53:18 UTC 2008
On Thu, Aug 28, 2008 at 9:06 AM, Pavel SRB <srbanator at heckler-koch.cz> wrote:
> hi all, please i have a question about your development settings.
>
> example: at my work we keep all code in svn repository. Each developer
> checkout the code, work on it, after every code edit i restart my
> apache-prefork and then see the results in browser, log or whatever.
Biopython currently uses CVS, but we will hopefully be transitioning
to SVN shortly (most of the other Bio* projects have already moved
over).
> so now to biopython. On my system i have biopython from debian repository
> via apt-get. But i would like to have second version of biopython in system
> just to check, log and change the code to learn more. This can be done with
> removing sys.path.remove("/var/lib/python-support/python2.5")
> and importing Bio from some other development directory. But this way i
> loose all modules in direcotory mentioned above and i believe it can be done
> more clearly
>
> so how you are coding your biopython?
Since you asked about Debian, I'll talk about my Linux machine which
is currently running Ubuntu Dapper Drake (which I know is overdue for
an update, but it works fine for me). The official Biopython packages
were too out of date for me, so I uninstalled them and instead stay up
to date with CVS which I install that under my home directory using
"python setup.py install --prefix=/home/maubp".
Then, to make sure my python packages (installed in my home directory)
get priority over the system level packages, I set the PYTHONPATH
envirnment variable. As I use bash, I just added this to my .bashrc
file:
# Tell Python about my locally installed Python Modules:
export PYTHONPATH="/home/maubp/lib/python2.4/site-packages"
(Getting IDLE to use my local packages is harder - I have a hack
solution but its not very nice)
Alternatively, in any individual python script you can do "import sys"
and then manipulate sys.path before doing any "import Bio" statements.
If you want to have both the Debian (old) Biopython and the latest CVS
Biopython, I suggest you use apt-get or equivalent to install the
official Debian Biopython AND install CVS biopython from source in
your home directory (using something like "python setup.py
--prefix=/home/pavel" according to your user name). You can then
change your python path environment variable to switch between the two
installations.
However, having both an old and a new Biopython could be very
confusing - so I personally wanted to avoid this.
Peter
More information about the Biopython
mailing list