Using eggs in a Zope instance
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? I'm on Windows if that matters. /Anton
Can you not just copy the egg file to $INSTANCE/lib/python? - C On Aug 10, 2006, at 4:41 AM, 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?
I'm on Windows if that matters.
/Anton
_______________________________________________ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
-----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@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-----
participants (3)
-
Anton Stonor -
Chris McDonough -
Tres Seaver