From: Sage Weil Date: Mon, 12 Mar 2012 23:46:31 +0000 (-0700) Subject: build-doc: use alternate virtualenv dir, if specified X-Git-Tag: v0.44~15 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=dfe50bcbece0d5cec20a48f3c072f87c03b813d2;p=ceph.git build-doc: use alternate virtualenv dir, if specified The docs gitbuilder will use this to avoid rebuilding the virtualenv on every build. Signed-off-by: Sage Weil --- diff --git a/admin/build-doc b/admin/build-doc index 98aa626bbed9..81854640edf0 100755 --- a/admin/build-doc +++ b/admin/build-doc @@ -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