Skip to content

Commit

Permalink
build-doc: use alternate virtualenv dir, if specified
Browse files Browse the repository at this point in the history
The docs gitbuilder will use this to avoid rebuilding the virtualenv on
every build.

Signed-off-by: Sage Weil <[email protected]>
  • Loading branch information
liewegas committed Mar 12, 2012
1 parent 6869c57 commit dfe50bc
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions admin/build-doc
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,15 @@ cat src/osd/PG.h src/osd/PG.cc | doc/scripts/gen_state_diagram.py > doc/dev/peer

cd build-doc

if [ ! -e virtualenv ]; then
virtualenv --no-site-packages virtualenv
[ -z "$vdir" ] && vdir="./virtualenv"

if [ ! -e $vdir ]; then
virtualenv --no-site-packages $vdir
fi
./virtualenv/bin/pip install --quiet -r ../admin/doc-requirements.txt
$vdir/bin/pip install --quiet -r ../admin/doc-requirements.txt

install -d -m0755 \
output/html \
output/man
PYTHONPATH=`pwd`/../src/pybind ./virtualenv/bin/sphinx-build -a -b dirhtml -d doctrees ../doc output/html
./virtualenv/bin/sphinx-build -a -b man -d doctrees ../doc output/man
PYTHONPATH=`pwd`/../src/pybind $vdir/bin/sphinx-build -a -b dirhtml -d doctrees ../doc output/html
$vdir/bin/sphinx-build -a -b man -d doctrees ../doc output/man

0 comments on commit dfe50bc

Please sign in to comment.