blob: 5be413032cf6f9acd0e335f48b347d2171f50427 [file] [log] [blame]
Georg Brandl116aa622007-08-15 14:28:22 +00001.. _package-upload:
2
3***************************************
4Uploading Packages to the Package Index
5***************************************
6
Georg Brandl116aa622007-08-15 14:28:22 +00007The Python Package Index (PyPI) not only stores the package info, but also the
8package data if the author of the package wishes to. The distutils command
9:command:`upload` pushes the distribution files to PyPI.
10
11The command is invoked immediately after building one or more distribution
12files. For example, the command ::
13
14 python setup.py sdist bdist_wininst upload
15
16will cause the source distribution and the Windows installer to be uploaded to
17PyPI. Note that these will be uploaded even if they are built using an earlier
18invocation of :file:`setup.py`, but that only distributions named on the command
19line for the invocation including the :command:`upload` command are uploaded.
20
21The :command:`upload` command uses the username, password, and repository URL
22from the :file:`$HOME/.pypirc` file (see section :ref:`pypirc` for more on this
23file).
24
25You can use the :option:`--sign` option to tell :command:`upload` to sign each
26uploaded file using GPG (GNU Privacy Guard). The :program:`gpg` program must
27be available for execution on the system :envvar:`PATH`. You can also specify
28which key to use for signing using the :option:`--identity=*name*` option.
29
30Other :command:`upload` options include :option:`--repository=*url*` (which
31lets you override the repository setting from :file:`$HOME/.pypirc`), and
32:option:`--show-response` (which displays the full response text from the PyPI
33server for help in debugging upload problems).
34
35