summaryrefslogtreecommitdiff
path: root/setuptools/command
diff options
context:
space:
mode:
authorMelissa Li <li.melissa.kun@gmail.com>2021-02-18 23:02:29 -0500
committerMelissa Li <li.melissa.kun@gmail.com>2021-02-19 17:11:54 -0500
commit37a6284c9fcd71a3d4b2fe5dbc802fcf5cbe0786 (patch)
treee85e4323f7598363ed6c0c1fcaee49c5e6919f64 /setuptools/command
parente1ffc2abbae4f2aa78dd09ee9827d754b7702b7b (diff)
downloadpython-setuptools-git-37a6284c9fcd71a3d4b2fe5dbc802fcf5cbe0786.tar.gz
Fix sphinx upload_docs
Diffstat (limited to 'setuptools/command')
-rw-r--r--setuptools/command/upload_docs.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/setuptools/command/upload_docs.py b/setuptools/command/upload_docs.py
index 2559458a..95383319 100644
--- a/setuptools/command/upload_docs.py
+++ b/setuptools/command/upload_docs.py
@@ -2,7 +2,7 @@
"""upload_docs
Implements a Distutils 'upload_docs' subcommand (upload documentation to
-PyPI's pythonhosted.org).
+sites other than PyPi such as devpi).
"""
from base64 import standard_b64encode
@@ -59,7 +59,10 @@ class upload_docs(upload):
if self.upload_dir is None:
if self.has_sphinx():
build_sphinx = self.get_finalized_command('build_sphinx')
- self.target_dir = build_sphinx.builder_target_dir
+ for (builder, builder_dir) in build_sphinx.builder_target_dirs:
+ if builder == "html":
+ self.target_dir = builder_dir
+ break
else:
build = self.get_finalized_command('build')
self.target_dir = os.path.join(build.build_base, 'docs')