aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xscripts/sphinx-pre-install28
1 files changed, 18 insertions, 10 deletions
diff --git a/scripts/sphinx-pre-install b/scripts/sphinx-pre-install
index 5fe3b4a86174..bcd6f7978f8d 100755
--- a/scripts/sphinx-pre-install
+++ b/scripts/sphinx-pre-install
@@ -13,6 +13,8 @@ use strict;
13# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14# GNU General Public License for more details. 14# GNU General Public License for more details.
15 15
16my $virtenv_dir = "sphinx_1.4";
17
16# 18#
17# Static vars 19# Static vars
18# 20#
@@ -454,16 +456,22 @@ sub check_needs()
454 which("sphinx-build-3"); 456 which("sphinx-build-3");
455 } 457 }
456 if ($need_sphinx) { 458 if ($need_sphinx) {
457 my $virtualenv = findprog("virtualenv-3"); 459 my $activate = "$virtenv_dir/bin/activate";
458 $virtualenv = findprog("virtualenv") if (!$virtualenv); 460 if (-e "$ENV{'PWD'}/$activate") {
459 $virtualenv = "virtualenv" if (!$virtualenv); 461 printf "\nNeed to activate virtualenv with:\n";
460 462 printf "\t. $activate\n";
461 printf "\t$virtualenv sphinx_1.4\n"; 463 } else {
462 printf "\t. sphinx_1.4/bin/activate\n"; 464 my $virtualenv = findprog("virtualenv-3");
463 printf "\tpip install 'docutils==0.12'\n"; 465 $virtualenv = findprog("virtualenv") if (!$virtualenv);
464 printf "\tpip install 'Sphinx==1.4.9'\n"; 466 $virtualenv = "virtualenv" if (!$virtualenv);
465 printf "\tpip install sphinx_rtd_theme\n"; 467
466 $need++; 468 printf "\t$virtualenv $virtenv_dir\n";
469 printf "\t. $activate\n";
470 printf "\tpip install 'docutils==0.12'\n";
471 printf "\tpip install 'Sphinx==1.4.9'\n";
472 printf "\tpip install sphinx_rtd_theme\n";
473 $need++;
474 }
467 } 475 }
468 printf "\n"; 476 printf "\n";
469 477