Some cracks have started to appear in Pylons' documentation and
support scripts, so I thought I'd better mention them for people like
Jonathan that are maintaining Pylons programs or writing new ones.
The "go-pylons.py" script was lost in the transition from the old
Pylons sever to the Pyramid server. You can still find an old version
on Google, but it won't work because it tries to download the packages
from a directory that no longer exists on a server whose domain name
has changed. Fortunately, it's pretty easy to do the equivalent
manually:
1) Download "virtualenv" manually from PyPI.
2) Inside it you'll find a "virtualenv.py" script.
3) Run "virtualenv.py NEW_DIRECTORY_NAME". It will install a
virtual Python and Distribute.
4) Activate the virtualenv per the instructions on PyPI. ("source
NEW_DIRECTORY_NAME/bin/activate" on Unix, or run a .bat script on
Windows.)
5) Install Pylons: "pip install Pylons".
6) If you've already written your application, cd into it and
install it via "pip install -e ." . In this case, you can skip step 5
because it will automatically install Pylons as a dependency.
7) When you're finished using the virtualenv, deactivate it by
running "deactivate". (Maybe a .bat script on Windows?)
The links from some Pylons docs to third-party docs have broken. The
one I notice most is WebHelpers, which is my fault because I need to
square away its online docs and haven't yet. In the meantime the docs
are under a temporary URL
http://sluggo.scrapping.cc/python/WebHelpers/ .
If you're using the Pylons 1 series, you should be using Pylons 1.0.1,
which was released in August. It's updated for compatibility changes
in Paste, PasteDeploy, and WebOb 1.2. It also has several other small
fixes and enhancements that had accumulated since 1.0.
I'm also supporting Pylons 1 and -- eek! -- Pylons 0.9.7 applications,
because my organization has insufficient developer time to convert
them to Pyramid as fast as I'd wish. It's easier for me because I've
been with Pylons a long time so I remember when the changes were made.
But the fact remains that Pylons 1 is now 2 1/2 years old, its old
maintainers aren't focusing on it as much as they used to, and cracks
have started to appear. The cracks will doubtlessly get wider over
time. So it would be prudent to:
- Switch to Pyramid when feasable. It has better support and more
thorough documentation.
- Make a "requirements" file listing the versions of dependencies that
are known to work with your application. That way, if a dependency
makes an incompatible change in the future, you won't be stuck until
Pylons is patched. (Run "pip freeze >requirements.txt" to make a
requirements file, then optionally delete any lines that are not
critical to your application.)
- Set up a Pip "download cache", which will copy packages to a
designated directory as they are downloaded, and later install them
from that directory rather than downloading them again. That way,
you'll have a copy of all required packages in their compatible
versions. (Make a directory "~/.pip" containing a file "pip.conf" in
INI format, with an "[install]" section containing "download-cache
~/.pip/download_cache").
- Consider setting up a caching PyPI mirror. This will avoid the need
to go to the network to check current versions of packages when
installing. (I haven't done this part but there are blog articles
about it.)
--
Mike Orr <
slugg...@gmail.com>