On Thu, Oct 8, 2009 at 3:03 AM, Mike Orr <[email protected]> wrote: > > > Also, I probably have some terminology wrong: I'm not sure what the meta > > files like MANIFEST.in and ez_setup.py actually are... are they egg > files? > > Paster files? Setuptools? I don't know what to properly call them when I > > talk about deleting them. > > The egg-info directory contains package metadata. These are necessary > because Paste uses various runtime services provided by Setuptools, > which depend on the metadata for package introspection and entry > points. >
Also if you want to update packages, or install a new package and make use of your existing installed dependencies, you'll want those egg-info directories that describe the packages. If you don't use setuptools at runtime (which you don't have to) then you can skip uploading them to the server via skip_files in app.yaml. > ez_setup.py is unnecessary, and I think MANIFEST.in is too. > ez_setup.py is a script that downloads and installs Setuptools. It's > customary to include it in packages whose setup.py depend on > Setuptoos, as Pylons applications do. MANIFEST.in is used by setup.py > to build the egg-info metadata. Neither of these are needed on the > server, which never installs anything. Correct; I have in the past basically flattened things for appengine. Unfortunately that doesn't work well with paster create -t pylons. It might however be more productive to have an appengine template, since you already know what the models will have to look like, you can skip setup.py etc., and generally make a tighter setup. > > > Some questions that I still have and can't answer: > > > > 1. Can one delete the *.egg-info directories in the "app/lib" portion of > a > > GAE tree, or does that metadata get used in the standard operating of > python > > (one of the reasons I HATE all of this packaging stuff; we have "webob" > just > > where it's supposed to be, then the cruft "WebOb-0.9.6.1-py2.5.egg-info" > > (which is NOT a package) right next to it. But I digress... > > The metadata has to go somewhere, and there are two standard locations > for it in Python. easy_install does it one way, and pip does it the > other way. Pip's way has just one directory on sys.path, like in the > olden days. Easy_install's way puts every friggin' package directory > on sys.path using *.pth files. Besides being ugly, this is one more > point of failure if the path doesn't get set right. As has happened > to me before on App Engine, when it ignored *.pth files sometimes. > > I wish Paste did not depend on Setuptools and entry points, but it > does, and we're not going to get away from that until we write another > framework. (Which the Pype framework might be someday.) Paste doesn't really depend on Setuptools. Paste Deploy does, with its configuration files. But you don't have to use them. The way I believe I have it setup with appengine-homedir is that it invokes the make_app function directly. So at runtime (i.e., in the appengine environment) you don't need Setuptools or egg-info files (or ini files). The justification being that you don't really configure appengine apps, as they are all essentially one-off. This isn't entirely true, but... eh. You need a new app.yaml for each instance, so appengine defies the simplest configuration anyway. > > 2. There are still files in an "appengine-homedir" from monkey: > > ./app/lib/python/appengine_monkey_files. I don't know what they're for > (if > > anything). I removed them in my experimentation, seems ok so far. > > Those are probably things I missed when I was deleting the monkey code. > > > 3. Much of anything about zipped / unzipped packages. > > Google raised the quotas significantly after we bitched long enough > about it. I think it's 3000 files now, which is enough for a > good-sized Pylons application wiithout zipping. Before it was 1000 > files, which just barely fit Pylons. The issue of course is that no > other runtime environment imposes a file quantity restriction, so the > packages were not designed to economize files. And more than half of > Pylons and Routes is backward compatibility code, which is needed now > but will be gone by Pylons 1.0. > You should be able to use the command "pip zip package" to zip a package (not a Distribution, but a package -- i.e., the thing you import). So if you need to zip, you can. pip zip can also count files, to help suggest what you might zip. appengine-monkey also came with a script to analyze skip_files and help you decide how to skip files, or why a file is skipped. -- Ian Bicking | http://blog.ianbicking.org | http://topplabs.org/civichacker --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
