[CentralOH] How do .eggs work in search paths?

Kurtis Mullins kurtis.mullins at gmail.com
Wed Dec 5 13:38:48 CET 2012


I don't use Apache; I use nginx, but I wonder if it's possible to simply
use a Virtual Environment with Apache? That's what I do with uWSGI. It
makes it a lot easier because you can simply create a requirements.txt file
and easily re-deploy or upgrade your environment as needed.


On Wed, Dec 5, 2012 at 7:10 AM, Neil Ludban <nludban at columbus.rr.com> wrote:

>
> See if this works:
>
> import site
> site.addsitedir('/srv/website/www/site-packages')
>
>
> http://docs.python.org/2/library/site.html
>
>
> On Tue, 4 Dec 2012 22:08:24 -0500
> Joshua Kramer <joskra42.list at gmail.com> wrote:
> > Hello,
> >
> > I have a basic question.  I am trying to put Mezzanine under Apache using
> > wsgi.  In order to not clutter up the system site-packages directory, I
> > have a directory like so:
> >
> > /srv/website/www/site-packages
> >
> > Under this site-packages are a number of packages provided by Mezzanine:
> >
> > bleach-1.1.5-py2.6.egg
> > filebrowser_safe-0.2.12-py2.6.egg
> > Mezzanine-1.2.4-py2.6.egg
> > pytz-2012h-py2.6.egg
> > Django-1.4.2-py2.6.egg
> > grappelli_safe-0.2.10-py2.6.egg
> > Pillow-1.7.8-py2.6-linux-x86_64.egg
> > setuptools-0.6c11-py2.6.egg
> > easy-install.pth
> > html5lib-0.95-py2.6.egg
> > pip-1.1-py2.6.egg
> > setuptools.pth
> >
> > The eggs are really directories themselves, and under each .egg lies the
> > module.  So for example, under Mezzanine-1.2.4-py2.6.egg, there's a
> > 'mezzanine' directory.
> >
> > In the wsgi launcher, I have a call like this:
> >
> > sys.path.append('/srv/website/www/site-packages')
> >
> > This appears to not be working, as Apache can't find any of the modules
> > under that site-packages directory that are within the eggs.
> >
> > Is there a cleaner or more elegant way to get to where I want to be?
> >
> > Thanks!
> > -JK
> _______________________________________________
> CentralOH mailing list
> CentralOH at python.org
> http://mail.python.org/mailman/listinfo/centraloh
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/centraloh/attachments/20121205/1ccdac95/attachment.html>


More information about the CentralOH mailing list