PageRenderTime 24ms CodeModel.GetById 19ms app.highlight 2ms RepoModel.GetById 2ms app.codeStats 0ms

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