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.
Unified · Split
| @@ -320,15 +320,10 @@ sub check_sphinx() · 319 unmodified lines | |||
| 320 | } | 320 | } |
| 321 | 321 | ||
| 322 | if ($cur_version lt $rec_version) { | 322 | 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"; | ||
| 326 | $rec_sphinx_upgrade = 1; | 323 | $rec_sphinx_upgrade = 1; |
| 327 | return; | 324 | return; |
| 328 | } | 325 | } |
| 329 | if ($cur_version lt $min_pdf_version) { | 326 | 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"; | ||
| 332 | $rec_sphinx_upgrade = 1; | 327 | $rec_sphinx_upgrade = 1; |
| 333 | return; | 328 | return; |
| 334 | } | 329 | } |
| @@ -716,10 +711,11 @@ sub check_needs() · 381 unmodified lines | |||
| 716 | check_sphinx(); | 711 | check_sphinx(); |
| 717 | 712 | ||
| 718 | if ($system_release) { | 713 | if ($system_release) { |
| 719 | print "Detected OS: $system_release.\n\n"; | 714 | print "Detected OS: $system_release.\n"; |
| 720 | } else { | 715 | } else { |
| 721 | print "Unknown OS\n\n"; | 716 | print "Unknown OS\n"; |
| 722 | } | 717 | } |
| 718 | printf "Sphinx version: %s\n\n", $cur_version if ($cur_version); | ||
| 723 | 719 | ||
| 724 | # Check python command line, trying first python3 | 720 | # Check python command line, trying first python3 |
| 725 | $python_cmd = findprog("python3"); | 721 | $python_cmd = findprog("python3"); |
| @@ -799,6 +795,13 @@ sub check_needs() · 73 unmodified lines | |||
| 799 | my $min_activate = "$ENV{'PWD'}/${virtenv_prefix}${min_version}/bin/activate"; | 795 | my $min_activate = "$ENV{'PWD'}/${virtenv_prefix}${min_version}/bin/activate"; |
| 800 | my @activates = glob "$ENV{'PWD'}/${virtenv_prefix}*/bin/activate"; | 796 | my @activates = glob "$ENV{'PWD'}/${virtenv_prefix}*/bin/activate"; |
| 801 | 797 | ||
| 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 | } | ||
| 802 | @activates = sort {$b cmp $a} @activates; | 805 | @activates = sort {$b cmp $a} @activates; |
| 803 | my ($activate, $ver); | 806 | my ($activate, $ver); |
| 804 | foreach my $f (@activates) { | 807 | foreach my $f (@activates) { |