Skip to content

Commit 043c2a6

Browse files
committed
dist_docs: package tree made by 'autodocs'
1 parent 847cb21 commit 043c2a6

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

pavement.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -206,17 +206,21 @@ def gendocs():
206206

207207

208208
@task
209-
@needs("docs")
210209
def dist_docs():
211210
"create a documentation bundle"
212211
dist_dir = path("dist")
212+
html_dir = path("docs/_build/html")
213213
docs_package = path("%s/%s-%s-docs.zip" % (dist_dir.abspath(), options.setup.name, options.setup.version))
214214

215+
if not html_dir.exists():
216+
error("\n*** ERROR: Please build the HTML docs!")
217+
sys.exit(1)
218+
215219
dist_dir.exists() or dist_dir.makedirs()
216220
docs_package.exists() and docs_package.remove()
217221

218-
sh(r'cd docs/_build/html && find . -type f \! \( -path "*/.svn*" -o -name "*~" \) | sort'
219-
' | zip -qr -@ %s' % (docs_package,))
222+
sh(r'cd %s && find . -type f \! \( -path "*/.svn*" -o -name "*~" \) | sort'
223+
' | zip -qr -@ %s' % (html_dir, docs_package,))
220224

221225
print
222226
print "Upload @ http://pypi.python.org/pypi?:action=pkg_edit&name=%s" % ( options.setup.name,)

0 commit comments

Comments
 (0)