2009-07-21 00:54:08 +08:00
|
|
|
..
|
|
|
|
==============
|
|
|
|
Downloading
|
|
|
|
==============
|
2009-04-02 15:10:16 +08:00
|
|
|
|
2009-07-21 00:54:08 +08:00
|
|
|
.. _`PyPI project page`: http://pypi.python.org/pypi/py/
|
2009-06-19 19:05:44 +08:00
|
|
|
|
2009-07-21 00:54:08 +08:00
|
|
|
Latest Release, see `PyPI project page`_
|
2009-06-19 18:19:59 +08:00
|
|
|
|
2009-08-19 01:04:57 +08:00
|
|
|
using easy_install
|
2008-08-16 23:26:59 +08:00
|
|
|
===================================================
|
|
|
|
|
2009-09-07 23:53:50 +08:00
|
|
|
With a working `setuptools installation`_ or `distribute installation`_
|
|
|
|
you can type::
|
2009-06-30 18:42:57 +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.
|
2009-08-19 01:04:57 +08:00
|
|
|
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``.
|
2008-08-30 02:55:42 +08:00
|
|
|
The py lib and its tools are expected to work well on Linux,
|
2009-09-07 23:53:50 +08:00
|
|
|
Windows and OSX, Python versions 2.4, 2.5, 2.6 through to
|
|
|
|
the Python3 versions 3.0 and 3.1.
|
2009-06-30 18:42:57 +08:00
|
|
|
|
2009-08-19 01:04:57 +08:00
|
|
|
.. _mercurial: http://mercurial.selenic.com/wiki/
|
2009-09-07 23:53:50 +08:00
|
|
|
.. _`distribute installation`: http://pypi.python.org/pypi/distribute
|
2009-08-19 01:04:57 +08:00
|
|
|
.. _checkout:
|
|
|
|
.. _tarball:
|
2008-09-23 22:42:27 +08:00
|
|
|
|
2009-08-19 01:04:57 +08:00
|
|
|
Working from version control or a tarball
|
2009-07-15 03:17:13 +08:00
|
|
|
=================================================
|
2008-09-23 22:42:27 +08:00
|
|
|
|
2009-07-15 03:17:13 +08:00
|
|
|
To follow development or help with fixing things
|
|
|
|
for the next release, checkout the complete code
|
|
|
|
and documentation source with mercurial_::
|
2008-09-23 22:42:27 +08:00
|
|
|
|
2009-07-15 03:17:13 +08:00
|
|
|
hg clone https://bitbucket.org/hpk42/py-trunk/
|
2008-08-16 23:26:59 +08:00
|
|
|
|
2009-08-19 01:04:57 +08:00
|
|
|
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::
|
2008-08-16 23:26:59 +08:00
|
|
|
|
2009-08-19 01:04:57 +08:00
|
|
|
svn co https://codespeak.net/svn/py/dist
|
2009-06-30 18:42:57 +08:00
|
|
|
|
2009-08-19 01:04:57 +08:00
|
|
|
You can also go to the python package index and
|
|
|
|
download and unpack a TAR file::
|
2008-08-16 23:26:59 +08:00
|
|
|
|
2009-08-19 01:04:57 +08:00
|
|
|
http://pypi.python.org/pypi/py/
|
2009-07-21 00:54:08 +08:00
|
|
|
|
2009-08-19 01:04:57 +08:00
|
|
|
activating checkout with setuptools
|
|
|
|
--------------------------------------------
|
|
|
|
|
|
|
|
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.
|
2008-08-16 23:26:59 +08:00
|
|
|
|
2009-07-21 00:54:08 +08:00
|
|
|
.. _`no-setuptools`:
|
|
|
|
|
2009-08-19 01:04:57 +08:00
|
|
|
activating a checkout or tarball without setuptools
|
|
|
|
-------------------------------------------------------------
|
|
|
|
|
|
|
|
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.
|
2008-08-16 23:26:59 +08:00
|
|
|
|
2009-08-19 01:04:57 +08:00
|
|
|
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:
|
2008-08-16 23:26:59 +08:00
|
|
|
|
2009-08-19 01:04:57 +08:00
|
|
|
on windows execute::
|
2008-08-16 23:26:59 +08:00
|
|
|
|
2009-08-19 01:04:57 +08:00
|
|
|
# inside autoexec.bat or shell startup
|
2009-08-25 22:14:15 +08:00
|
|
|
c:\\path\to\checkout\py\bin\env.cmd
|
2008-08-16 23:26:59 +08:00
|
|
|
|
2009-08-19 01:04:57 +08:00
|
|
|
on linux/OSX add this to your shell initialization::
|
2008-08-16 23:26:59 +08:00
|
|
|
|
2009-08-19 01:04:57 +08:00
|
|
|
# inside .bashrc
|
2009-08-25 22:14:15 +08:00
|
|
|
eval `python ~/path/to/checkout/py/bin/env.py`
|
2008-08-16 23:26:59 +08:00
|
|
|
|
2009-07-15 03:17:13 +08:00
|
|
|
both of which which will get you good settings
|
|
|
|
for ``PYTHONPATH`` and ``PATH``.
|
2008-08-16 23:26:59 +08:00
|
|
|
|
2009-08-19 01:04:57 +08:00
|
|
|
|
|
|
|
note: scripts look for "nearby" py-lib
|
|
|
|
-----------------------------------------------------
|
|
|
|
|
|
|
|
Note that the `command line scripts`_ will look
|
2009-07-15 03:17:13 +08:00
|
|
|
for "nearby" py libs, so if you have a layout like this::
|
2008-08-16 23:26:59 +08:00
|
|
|
|
2009-07-15 03:17:13 +08:00
|
|
|
mypkg/
|
|
|
|
subpkg1/
|
|
|
|
tests/
|
|
|
|
tests/
|
|
|
|
py/
|
2008-08-16 23:26:59 +08:00
|
|
|
|
2009-08-19 01:04:57 +08:00
|
|
|
issuing ``py.test subpkg1`` will use the py lib
|
|
|
|
from that projects root directory.
|
|
|
|
|
|
|
|
.. _`command line scripts`: bin.html
|
2008-08-16 23:26:59 +08:00
|
|
|
|
2009-07-15 03:17:13 +08:00
|
|
|
Debian and RPM packages
|
|
|
|
===================================
|
2008-08-16 23:26:59 +08:00
|
|
|
|
2009-08-19 01:04:57 +08:00
|
|
|
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`_.
|
2008-08-16 23:26:59 +08:00
|
|
|
|
2009-08-19 01:04:57 +08:00
|
|
|
If you can help with providing/upgrading distribution
|
|
|
|
packages please use of the contact_ channels in case
|
|
|
|
of questions or need for changes.
|
2008-08-16 23:26:59 +08:00
|
|
|
|
2009-08-19 01:04:57 +08:00
|
|
|
.. _contact: contact.html
|
2008-08-16 23:26:59 +08:00
|
|
|
|
2009-07-15 03:17:13 +08:00
|
|
|
.. _`RPM`: http://translate.sourceforge.net/releases/testing/fedora/pylib-0.9.2-1.fc9.noarch.rpm
|
2008-08-16 23:26:59 +08:00
|
|
|
|
2009-07-15 03:17:13 +08:00
|
|
|
.. _`setuptools installation`: http://pypi.python.org/pypi/setuptools
|
2008-08-22 21:41:17 +08:00
|
|
|
|