History

scripts: sphinx-pre-install: change the output order

When the script detects the need for an upgrade, it will print either a warning or a note. Let's change a little bit the order where messages will be displayed, in order to make easier for the user to identify the more important messages. It should now be like this: Detected OS: Fedora release 31 (Thirty One). Sphinx version: 1.7.9 Note: It is recommended at least Sphinx version 2.4.4 if you need PDF support. To upgrade Sphinx, use: /usr/bin/python3 -m venv sphinx_2.4.4 . sphinx_2.4.4/bin/activate pip install -r ./Documentation/sphinx/requirements.txt If you want to exit the virtualenv, you can use: deactivate All optional dependencies are met. Needed package dependencies are met.

Mauro Carvalho Chehab committed 6 years ago

Commit ec43a271 parent 412b09d1 file · +10 −7Browse files

Unified · Split

scripts/sphinx-pre-install+10−7
@@ -320,15 +320,10 @@ sub check_sphinx() · 319 unmodified lines
320320 }
321321
322322 if ($cur_version lt $rec_version) {
323− printf "Sphinx version %s\n", $cur_version;
324− print "Warning: It is recommended at least Sphinx version $rec_version.\n";
325− print " If you want pdf, you need at least $min_pdf_version.\n";
326323 $rec_sphinx_upgrade = 1;
327324 return;
328325 }
329326 if ($cur_version lt $min_pdf_version) {
330− printf "Sphinx version %s\n", $cur_version;
331− print "Note: It is recommended at least Sphinx version $min_pdf_version if you need PDF support.\n";
332327 $rec_sphinx_upgrade = 1;
333328 return;
334329 }
@@ -716,10 +711,11 @@ sub check_needs() · 381 unmodified lines
716711 check_sphinx();
717712
718713 if ($system_release) {
719− print "Detected OS: $system_release.\n\n";
714+ print "Detected OS: $system_release.\n";
720715 } else {
721− print "Unknown OS\n\n";
716+ print "Unknown OS\n";
722717 }
718+ printf "Sphinx version: %s\n\n", $cur_version if ($cur_version);
723719
724720 # Check python command line, trying first python3
725721 $python_cmd = findprog("python3");
@@ -799,6 +795,13 @@ sub check_needs() · 73 unmodified lines
799795 my $min_activate = "$ENV{'PWD'}/${virtenv_prefix}${min_version}/bin/activate";
800796 my @activates = glob "$ENV{'PWD'}/${virtenv_prefix}*/bin/activate";
801797
798+ if ($cur_version lt $rec_version) {
799+ print "Warning: It is recommended at least Sphinx version $rec_version.\n";
800+ print " If you want pdf, you need at least $min_pdf_version.\n";
801+ }
802+ if ($cur_version lt $min_pdf_version) {
803+ print "Note: It is recommended at least Sphinx version $min_pdf_version if you need PDF support.\n";
804+ }
802805 @activates = sort {$b cmp $a} @activates;
803806 my ($activate, $ver);
804807 foreach my $f (@activates) {

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t