Re: [Paste] Can't start pylons app
On 8/16/07, Cliff Wells [EMAIL PROTECTED] wrote: On Wed, 2007-08-15 at 19:15 +0200, Neil Blakey-Milner wrote: Or, even better, use virtual-python or workingenv, and never install moving targets into your core Python library location. Out of curiosity, what does workingenv offer over the standard setuptools way of doing things? http://peak.telecommunity.com/DevCenter/EasyInstall#administrator-installation I use virtual-python, but workingenv works similarly enough, so I'll just answer as per virtual-python. Basically, I maintain a project directory per separate application that runs on a server. At work, I have projectA (a Django server), projectB (a port of that application to TurboGears), and projectC (a new TurboGears project). In development, each one has a totally separate virtual-python environment. This environment is periodically cleared and restarted. The data in setup.py's install_requires is used to install all the packages that are necessary (using dependency_links to use a common local storage location for both third-party and our own packages) for that, so we can be sure that when we go live, we'll have all the packages and versions of them necessary to run. On live, we actually have two totally separate virtual-python environments. Basically, it's the current live running environment, and the previous live environment. When we install a new (major) version, we create a new environment and install the egg package produced by our project, which then fetches all its dependencies. We then shut down the running live environment, back up the database, run the database upgrade scripts, and start up the new live environment. We then run tests, and if all goes well, we move forward with this environment. If things don't work well, we restore the database, and start up the previous live environment. Using workingenv or virtual-python means being able to create these in any location, with any user, and generally be flexible about it. workingenv also has some additional useful functionality - but I just found virtual-python first, and the additional functionality in workingenv is dealt with in my egg package installs anyway. Also, generally our live environments are installed with one user, and run with another user (who can't change the code/resources). The user installation wouldn't work in this scenario. Neil -- Neil Blakey-Milner http://nxsy.org/ [EMAIL PROTECTED] --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups pylons-discuss group. To post to this group, send email to pylons-discuss@googlegroups.com 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 -~--~~~~--~~--~--~---
Re: [Paste] Can't start pylons app
On 8/15/07, Christoph Haas [EMAIL PROTECTED] wrote: Morale: never install eggs on a Debian-based system. Use workingenv when trying out a new version of Pylons, so that you can delete the entire environment easily. It's also great for developing an application and trying them out under several different version scenarios. You can also use it in production by running 'activate' in a wrapper shell script (or init.d script in some distros), or otherwise setting the PYTHONPATH and PATH to point into the workingenv for that application. If you want to install eggs systemwide and you aren't convinced by Christoph's dire prophetic warnings, *don't* install into the /usr/lib/python2.5/site-packages your distro provides. That's for your distro's packages. Install under /usr/local/lib instead, or ~/lib. Debian/Ubuntu automatically search for packages in /usr/local/lib/python2.5/site-packages. Macintosh has another directory for local Python packages. But that doesn't help the fact that easy_install installs into /usr/lib by default. So you have to tell it to install packages elsewhere. The instructions are in http://peak.telecommunity.com/DevCenter/EasyInstall#custom-installation-locations (That's EasyInstall's home page.) You can do a straight Administrator installation and that will give each user their own Python library in their home directory. Setting it up in /usr/local requires a slight modification of the instructions: 1) Create a file /usr/lib/python2.5/site-packages/local,pth containing /usr/local/lib/python2.5/site-packages. (You can leave off the site-packages part or choose any other directory.) 2) Create a file /usr/lib/python2.5/distutils/distutils.cfg containing: [install] install_lib = /usr/local/lib/python2.5/site-packages install_scripts = /usr/local/bin [easy_install] site_dirs = /usr/local/lib/python2.5/site-packages zip_ok = 0 (zip_ok=0 forces all eggs to be installed as directories rather than zipfiles. I prefer that because it's easier to browse the source.) 3) Create the lib and bin directories if they don't exist. 4) Download the latest Setuptools from PyPI and run it as a shell script. http://pypi.python.org/pypi/setuptools/0.6c6. Now packages you easy_install will go into the local directory, and Debian/Ubuntu packages will go into the system site-packages (even if they're eggs). -- Mike Orr [EMAIL PROTECTED] --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups pylons-discuss group. To post to this group, send email to pylons-discuss@googlegroups.com 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 -~--~~~~--~~--~--~---
Re: [Paste] Can't start pylons app
On 8/15/07, Ian Bicking [EMAIL PROTECTED] wrote: Yeah; weird stuff with site-packages or easy-install.pth, perhaps? Doing python -c import pylons; print pylons.__file__ might help debug, and maybe if you install yolk it'll help explain stuff. For the (future) record and the next person that has this problem... it turned out that one of the boxes was sticking some eggs in /usr/lib/python2.4 and some in /usr/local/lib. I don't know what the order of precedence is, but it fouled things up for me. Probably an earlier misconfiguration with setuptools on my part. Thanks gang. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups pylons-discuss group. To post to this group, send email to pylons-discuss@googlegroups.com 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 -~--~~~~--~~--~--~---
Re: [Paste] Can't start pylons app
On Wed, Aug 15, 2007 at 09:02:22AM -0400, Matt Feifarek wrote: On 8/15/07, Ian Bicking [EMAIL PROTECTED] wrote: Yeah; weird stuff with site-packages or easy-install.pth, perhaps? Doing python -c import pylons; print pylons.__file__ might help debug, and maybe if you install yolk it'll help explain stuff. For the (future) record and the next person that has this problem... it turned out that one of the boxes was sticking some eggs in /usr/lib/python2.4 and some in /usr/local/lib. I don't know what the order of precedence is, but it fouled things up for me. Probably an earlier misconfiguration with setuptools on my part. Morale: never install eggs on a Debian-based system. Christoph --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups pylons-discuss group. To post to this group, send email to pylons-discuss@googlegroups.com 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 -~--~~~~--~~--~--~---
Re: [Paste] Can't start pylons app
On 8/15/07, Neil Blakey-Milner [EMAIL PROTECTED] wrote: On 8/15/07, Christoph Haas [EMAIL PROTECTED] wrote: Morale: never install eggs on a Debian-based system. Or, even better, use virtual-python or workingenv, and never install moving targets into your core Python library location. Ok, I'll bite. Exactly how does one install Paste, PasteScript, PasteDeploy, Mako, Webhelpers, Nose, decorator, Buffet, Pylons, Routes, etc. etc. etc. on a Debian-based system? Obviously, these packages are not in repositories. Virtual-python and workingenv are not part of the install instructions, so I didn't think that they were considered best practices. I'll look them up, but having even more layers between me and python is never my first instinct to solve problems. And, setuptools puts eggs into /usr/lib/ by default. Again, I suppose I figured that was best practices. Thanks for the tips. I'll try and follow them in the future. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups pylons-discuss group. To post to this group, send email to pylons-discuss@googlegroups.com 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 -~--~~~~--~~--~--~---
Re: [Paste] Can't start pylons app
On Wed, Aug 15, 2007 at 02:19:14PM -0400, Matt Feifarek wrote: On 8/15/07, Neil Blakey-Milner [EMAIL PROTECTED] wrote: On 8/15/07, Christoph Haas [EMAIL PROTECTED] wrote: Morale: never install eggs on a Debian-based system. Or, even better, use virtual-python or workingenv, and never install moving targets into your core Python library location. Ok, I'll bite. Exactly how does one install Paste, PasteScript, PasteDeploy, Mako, Webhelpers, Nose, decorator, Buffet, Pylons, Routes, etc. etc. etc. on a Debian-based system? Obviously, these packages are not in repositories. Where did you look? Of course they are. They might not be in Etch because during that time no proper packages existed. But they are certainly in Lenny. And if you need these packages in non-outdated version you wouldn't use Etch anyway. The package names are: - python-paste - python-pastescript - python-pastedeploy - python-mako - python-webhelpers - python-nose - python-decorator - python-pylons - python-routes - python-sqlalchemy All these packages are up-to-date AFAICT. Pylons may not be rc2 but certainly the 0.9.5 version. I have an rc2 package ready if you are interested. Virtual-python and workingenv are not part of the install instructions, so I didn't think that they were considered best practices. I'll look them up, but having even more layers between me and python is never my first instinct to solve problems. They seem to be used by people who prefer the setuptools/ez_setup way. I didn't really get friends with that approach. I'd rather spend an hour to create a Debian package from a Python module. But that's just me. :) I can't stand having software installed that apt doesn't know about. And, setuptools puts eggs into /usr/lib/ by default. Again, I suppose I figured that was best practices. Installing eggs system-wide is suicidal. Your system will quickly become ready for reinstallation. Cheers Christoph --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups pylons-discuss group. To post to this group, send email to pylons-discuss@googlegroups.com 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 -~--~~~~--~~--~--~---
Re: [Paste] Can't start pylons app
Matt Feifarek wrote: On 8/15/07, *Neil Blakey-Milner* [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: On 8/15/07, Christoph Haas [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: Morale: never install eggs on a Debian-based system. Or, even better, use virtual-python or workingenv, and never install moving targets into your core Python library location. Ok, I'll bite. Exactly how does one install Paste, PasteScript, PasteDeploy, Mako, Webhelpers, Nose, decorator, Buffet, Pylons, Routes, etc. etc. etc. on a Debian-based system? Obviously, these packages are not in repositories. Virtual-python and workingenv are not part of the install instructions, so I didn't think that they were considered best practices. I'll look them up, but having even more layers between me and python is never my first instinct to solve problems. And, setuptools puts eggs into /usr/lib/ by default. Again, I suppose I figured that was best practices. It inherits that from distutils. distutils gets that potentially from /usr/lib/distutils/distutils.cfg, but none of the *distributions* choose to put any settings there. That's there choice not to support developers doing what they themselves say developers should do -- it's not not Python's fault, it's the distributions. In part this is because distributions have entirely different motivations and needs than developers, and it's best to just setup parallel environments. Anyway, I guess it's a documentation bug; using an isolation environment like virtual-python, workingenv, or zc.buildout is really important for any Python web developer. It save a lot of headaches, and keeps development cleanly separated from distributions. -- Ian Bicking : [EMAIL PROTECTED] : http://blog.ianbicking.org : Write code, do good : http://topp.openplans.org/careers --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups pylons-discuss group. To post to this group, send email to pylons-discuss@googlegroups.com 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 -~--~~~~--~~--~--~---
Re: [Paste] Can't start pylons app
On Wed, 2007-08-15 at 19:15 +0200, Neil Blakey-Milner wrote: Or, even better, use virtual-python or workingenv, and never install moving targets into your core Python library location. Out of curiosity, what does workingenv offer over the standard setuptools way of doing things? http://peak.telecommunity.com/DevCenter/EasyInstall#administrator-installation Cliff --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups pylons-discuss group. To post to this group, send email to pylons-discuss@googlegroups.com 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 -~--~~~~--~~--~--~---
Re: [Paste] Can't start pylons app
Cliff Wells wrote: On Wed, 2007-08-15 at 19:15 +0200, Neil Blakey-Milner wrote: Or, even better, use virtual-python or workingenv, and never install moving targets into your core Python library location. Out of curiosity, what does workingenv offer over the standard setuptools way of doing things? http://peak.telecommunity.com/DevCenter/EasyInstall#administrator-installation It's a lot closer to virtual-python. It works on Windows, unlike virtual-python; though frankly workingenv can be a bit fragile, mostly due to the monkeypatches of Setuptools. I've tried to figure out a way to avoid those monkeypatches, but I've had a hard time. You can also have multiple independent workingenvs easily; it's not user-specific. We run a workingenv for every independent service, with no shared packages (that is, as long as two applications are already going to run in separate processes, we don't share libraries between them). It's easy to make scratch environments as well. workingenv also has some bootstrapping abilities, for setting up complete environments with a single command or updating environments. -- Ian Bicking : [EMAIL PROTECTED] : http://blog.ianbicking.org : Write code, do good : http://topp.openplans.org/careers --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups pylons-discuss group. To post to this group, send email to pylons-discuss@googlegroups.com 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 -~--~~~~--~~--~--~---
Re: [Paste] Can't start pylons app
Matt Feifarek wrote: Interesting followup: running paster create -t pylons_minimal foo on both boxes yields different results... a recursive diff finds all kinds of things different. Looks like my eggs are not properly installed, or how else could I be getting different app skeletons from the same command? Yeah; weird stuff with site-packages or easy-install.pth, perhaps? Doing python -c import pylons; print pylons.__file__ might help debug, and maybe if you install yolk it'll help explain stuff. -- Ian Bicking : [EMAIL PROTECTED] : http://blog.ianbicking.org : Write code, do good : http://topp.openplans.org/careers --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups pylons-discuss group. To post to this group, send email to pylons-discuss@googlegroups.com 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 -~--~~~~--~~--~--~---