With a working setuptools installation you can type:
easy_install -U py
to get the latest release of the py lib. The -U switch will trigger an upgrade if you already have an older version installed. On Linux systems you may need to execute the command as superuser and on Windows you might need to write down the full path to easy_install. The py lib and its tools are expected to work well on Linux, Windows and OSX, Python versions 2.3, 2.4, 2.5 and 2.6.
IMPORTANT NOTE: if you are using Windows and have 0.8 versions of the py lib on your system, please download and execute http://codespeak.net/svn/py/build/winpathclean.py This will check that no previous files are getting in the way. You can find out the py lib version with:
import py print py.version
To follow development or help with fixing things for the next release, checkout the complete code and documentation source with mercurial:
hg clone https://bitbucket.org/hpk42/py-trunk/
This currrently contains a 1.0.x branch and the default 'trunk' branch where mainline development takes place. There also is a readonly subversion checkout available:
svn co https://codespeak.net/svn/py/dist
You can also go to the python package index and download and unpack a TAR file:
http://pypi.python.org/pypi/py/
With a working setuptools installation you can issue:
python setup.py develop
in order to work with the tools and the lib of your checkout.
To import the py lib the py package directory needs to be on the $PYTHONPATH. If you exexute scripts directly from py/bin/ or py\bin\win32 they will find their containing py lib automatically.
It is usually a good idea to add the parent directory of the py package directory to your PYTHONPATH and py/bin or py\bin\win32 to your system wide PATH settings. There are helper scripts that set PYTHONPATH and PATH on your system:
on windows execute:
# inside autoexec.bat or shell startup c:\\path\to\checkout\py\env.cmd
on linux/OSX add this to your shell initialization:
# inside .bashrc eval `python ~/path/to/checkout/py/env.py`
both of which which will get you good settings for PYTHONPATH and PATH.
Note that the command line scripts will look for "nearby" py libs, so if you have a layout like this:
mypkg/ subpkg1/ tests/ tests/ py/
issuing py.test subpkg1 will use the py lib from that projects root directory.
As of August 2009 pytest/pylib 1.0 RPMs and Debian packages are not available. You will only find 0.9 versions - on Debian systems look for python-codespeak-lib and Dwayne Bailey has put together a Fedora RPM.
If you can help with providing/upgrading distribution packages please use of the contact channels in case of questions or need for changes.