/Doc/distutils/uploading.rst

http://unladen-swallow.googlecode.com/ · ReStructuredText · 43 lines · 30 code · 13 blank · 0 comment · 0 complexity · cb85cfef35dad7f881cf86325adc765d MD5 · raw file

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