[Zope] Re: Using eggs in a Zope instance

Tres Seaver tseaver at palladion.com
Thu Aug 10 10:06:58 EDT 2006


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Anton Stonor wrote:
> Python eggs are fun and powerful. However, there is one thing I can't
> get right when using them for Zope projects:
> 
> Sometimes I would like eggs to live in $INSTANCE/lib/python instead of
> site-packages. E.g. if different instances needs different versions of a
> package.
> 
> However, easy_install won't install them there, because
> $INSTANCE/lib/python is not in the PYTHONPATH.
> 
> And I don't want to extend PYTHONPATH to include all my
> $INSTANCE/lib/python's -- that would prevent the different version pr.
> instance approach.
> 
> How does you egg front runners deal with this?

Because you know that $INSTANCE_HOME/lib/python will be on $PYTHONPATH
when Zope is running, you can safely "trick" easy_install by setting the
environment value only while running it, e.g.:

  $ PYTHONPATH="`pwd`/lib/python" /path/to/easy_install <arguments>

> I'm on Windows if that matters.

I don't remember my 'cmd.exe'-fu at this point:  you might need to call
'set PYTHONPATH=Z:\path\to\instance\lib\python' at the command line
before invoking easy_install.


Tres.
- --
===================================================================
Tres Seaver          +1 202-558-7113          tseaver at palladion.com
Palladion Software   "Excellence by Design"    http://palladion.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFE2z2C+gerLs4ltQ4RAqRhAKCxQyyJBMWlyVlXZC1AfocyXJFh5ACeID0+
qwydQjsQIAkA4j7V7ffBacY=
=1dq9
-----END PGP SIGNATURE-----



More information about the Zope mailing list