Skip to content

Commit

Permalink
REL: add "make upload" command for built docs, update "make dist".
Browse files Browse the repository at this point in the history
Changes to "make dist" for building docs:

- remove .chm related line, we don't distribute those on docs.scipy.org
- only include needed pdf files in dist.tar.gz

[ci skip]
  • Loading branch information
rgommers committed Oct 18, 2015
1 parent c9dcd91 commit 0b83a90
Showing 1 changed file with 19 additions and 2 deletions.
21 changes: 19 additions & 2 deletions doc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ help:
@echo " linkcheck to check all external links for integrity"
@echo " dist PYVER=... to make a distribution-ready tree"
@echo " gitwash-update GITWASH=path/to/gitwash update gitwash developer docs"
@echo " upload USERNAME=... RELEASE=... to upload built docs to docs.scipy.org"

clean:
-rm -rf build/* source/reference/generated
Expand Down Expand Up @@ -59,6 +60,7 @@ gitwash-update:

INSTALL_DIR = $(CURDIR)/build/inst-dist/
INSTALL_PPH = $(INSTALL_DIR)/lib/python$(PYVER)/site-packages:$(INSTALL_DIR)/local/lib/python$(PYVER)/site-packages:$(INSTALL_DIR)/lib/python$(PYVER)/dist-packages:$(INSTALL_DIR)/local/lib/python$(PYVER)/dist-packages
UPLOAD_DIR=/srv/docs_scipy_org/doc/numpy-$(RELEASE)

DIST_VARS=SPHINXBUILD="LANG=C PYTHONPATH=$(INSTALL_PPH) python$(PYVER) `which sphinx-build`" PYTHON="PYTHONPATH=$(INSTALL_PPH) python$(PYVER)" SPHINXOPTS="$(SPHINXOPTS)"

Expand All @@ -72,8 +74,8 @@ real-dist: dist-build html html-scipyorg
-rm -rf build/dist
cp -r build/html-scipyorg build/dist
cd build/html && zip -9r ../dist/numpy-html.zip .
cp build/latex/numpy-*.pdf build/dist
-zip build/dist/numpy-chm.zip build/htmlhelp/numpy.chm
cp build/latex/numpy-ref.pdf build/dist
cp build/latex/numpy-user.pdf build/dist
cd build/dist && tar czf ../dist.tar.gz *
chmod ug=rwX,o=rX -R build/dist
find build/dist -type d -print0 | xargs -0r chmod g+s
Expand All @@ -84,6 +86,21 @@ dist-build:
install -d $(subst :, ,$(INSTALL_PPH))
$(PYTHON) `which easy_install` --prefix=$(INSTALL_DIR) ../dist/*.egg

upload:
# SSH must be correctly configured for this to work.
# Assumes that ``make dist`` was already run
# Example usage: ``make upload USERNAME=rgommers RELEASE=1.10.1``
ssh $(USERNAME)@new.scipy.org mkdir $(UPLOAD_DIR)
scp build/dist.tar.gz $(USERNAME)@new.scipy.org:$(UPLOAD_DIR)
ssh $(USERNAME)@new.scipy.org tar xvC $(UPLOAD_DIR) \
-zf $(UPLOAD_DIR)/dist.tar.gz
ssh $(USERNAME)@new.scipy.org mv $(UPLOAD_DIR)/numpy-ref.pdf \
$(UPLOAD_DIR)/numpy-ref-$(RELEASE).pdf
ssh $(USERNAME)@new.scipy.org mv $(UPLOAD_DIR)/numpy-user.pdf \
$(UPLOAD_DIR)/numpy-user-$(RELEASE).pdf
ssh $(USERNAME)@new.scipy.org mv $(UPLOAD_DIR)/numpy-html.zip \
$(UPLOAD_DIR)/numpy-html-$(RELEASE).zip
ssh $(USERNAME)@new.scipy.org /srv/bin/fixperm-scipy_org.sh

#------------------------------------------------------------------------------
# Basic Sphinx generation rules for different formats
Expand Down

0 comments on commit 0b83a90

Please sign in to comment.