summaryrefslogtreecommitdiffstats
path: root/Doc/distutils
diff options
context:
space:
mode:
authorTarek Ziadé <ziade.tarek@gmail.com>2009-01-09 00:15:45 (GMT)
committerTarek Ziadé <ziade.tarek@gmail.com>2009-01-09 00:15:45 (GMT)
commit13f7c3b6cad28ee57390c7650e1bf644f0b3943f (patch)
treef74d6310917922466929bc468f2d9ee64300d2be /Doc/distutils
parentbcd5cbe01ef4306a82f85d0500f9a9f04113f804 (diff)
downloadcpython-13f7c3b6cad28ee57390c7650e1bf644f0b3943f.zip
cpython-13f7c3b6cad28ee57390c7650e1bf644f0b3943f.tar.gz
cpython-13f7c3b6cad28ee57390c7650e1bf644f0b3943f.tar.bz2
Merged revisions 68415 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk ........ r68415 | tarek.ziade | 2009-01-09 00:56:31 +0100 (Fri, 09 Jan 2009) | 1 line fixed #4394 make the storage of the password optional in .pypirc ........
Diffstat (limited to 'Doc/distutils')
-rw-r--r--Doc/distutils/packageindex.rst76
-rw-r--r--Doc/distutils/uploading.rst10
2 files changed, 49 insertions, 37 deletions
diff --git a/Doc/distutils/packageindex.rst b/Doc/distutils/packageindex.rst
index 3715c82..c4cbf88 100644
--- a/Doc/distutils/packageindex.rst
+++ b/Doc/distutils/packageindex.rst
@@ -8,17 +8,17 @@ The Python Package Index (PyPI) holds meta-data describing distributions
packaged with distutils. The distutils command :command:`register` is used to
submit your distribution's meta-data to the index. It is invoked as follows::
- python setup.py register
+ python setup.py register
Distutils will respond with the following prompt::
- running register
- We need to know who you are, so please choose either:
- 1. use your existing login,
- 2. register as a new user,
- 3. have the server generate a new password for you (and email it to you), or
- 4. quit
- Your selection [default 1]:
+ running register
+ We need to know who you are, so please choose either:
+ 1. use your existing login,
+ 2. register as a new user,
+ 3. have the server generate a new password for you (and email it to you), or
+ 4. quit
+ Your selection [default 1]:
Note: if your username and password are saved locally, you will not see this
menu.
@@ -55,40 +55,50 @@ The .pypirc file
The format of the :file:`.pypirc` file is as follows::
- [distutils]
- index-servers =
- pypi
+ [distutils]
+ index-servers =
+ pypi
- [pypi]
- repository: <repository-url>
- username: <username>
- password: <password>
+ [pypi]
+ repository: <repository-url>
+ username: <username>
+ password: <password>
-*repository* can be omitted and defaults to ``http://www.python.org/pypi``.
+The *distutils* section defines a *index-servers* variable that lists the
+name of all sections describing a repository.
-If you want to define another server a new section can be created::
+Each section describing a repository defines three variables:
- [distutils]
- index-servers =
- pypi
- other
+- *repository*, that defines the url of the PyPI server. Defaults to
+ ``http://www.python.org/pypi``.
+- *username*, which is the registered username on the PyPI server.
+- *password*, that will be used to authenticate. If omitted the user
+ will be prompt to type it when needed.
- [pypi]
- repository: <repository-url>
- username: <username>
- password: <password>
+If you want to define another server a new section can be created and
+listed in the *index-servers* variable::
- [other]
- repository: http://example.com/pypi
- username: <username>
- password: <password>
+ [distutils]
+ index-servers =
+ pypi
+ other
-The command can then be called with the -r option::
+ [pypi]
+ repository: <repository-url>
+ username: <username>
+ password: <password>
- python setup.py register -r http://example.com/pypi
+ [other]
+ repository: http://example.com/pypi
+ username: <username>
+ password: <password>
-Or even with the section name::
+:command:`register` can then be called with the -r option to point the
+repository to work with::
- python setup.py register -r other
+ python setup.py register -r http://example.com/pypi
+The name of the section that describes the repository may also be used
+for conveniency::
+ python setup.py register -r other
diff --git a/Doc/distutils/uploading.rst b/Doc/distutils/uploading.rst
index e3aa7c3..36e7b8f 100644
--- a/Doc/distutils/uploading.rst
+++ b/Doc/distutils/uploading.rst
@@ -11,7 +11,7 @@ package data if the author of the package wishes to. The distutils command
The command is invoked immediately after building one or more distribution
files. For example, the command ::
- python setup.py sdist bdist_wininst upload
+ python setup.py sdist bdist_wininst upload
will cause the source distribution and the Windows installer to be uploaded to
PyPI. Note that these will be uploaded even if they are built using an earlier
@@ -20,11 +20,14 @@ line for the invocation including the :command:`upload` command are uploaded.
The :command:`upload` command uses the username, password, and repository URL
from the :file:`$HOME/.pypirc` file (see section :ref:`pypirc` for more on this
-file).
+file). If a :command:`register` command was previously called in the same command,
+and if the password was entered in the prompt, :command:`upload` will reuse the
+entered password. This is useful if you do not want to store a clear text
+password in the :file:`$HOME/.pypirc` file.
You can specify another PyPI server with the :option:`--repository=*url*` option::
- python setup.py sdist bdist_wininst upload -r http://example.com/pypi
+ python setup.py sdist bdist_wininst upload -r http://example.com/pypi
See section :ref:`pypirc` for more on defining several servers.
@@ -38,4 +41,3 @@ Other :command:`upload` options include :option:`--repository=<url>` or
*section* the name of the section in :file:`$HOME/.pypirc`, and
:option:`--show-response` (which displays the full response text from the PyPI
server for help in debugging upload problems).
-