/Doc/distutils/packageindex.rst

http://unladen-swallow.googlecode.com/ · ReStructuredText · 93 lines · 66 code · 27 blank · 0 comment · 0 complexity · 4d99b2cc2def855a92df6eb44da53ac2 MD5 · raw file

  1. .. _package-index:
  2. **********************************
  3. Registering with the Package Index
  4. **********************************
  5. The Python Package Index (PyPI) holds meta-data describing distributions
  6. packaged with distutils. The distutils command :command:`register` is used to
  7. submit your distribution's meta-data to the index. It is invoked as follows::
  8. python setup.py register
  9. Distutils will respond with the following prompt::
  10. running register
  11. We need to know who you are, so please choose either:
  12. 1. use your existing login,
  13. 2. register as a new user,
  14. 3. have the server generate a new password for you (and email it to you), or
  15. 4. quit
  16. Your selection [default 1]:
  17. Note: if your username and password are saved locally, you will not see this
  18. menu.
  19. If you have not registered with PyPI, then you will need to do so now. You
  20. should choose option 2, and enter your details as required. Soon after
  21. submitting your details, you will receive an email which will be used to confirm
  22. your registration.
  23. Once you are registered, you may choose option 1 from the menu. You will be
  24. prompted for your PyPI username and password, and :command:`register` will then
  25. submit your meta-data to the index.
  26. You may submit any number of versions of your distribution to the index. If you
  27. alter the meta-data for a particular version, you may submit it again and the
  28. index will be updated.
  29. PyPI holds a record for each (name, version) combination submitted. The first
  30. user to submit information for a given name is designated the Owner of that
  31. name. They may submit changes through the :command:`register` command or through
  32. the web interface. They may also designate other users as Owners or Maintainers.
  33. Maintainers may edit the package information, but not designate other Owners or
  34. Maintainers.
  35. By default PyPI will list all versions of a given package. To hide certain
  36. versions, the Hidden property should be set to yes. This must be edited through
  37. the web interface.
  38. .. _pypirc:
  39. The .pypirc file
  40. ================
  41. The format of the :file:`.pypirc` file is as follows::
  42. [distutils]
  43. index-servers =
  44. pypi
  45. [pypi]
  46. repository: <repository-url>
  47. username: <username>
  48. password: <password>
  49. *repository* can be omitted and defaults to ``http://www.python.org/pypi``.
  50. If you want to define another server a new section can be created::
  51. [distutils]
  52. index-servers =
  53. pypi
  54. other
  55. [pypi]
  56. repository: <repository-url>
  57. username: <username>
  58. password: <password>
  59. [other]
  60. repository: http://example.com/pypi
  61. username: <username>
  62. password: <password>
  63. The command can then be called with the -r option::
  64. python setup.py register -r http://example.com/pypi
  65. Or even with the section name::
  66. python setup.py register -r other