scripts/sphinx-pre-install: add how to exit virtualenv usage message
PATCH 1/1 scripts/sphinx-pre-install: add how to exit virtualenv usage message
Add usage message on how to exit the virtualenv after documentation work is done.
Signed-off-by Shuah Khan <[email protected]>
--- scripts/sphinx-pre-install | 8 ++++++++ 1 file changed, 8 insertions(+)
scripts/sphinx-pre-install +8 -0
@@ -645,6 +645,12 @@ sub check_distros() # Common dependencies # +sub deactivate_help() +{ + printf "\tWhen work is done exit the virtualenv:\n"; + printf "\tdeactivate\n"; +} + sub check_needs() { # Check for needed programs/tools
@@ -686,6 +692,7 @@ sub check_needs() if ($need_sphinx && scalar @activates > 0 && $activates[0] ge $min_activate) { printf "\nNeed to activate a compatible Sphinx version on virtualenv with:\n"; printf "\t. $activates[0]\n"; + deactivate_help(); exit (1); } else { my $rec_activate = "$virtenv_dir/bin/activate";
@@ -697,6 +704,7 @@ sub check_needs() printf "\t$virtualenv $virtenv_dir\n"; printf "\t. $rec_activate\n"; printf "\tpip install -r $requirement_file\n"; + deactivate_help(); $need++ if (!$rec_sphinx_upgrade); }
Signature · 1 line
2.20.1
Hi Shuah,
Em Tue, 17 Sep 2019 16:48:05 -0600
Shuah Khan <[email protected]> escreveu:
Quoted 2 lines
Add usage message on how to exit the virtualenv after documentation work is done.
Good idea.
Quoted 11 lines
Signed-off-by Shuah Khan <[email protected]>--- scripts/sphinx-pre-install | 8 ++++++++ 1 file changed, 8 insertions(+)scripts/sphinx-pre-install +0
-0
scripts/sphinx-pre-install sub check_distros() · line 651
Quoted 7 lines
scripts/sphinx-pre-install +4
-0@@ -645,6 +645,12 @@ sub check_distros() # Common dependencies # +sub deactivate_help() +{ + printf "\tWhen work is done exit the virtualenv:\n"; + printf "\tdeactivate\n";
I would change the message to something like:
If you want to exit the virtualenv, you can use:
deactivate
Btw, at least here, I recently noticed a conflict between the virtenv and scripts/spdxcheck.py. Running deactivate solves it.
Regards,
Mauro
Quoted 14 lines
scripts/sphinx-pre-install +3
-0+} + sub check_needs() { # Check for needed programs/tools@@ -686,6 +692,7 @@ sub check_needs() if ($need_sphinx && scalar @activates > 0 && $activates[0] ge $min_activate) { printf "\nNeed to activate a compatible Sphinx version on virtualenv with:\n"; printf "\t. $activates[0]\n"; + deactivate_help(); exit (1); } else { my $rec_activate = "$virtenv_dir/bin/activate";
scripts/sphinx-pre-install sub check_needs() · line 710
Quoted 7 lines
scripts/sphinx-pre-install +1
-0@@ -697,6 +704,7 @@ sub check_needs() printf "\t$virtualenv $virtenv_dir\n"; printf "\t. $rec_activate\n"; printf "\tpip install -r $requirement_file\n"; + deactivate_help(); $need++ if (!$rec_sphinx_upgrade); }
Thanks,
Mauro