Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have a trac install set up using fast-cgi on a server. I'm trying to install the bitten extension to it so I can do continuous integration - however the environment on which trac is running for some reason doesn't have ~/lib/pythonX.X/ in its python path - only /usr/lib/pythonX.X/ this is problematic since I can't install bitten with admin privileges (I don't have them).

What I'd like to do is change the pythonpath of trac so that it does search in ~/lib/pythonX.X/ but I can't figure out where to set or modify this. The trac install obviously doesn't read my .bash_profile so although I can set it there, that's no help.

Has anyone done this before, or can at least point me in the right direction?

share|improve this question
add comment

1 Answer 1

up vote 1 down vote accepted

Figured this out about ten minutes after posting the question (which was about two hours after starting to try to figure it out)

When dealing with trac as fastcgi, in your trac environment directory there is a file called index.fcgi. This file allows you to set environment variables for that particular trac install.

I simply added

export PYTHONPATH=${PYTHONPATH}:/home/username/lib/python2.4/site-packages

as the second line of that file, and things magically started working!

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.