Differences between revisions 13 and 15 (spanning 2 versions)
Revision 13 as of 2008-08-08 13:45:28
Size: 5124
Editor: dzcpe6300altis-e0
Comment: Typo
Revision 15 as of 2008-11-15 14:01:28
Size: 5503
Editor: localhost
Comment: converted to 1.6 markup
Deletions are marked like this. Additions are marked like this.
Line 3: Line 3:
To install packages from the [http://pypi.python.org/pypi Package Index (PyPI)] into your Python, you have several options: To install packages from the [[http://pypi.python.org/pypi|Package Index (PyPI)]] into your Python, you have several options:
Line 9: Line 9:
For Windows, please review [http://www.python.org/dev/peps/pep-0250/ PEP 250, Using site-packages on Windows] For Windows, please review [[http://www.python.org/dev/peps/pep-0250/|PEP 250, Using site-packages on Windows]]
Line 15: Line 15:
Please see [http://peak.telecommunity.com/DevCenter/EasyInstall EasyInstall] for more information on EasyInstall. Please see [[http://peak.telecommunity.com/DevCenter/EasyInstall|EasyInstall]] for more information.

== Buildout Installation ==

Buildout is a configuration-driven build tool designed for automating application installation. It has a number of recipes that allow you to declare the the set(s) of packages required for a Python application, and automatically install them.

Please see [[http://pypi.python.org/pypi/zc.buildout|Buildout]] for more information.
Line 19: Line 25:
The Python Package Index stores [http://docs.python.org/dist/meta-data.html information about packages of Python software]. Each package has a name and a number of release versions. The list of release versions will increase as newer versions of the package are submitted to the Package Index. The Python Package Index stores [[http://docs.python.org/dist/meta-data.html|information about packages of Python software]]. Each package has a name and a number of release versions. The list of release versions will increase as newer versions of the package are submitted to the Package Index.
Line 33: Line 39:
 1. writing a [http://docs.python.org/dist/setup-script.html setup.py file] and using "python setup.py register" (see [http://docs.python.org/dist/package-index.html docs]),  1. writing a [[http://docs.python.org/dist/setup-script.html|setup.py file]] and using "python setup.py register" (see [[http://docs.python.org/dist/package-index.html|docs]]),
Line 37: Line 43:
 3. using the [http://pypi.python.org/pypi?%3Aaction=submit_form web form] and manually entering the information.  3. using the [[http://pypi.python.org/pypi?%3Aaction=submit_form|web form]] and manually entering the information.
Line 43: Line 49:
View the complete [http://pypi.python.org/pypi?%3Aaction=list_classifiers list of classifiers] you may choose from. View the complete [[http://pypi.python.org/pypi?%3Aaction=list_classifiers|list of classifiers]] you may choose from.
Line 45: Line 51:
See the [http://docs.python.org/dist/meta-data.html meta-data docs] for details about how to include them in your setup.py file. See the [[http://docs.python.org/dist/meta-data.html|meta-data docs]] for details about how to include them in your setup.py file.
Line 51: Line 57:
Is a classifier you need missing from the [http://pypi.python.org/pypi?%3Aaction=list_classifiers classifiers list]? Is a classifier you need missing from the [[http://pypi.python.org/pypi?%3Aaction=list_classifiers|classifiers list]]?
Line 63: Line 69:
 1. appending the "upload" command to a setup.py [http://docs.python.org/dist/source-dist.html source dist] or [http://docs.python.org/dist/built-dist.html built dist] command, eg "python setup.py sdist upload", or  1. appending the "upload" command to a setup.py [[http://docs.python.org/dist/source-dist.html|source dist]] or [[http://docs.python.org/dist/built-dist.html|built dist]] command, eg "python setup.py sdist upload", or
Line 77: Line 83:
Cheesecake is a project that tries to help Python developers via testing and scoring their packages based on some empirical factors, like, for example, whether a package can be installed using standard "python setup.py install" interface. To learn more about it, visit its [http://pycheesecake.org/ homepage]. Cheesecake is a project that tries to help Python developers via testing and scoring their packages based on some empirical factors, like, for example, whether a package can be installed using standard "python setup.py install" interface. To learn more about it, visit its [[http://pycheesecake.org/|homepage]].
Line 79: Line 85:
Starting from August 10th 2006 all packages that were updated/released on PyPI are automatically scored. You can browse full list of scored packages on [http://pypi.pycheesecake.org/pypi/ Cheesecake server]. It's still in alpha state, so let us know of any bugs or inconveniences you stumble upon. Cheesecake scores will also be incorporated into PyPI itself in a way that will allow package owners to browse scores on their administration pages. Starting from August 10th 2006 all packages that were updated/released on PyPI are automatically scored. You can browse full list of scored packages on [[http://pypi.pycheesecake.org/pypi/|Cheesecake server]]. It's still in alpha state, so let us know of any bugs or inconveniences you stumble upon. Cheesecake scores will also be incorporated into PyPI itself in a way that will allow package owners to browse scores on their administration pages.

Installing Packages from the Package Index (Start Here)

To install packages from the Package Index (PyPI) into your Python, you have several options:

Manual Installation

To install a package manually under UNIX, the usual method is to extract the package into your system's built-in or optional site-packages directory. For Python 2.5, this is frequently either /usr/lib/python2.5/site-packages/ or /usr/local/lib/python2.5/site-packages.

For Windows, please review PEP 250, Using site-packages on Windows

Easy Installation

EasyInstall (easy_install) gives you a quick and painless way to install packages remotely by connecting to the Package Index or even other websites via HTTP. It is somewhat analogous to the CPAN and PEAR tools for Perl and PHP, respectively.

Please see EasyInstall for more information.

Buildout Installation

Buildout is a configuration-driven build tool designed for automating application installation. It has a number of recipes that allow you to declare the the set(s) of packages required for a Python application, and automatically install them.

Please see Buildout for more information.

What the Package Index Stores

The Python Package Index stores information about packages of Python software. Each package has a name and a number of release versions. The list of release versions will increase as newer versions of the package are submitted to the Package Index.

Submitting Packages to the Package Index

There are two types of information that may be submitted to the Package Index:

  1. package meta-data (name, version, description, etc), and
  2. package source and binary distribution files.

Package Meta-Data

You may submit package meta-data either by:

  1. writing a setup.py file and using "python setup.py register" (see docs),

  2. creating a PKG-INFO file (typically generated from a setup.py file) and uploading it, or
  3. using the web form and manually entering the information.

The Package Index assumes that the PKG-INFO file is either ASCII or UTF-8.

Selecting Classifiers

View the complete list of classifiers you may choose from.

See the meta-data docs for details about how to include them in your setup.py file.

PyPI will attempt to parse the "long_description" from your meta-data as ReStructuredText. If this fails, it will be presented to users as plain text (all whitespace and formatting retained).

Missing Classifier?

Is a classifier you need missing from the classifiers list?

Python frameworks with plugins or packages that target the framework can get their own category. The category should only be added after such packages exist.

Complementary packages can link to each other from their descriptions, they do not need a category to link them together; only when packages are provided by different people does a category need to be created.

To ask for a category email catalog-sig@python.org.

Package Distribution Files

Note that submitting a package distribution file automatically submits the package's meta-data. You may submit package distribution files either by:

  1. appending the "upload" command to a setup.py source dist or built dist command, eg "python setup.py sdist upload", or

  2. logging into the Package Index and using the package management interface to manually upload files.

The "upload" command has a number of options, including being able to sign the upload using GPG. See "python setup.py upload --help" for more information.

Exposing Multiple Releases

When a new release of a package is submitted to the Package Index, all previous releases of that package are hidden from the display. This means that listings and searches will no longer find those releases.

You may use the package admin interface to uh-hide releases. This may be useful if you have both a stable and a development release active at the same time. These will be hidden again on the next submission of meta-data.

Cheesecake scores

Cheesecake is a project that tries to help Python developers via testing and scoring their packages based on some empirical factors, like, for example, whether a package can be installed using standard "python setup.py install" interface. To learn more about it, visit its homepage.

Starting from August 10th 2006 all packages that were updated/released on PyPI are automatically scored. You can browse full list of scored packages on Cheesecake server. It's still in alpha state, so let us know of any bugs or inconveniences you stumble upon. Cheesecake scores will also be incorporated into PyPI itself in a way that will allow package owners to browse scores on their administration pages.

CheeseShopTutorial (last edited 2019-06-22 19:01:22 by SumanaHarihareswara)

Unable to edit the page? See the FrontPage for instructions.