Skip to content

Commit

Permalink
Handle Sphinx patches without hg
Browse files Browse the repository at this point in the history
  • Loading branch information
dvarrazzo committed Sep 29, 2012
1 parent 491b907 commit dee0747
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
16 changes: 12 additions & 4 deletions docs/Makefile
Expand Up @@ -6,8 +6,9 @@

PYTHON := python$(PYTHON_VERSION)
PYTHON_VERSION ?= $(shell $(PYTHON) -c 'import sys; print ("%d.%d" % sys.version_info[:2])')
BUILD_DIR = $(shell pwd)/build/lib.$(PYTHON_VERSION)
ENV_DIR = $(shell pwd)/env/py-$(PYTHON_VERSION)
ROOT_DIR = $(shell pwd)
BUILD_DIR = $(ROOT_DIR)/build/lib.$(PYTHON_VERSION)
ENV_DIR = $(ROOT_DIR)/env/py-$(PYTHON_VERSION)
ENV_BIN = $(ENV_DIR)/bin
ENV_LIB = $(ENV_DIR)/lib
EASY_INSTALL = PYTHONPATH=$(ENV_LIB) $(ENV_BIN)/easy_install-$(PYTHON_VERSION) -d $(ENV_LIB) -s $(ENV_BIN)
Expand All @@ -25,10 +26,16 @@ PLOTS = $(patsubst %.txt,%.png,$(wildcard ../sandbox/bench/*.txt))
default: html

html: $(PLOTS)
(cd env/sphinx-tip && hg qpush --all)
(cd $(ENV_DIR) && \
for p in `ls $(ROOT_DIR)/patches/*.patch`; do \
patch --verbose -p1 < $$p; \
done)
PYTHONPATH=$(ENV_LIB) $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) \
. $(BUILDDIR)/html
(cd env/sphinx-tip && hg qpop --all)
(cd $(ENV_DIR) && \
for p in `ls $(ROOT_DIR)/patches/*.patch`; do \
patch --verbose -p1 -R < $$p; \
done)

upload:
tar cjf - -C html . \
Expand All @@ -46,6 +53,7 @@ env: easy_install
mkdir -p $(ENV_LIB)
$(EASY_INSTALL) -U "Pygments>=1.5"
$(EASY_INSTALL) -U "sphinx>=1.1"
(cd $(ENV_DIR) && ln -s lib/Sphinx-*.egg/sphinx/ sphinx)

easy_install: ez_setup
PYTHONPATH=$(ENV_LIB) $(PYTHON) $(EZ_SETUP) -d $(ENV_LIB) -s $(ENV_BIN) setuptools
Expand Down
2 changes: 0 additions & 2 deletions docs/patches/series

This file was deleted.

Empty file removed docs/patches/status
Empty file.

0 comments on commit dee0747

Please sign in to comment.