summaryrefslogtreecommitdiff
path: root/src/distutils2/command
diff options
context:
space:
mode:
authorKonrad Delong <konryd@gmail.com>2010-07-22 19:31:26 +0200
committerKonrad Delong <konryd@gmail.com>2010-07-22 19:31:26 +0200
commit5b3987f65d620785e96228f1af5909e0117135cc (patch)
tree2628ec9b7357453e2fc39f87788410f42370bd21 /src/distutils2/command
parentc568a90237760f05cd71390a3963f5627031d994 (diff)
downloaddisutils2-5b3987f65d620785e96228f1af5909e0117135cc.tar.gz
added upload_docs option to upload command
Diffstat (limited to 'src/distutils2/command')
-rw-r--r--src/distutils2/command/upload.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/distutils2/command/upload.py b/src/distutils2/command/upload.py
index 14fe119..4ada715 100644
--- a/src/distutils2/command/upload.py
+++ b/src/distutils2/command/upload.py
@@ -26,6 +26,7 @@ class upload(PyPIRCCommand):
('sign', 's',
'sign files to upload using gpg'),
('identity=', 'i', 'GPG identity used to sign files'),
+ ('upload-docs', None, 'Run upload_docs as well'),
]
boolean_options = PyPIRCCommand.boolean_options + ['sign']
@@ -37,6 +38,7 @@ class upload(PyPIRCCommand):
self.show_response = 0
self.sign = False
self.identity = None
+ self.upload_docs = False
def finalize_options(self):
PyPIRCCommand.finalize_options(self)
@@ -61,6 +63,12 @@ class upload(PyPIRCCommand):
raise DistutilsOptionError("No dist file created in earlier command")
for command, pyversion, filename in self.distribution.dist_files:
self.upload_file(command, pyversion, filename)
+ if self.upload_docs:
+ upload_docs = self.get_finalized_command("upload_docs")
+ upload_docs.repository = self.repository
+ upload_docs.username = self.username
+ upload_docs.password = self.password
+ upload_docs.run()
# XXX to be refactored with register.post_to_server
def upload_file(self, command, pyversion, filename):