]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
build-doc: use alternate virtualenv dir, if specified
authorSage Weil <sage@newdream.net>
Mon, 12 Mar 2012 23:46:31 +0000 (16:46 -0700)
committerSage Weil <sage@newdream.net>
Mon, 12 Mar 2012 23:46:31 +0000 (16:46 -0700)
The docs gitbuilder will use this to avoid rebuilding the virtualenv on
every build.

Signed-off-by: Sage Weil <sage@newdream.net>
admin/build-doc

index 98aa626bbed9f629d7dced8cbf1dcc3a303fff31..81854640edf0a69ab40c322e9827c323f18e8284 100755 (executable)
@@ -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