summaryrefslogtreecommitdiffstats
path: root/Doc/distutils
diff options
context:
space:
mode:
authorAndrew M. Kuchling <amk@amk.ca>2008-05-10 19:51:55 (GMT)
committerAndrew M. Kuchling <amk@amk.ca>2008-05-10 19:51:55 (GMT)
commitcd8001c8ed8ea11b13a57be7f0e524133177c2f8 (patch)
tree2eb1a8681fa32764b64cc9ca723c455692e2f5a7 /Doc/distutils
parent4ff7fc49c6ac474545e942348aed90e7730d514e (diff)
downloadcpython-cd8001c8ed8ea11b13a57be7f0e524133177c2f8.zip
cpython-cd8001c8ed8ea11b13a57be7f0e524133177c2f8.tar.gz
cpython-cd8001c8ed8ea11b13a57be7f0e524133177c2f8.tar.bz2
#1858 from Tarek Ziade:
Allow multiple repositories in .pypirc; see http://wiki.python.org/moin/EnhancedPyPI for discussion. The patch is slightly revised from Tarek's last patch: I've simplified the PyPIRCCommand.finalize_options() method to not look at sys.argv. Tests still pass.
Diffstat (limited to 'Doc/distutils')
-rw-r--r--Doc/distutils/packageindex.rst31
-rw-r--r--Doc/distutils/uploading.rst12
2 files changed, 39 insertions, 4 deletions
diff --git a/Doc/distutils/packageindex.rst b/Doc/distutils/packageindex.rst
index 8242012..ef81d64 100644
--- a/Doc/distutils/packageindex.rst
+++ b/Doc/distutils/packageindex.rst
@@ -55,11 +55,40 @@ The .pypirc file
The format of the :file:`.pypirc` file is as follows::
- [server-login]
+ [distutils]
+ index-servers =
+ pypi
+
+ [pypi]
repository: <repository-url>
username: <username>
password: <password>
*repository* can be omitted and defaults to ``http://www.python.org/pypi``.
+If you want to define another server a new section can be created::
+
+ [distutils]
+ index-servers =
+ pypi
+ other
+
+ [pypi]
+ repository: <repository-url>
+ username: <username>
+ password: <password>
+
+ [other]
+ repository: http://example.com/pypi
+ username: <username>
+ password: <password>
+
+The command can then be called with the -r option::
+
+ python setup.py register -r http://example.com/pypi
+
+Or even with the section name::
+
+ python setup.py register -r other
+
diff --git a/Doc/distutils/uploading.rst b/Doc/distutils/uploading.rst
index 0b82184..52d6d5b 100644
--- a/Doc/distutils/uploading.rst
+++ b/Doc/distutils/uploading.rst
@@ -24,14 +24,20 @@ 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).
+You can specify another PyPI server with the :option:`--repository=*url*` option::
+
+ python setup.py sdist bdist_wininst upload -r http://example.com/pypi
+
+See section :ref:`pypirc` for more on defining several servers.
+
You can use the :option:`--sign` option to tell :command:`upload` to sign each
uploaded file using GPG (GNU Privacy Guard). The :program:`gpg` program must
be available for execution on the system :envvar:`PATH`. You can also specify
which key to use for signing using the :option:`--identity=*name*` option.
-Other :command:`upload` options include :option:`--repository=*url*` (which
-lets you override the repository setting from :file:`$HOME/.pypirc`), and
+Other :command:`upload` options include :option:`--repository=*url*`
+or :option:`--repository=*section*` where `url` is the url of the server
+and `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).
-