[visionegg] non-standard VisionEgg locations patch

Hi everybody,

In my quest to setup VisionEgg to my liking (and in making all of my myriad different versions of python co-existing happily), I've decided to install all of the necessary modules to make VisionEgg run under the /User/Shared hierarchy. This was predicated off of the recent posts regarding the Panther/Tiger fixes using *.pth files. Thus my files live under /Users/Shared/Library/Python/2.3/ inside the usual bin, include, and lib. I decided to do this so that I wouldn't muck up the System installation (although I *did* have to install pyopengl using the binary installer, since it's a pain in the arse to compile from scratch).

To make a long story short, doing this caused one problem with VisionEgg. VisionEgg/Configuration.py assumes that the VisionEgg system directory lives under sys.prefix, which is not the case in my setup. To fix this, I decided to use an environment variable, a la VISIONEGG_CONFIG_FILE. It checks the environment to see if a variable named VISIONEGG_SYSTEM_DIR exists, if so, it uses that as the system directory; otherwise, it defaults to the previous behaviour.

The CVS diff is at the end of this e-mail.

nick


Index: src/Configuration.py
===================================================================
RCS file: /cvsroot/visionegg/visionegg/src/Configuration.py,v
retrieving revision 1.43
diff -r1.43 Configuration.py
109c109,113
< self.VISIONEGG_SYSTEM_DIR = os.path.join (sys.prefix,"VisionEgg")
---
> # non-standard VisionEgg installations
> try:
> self.VISIONEGG_SYSTEM_DIR = os.environ ['VISIONEGG_SYSTEM_DIR']
> except KeyError:
> self.VISIONEGG_SYSTEM_DIR = os.path.join (sys.prefix,"VisionEgg")
======================================
The Vision Egg mailing list
Archives: http://www.freelists.org/archives/visionegg
Website: http://www.visionegg.org/mailinglist.html

Other related posts: