First, let me apologize. Yesterday was a really rough day. By the time I got home from work, I found myself doing pretty much nothing for anything. Today was better, in that I'm replying, but still a pretty rough day.
On Wed, Mar 2, 2011 at 11:43 PM, ozwyzard <[email protected]> wrote: > How do I "RUN" myapp on the deployment machine? I realize it needs a > development.ini or production.ini. But, do I need to create a new > application that wraps around the egg file? Do I need to distribute > egg-info files? Are EGG files just for plugins (as opposed to entire > apps)? > This is the meat of the question, and the part that takes the most time to answer well. egg files are platform specific distribution files. Note that, in this case, your platform is actually your Python version and (broadly speaking) OS. OSX is one OS, Win32 and Win64 are two others, and Linux (and most UNIXes) comprise a third platform, most of the time. It gets a bit dicier when you have binary extensions (such as .so or .dll files), and the OS becomes, by necessity, more specific. For instance, a FreeBSD binary will be different from a Linux binary. As such, most of the time, it is recommended that you actually distribute via a source distribution (and I have just now noticed that that page recommends bdist_egg, so now there's another note on my todo list). A source distribution will let anybody install much more easily. To do a source distribution, you would change the command line from this: python setup.py bdist_egg upload to this: python setup.py sdist upload Now, a separate question that you have asked: What's in the .egg file? Simply put, everything. Every .py file, every .pyd, every .so, everything you specify in your manifest, everything. As such, with a properly defined .egg file, you don't need to install anything else. You just have to provide a production.ini file. You'll run the app in the exact same way as you already have. "paster serve my.ini" Depending on your needs and wants, this may be sufficient. If it is not, you can work through the steps to get mod_wsgi working under Apache, or get WSGI under lighttpd, or nginx. All of these are viable options, with varying degrees of difficulty and of documentation. As to what to distribute, that depends on how you distribute it. If it's for public consumption, chances are you will just go with the "python setup.py sdist upload" mechanism. If it's for private distribution (such as within your company), you'll want to make your own pypi. To do so, check out basketweaver. You can also use basketweaver to make a self-maintained pypi, and use that to distribute to the public. I think that covers all of it. I hope so. Please do ask whatever I left as too much of a mystery. When I run 'paster serve development.ini' within the new virtual env > it looks for various subdirectories (such as myapp.egg/controllers/... > etc which it does not find). > This sounds like you do not have zip_safe set to False. Re-read http://turbogears.org/2.1/docs/main/Deployment/DeployWithAnEgg.html#adding-requirementsand make sure that zip_safe reads False. -- Michael J. Pedersen My IM IDs: Jabber/[email protected], ICQ/103345809, AIM/pedermj022171 Yahoo/pedermj2002, MSN/[email protected] -- You received this message because you are subscribed to the Google Groups "TurboGears" 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/turbogears?hl=en.

