2009-04-02 15:10:16 +08:00
|
|
|
==============
|
|
|
|
Downloading
|
|
|
|
==============
|
|
|
|
|
2009-06-19 19:05:44 +08:00
|
|
|
.. _`PyPI project page`: http://pypi.python.org/pypi?%3Aaction=pkg_edit&name=py
|
|
|
|
|
|
|
|
Latest Release, see `PyPI project page`_
|
2009-06-19 18:19:59 +08:00
|
|
|
|
2008-08-21 18:18:58 +08:00
|
|
|
"easy_install py"
|
2008-08-16 23:26:59 +08:00
|
|
|
===================================================
|
|
|
|
|
2009-06-19 01:02:59 +08:00
|
|
|
If you have a working `setuptools installation`_ you can install from the command line::
|
2008-08-16 23:26:59 +08:00
|
|
|
|
2008-08-30 02:55:42 +08:00
|
|
|
easy_install -U py
|
2008-08-16 23:26:59 +08:00
|
|
|
|
2008-08-30 02:55:42 +08:00
|
|
|
to get the latest release of the py lib. The ``-U`` switch
|
|
|
|
will trigger an upgrade if you already have an older version installed.
|
|
|
|
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.
|
|
|
|
|
2008-09-23 22:42:27 +08:00
|
|
|
We provide binary eggs for Windows machines.
|
|
|
|
|
|
|
|
On other systems you need a working C-compiler in order to
|
2008-08-30 02:55:42 +08:00
|
|
|
install the full py lib. If you don't have a compiler available
|
|
|
|
you can still install the py lib but without greenlets - look
|
|
|
|
below for the ``install_lib`` target.
|
2008-08-16 23:26:59 +08:00
|
|
|
|
2008-08-21 18:18:58 +08:00
|
|
|
**IMPORTANT NOTE**: if you are using Windows and have previous
|
|
|
|
installations 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.
|
|
|
|
(Unfortunately we don't know about a way to execute this
|
|
|
|
code automatically during the above install).
|
2008-08-16 23:26:59 +08:00
|
|
|
|
2008-09-23 22:42:27 +08:00
|
|
|
Installing on Debian or Fedora
|
|
|
|
===================================
|
|
|
|
|
|
|
|
On Debian systems look for ``python-codespeak-lib``.
|
|
|
|
*This package is probably outdated - if somebody
|
|
|
|
can help with bringing this up to date,
|
|
|
|
that would be very much appreciated.*
|
|
|
|
|
|
|
|
Dwayne Bailey has thankfully put together a Fedora `RPM`_.
|
|
|
|
|
|
|
|
.. _`RPM`: http://translate.sourceforge.net/releases/testing/fedora/pylib-0.9.2-1.fc9.noarch.rpm
|
|
|
|
|
2008-08-21 18:18:58 +08:00
|
|
|
.. _`setuptools installation`: http://pypi.python.org/pypi/setuptools
|
2008-08-16 23:26:59 +08:00
|
|
|
|
2008-09-23 22:42:27 +08:00
|
|
|
|
2008-08-21 18:18:58 +08:00
|
|
|
Downloading a tar/zip archive and installing that
|
|
|
|
===================================================
|
2008-08-16 23:26:59 +08:00
|
|
|
|
2008-08-22 21:41:17 +08:00
|
|
|
Go to the python package index (pypi) and download a tar or zip file:
|
2008-08-16 23:26:59 +08:00
|
|
|
|
2008-08-21 18:18:58 +08:00
|
|
|
http://pypi.python.org/pypi/py/
|
2008-08-16 23:26:59 +08:00
|
|
|
|
2008-08-21 18:18:58 +08:00
|
|
|
and unpack it to a directory, where you then type::
|
2008-08-16 23:26:59 +08:00
|
|
|
|
|
|
|
python setup.py install
|
|
|
|
|
2008-08-21 18:18:58 +08:00
|
|
|
If you don't have a working C-compiler you can do::
|
2008-08-16 23:26:59 +08:00
|
|
|
|
2008-08-21 18:18:58 +08:00
|
|
|
python setup.py install_lib
|
2008-08-16 23:26:59 +08:00
|
|
|
|
2008-08-21 18:18:58 +08:00
|
|
|
You will then not be able to use greenlets but otherwise
|
2008-08-30 02:55:42 +08:00
|
|
|
``py.test`` and all tools and APIs are fine to use.
|
2008-08-16 23:26:59 +08:00
|
|
|
|
2008-08-21 18:18:58 +08:00
|
|
|
Installing from subversion / develop mode
|
|
|
|
============================================
|
2008-08-16 23:26:59 +08:00
|
|
|
|
2008-08-21 18:18:58 +08:00
|
|
|
To follow development or help with fixing things
|
|
|
|
for the next release, checkout the complete code
|
|
|
|
and documentation source::
|
2008-08-16 23:26:59 +08:00
|
|
|
|
2008-08-21 18:18:58 +08:00
|
|
|
svn co http://codespeak.net/svn/py/release/0.9.x py-0.9.x
|
2008-08-16 23:26:59 +08:00
|
|
|
|
2008-08-22 21:41:17 +08:00
|
|
|
You can then issue::
|
2008-08-16 23:26:59 +08:00
|
|
|
|
2008-08-21 18:18:58 +08:00
|
|
|
python setup.py develop
|
2008-08-16 23:26:59 +08:00
|
|
|
|
2008-08-22 21:41:17 +08:00
|
|
|
in order to work with your checkout version.
|
2008-08-16 23:26:59 +08:00
|
|
|
|
2008-08-22 21:41:17 +08:00
|
|
|
other interesting svn checkout points::
|
2008-08-16 23:26:59 +08:00
|
|
|
|
2008-08-22 21:41:17 +08:00
|
|
|
http://codespeak.net/
|
|
|
|
svn/py/release # release tags and branches
|
|
|
|
svn/py/dist # latest stable (may or may not be a release)
|
|
|
|
svn/py/trunk # head development / merge point
|
2008-08-16 23:26:59 +08:00
|
|
|
|
|
|
|
|
2008-08-22 21:41:17 +08:00
|
|
|
Working with multiple py lib versions / svn externals
|
|
|
|
=======================================================
|
2008-08-16 23:26:59 +08:00
|
|
|
|
2008-08-22 21:41:17 +08:00
|
|
|
If you happen to have multiple versions of the py lib
|
|
|
|
around or you ship the py lib as an svn-external to
|
|
|
|
then you might want to use py lib scripts more directly.
|
|
|
|
For example if you have a project layout like this::
|
2008-08-16 23:26:59 +08:00
|
|
|
|
2008-08-22 21:41:17 +08:00
|
|
|
mypkg/
|
|
|
|
subpkg1/
|
|
|
|
tests/
|
|
|
|
tests/
|
|
|
|
py/ # as svn-external, could be specific tag/version
|
2008-08-16 23:26:59 +08:00
|
|
|
|
2008-08-22 21:41:17 +08:00
|
|
|
then you want to make sure that the actual local py lib is used
|
|
|
|
and not another system-wide version. For this you need to add
|
|
|
|
``py/bin`` or ``py\bin\win32`` respectively to your system's PATH settings.
|
2008-08-16 23:26:59 +08:00
|
|
|
|
2008-08-22 21:41:17 +08:00
|
|
|
You can do this by executing (on windows) a script to set the environment::
|
|
|
|
|
|
|
|
c:\\path\to\checkout\py\env.cmd
|
|
|
|
|
|
|
|
or on linux/osx you can add something like this to your shell
|
|
|
|
initialization::
|
|
|
|
|
|
|
|
eval `python ~/path/to/checkout/py/env.py`
|
|
|
|
|
|
|
|
to get good settings for PYTHONPATH and PATH.
|
2008-08-16 23:26:59 +08:00
|
|
|
|