Quick version: If you are working with Google App Engine or
considering it, please visit and "star" this bug report. More below.
http://code.google.com/p/googleappengine/issues/detail?id=2272

On Oct 15, 2:01 pm, Matt Feifarek <[email protected]> wrote:
> > When you install them with pip, I think they overlap (i.e. one paste/
> > directory in site-packages/).
>
> Yes, that's true, but I don't understand why moving those directories from
> one site-packages to another should matter. I can't find whatever cruft is
> telling python to look in that and only that sys.path location for paste.

I just did a fresh pip install of Pylons and looked over the Paste
stuff, and it looks like there is a .pth file that comes with each
Paste package (ending with the string "nspkg.pth") that contains
executable Python (!) (I didn't know pth files could have code in
them) that jiggles with the path. Weird stuff. Anyway, it wouldn't
work without those pth files, or, as you noted, simply adding an
__init__.py to paste/

> >  Interesting. Maybe that step could be eliminated. I think I was
> > getting DistributionNotFound from pkg_resources and figured that it
> > would be better to work around eggs/the egg loader.
>
> I think I got around that by dropping an empty __init__.py file into paste/

I don't know why yours works, but I now know why mine didn't work.

GAE's os.path.exists() pretends that a directory that (a) ends in
".egg-info" and (b) is NOT located in the deployment root, i.e. is a
subdirectory, does not exist. Naturally, this screws around with the
default paster create template, which has an .egg-info directory in
it, and anything installed using pip, which uses .egg-info
directories. EGG-INFO directories are unaffected.

With this knowledge I got a stock app working without patching Paste
Deploy, and without changing the INI file, in several different ways.
The "best" way so far is to rename the outer myapp directory to
myapp.egg and rename the inner myapp.egg-info directory to EGG-INFO.
You can also leave the app template as-is and install it inside the
virtualenv with easy_install, but you'd have to do this every time you
make a change.

I have filed a bug in the GAE issue tracker about this. Please visit
this page and add a star to encourage getting this fixed/changed:
http://code.google.com/p/googleappengine/issues/detail?id=2272

Jason

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to