Edgewall Software

setuptools

setuptools is a Python module that helps to compile, distribute and install Python packages by wrapping them into "egg"s. Eggs contain additional information to process dependencies, etc.

The version of your setuptools installation can be checked with the following commands (should work for other Python packages too):

$ python
Python 2.3.5
>>> import setuptools
>>> setuptools.__version__ 
'0.7a1' 

Setuptools can be installed using the bootstrap script from the Python Package Indexer (installation instructions):

$ wget https://bootstrap.pypa.io/ez_setup.py -O - | python

Notes:

  • Do not use setuptools prior to version 0.6c10. If you are, look for the notes in an earlier version of this page.
  • If you're using Python 2.4 (still supported for 0.12-stable) or Python 2.5, you won't be able to use a recent version of setuptools. You can still install an earlier version:
    • grab and execute the older ez_setup.py script, you'll then have 0.6c11, which is enough if you're installing from a Trac checkout made with Subversion 1.6, but is problematic for newer Subversion versions.
    • with easy_install from 0.6c11, install the latest Python 2.4/2.5 compatible version of the new setuptools: easy_install -U setuptools==1.4.2
  • if you're using setuptools versions 5.4 through 5.6, the environment variable PKG_RESOURCES_CACHE_ZIP_MANIFESTS should be set, otherwise the performance of Trac will be significantly degraded.
    • Linux: $ export PKG_RESOURCES_CACHE_ZIP_MANIFESTS=1
    • Windows: > set PKG_RESOURCES_CACHE_ZIP_MANIFESTS=1

More details can be found in TracInstall#DeployingTrac.

setuptools includes the "easy_install" script for convenient installation of packages found on Python Package Index including Trac with all necessary dependencies.

$ python -m easy_install Trac

If you are working behind a proxy, note that easy_install will rely on environment variables, such as http_proxy, https_proxy, ftp_proxy.

Reference Documentation


See also: TracDev/Proposals/Setuptools

Last modified 6 weeks ago Last modified on Oct 24, 2016, 9:09:20 PM