Commit 5b27d255 authored by Mauro Carvalho Chehab's avatar Mauro Carvalho Chehab Committed by Jonathan Corbet
Browse files

scripts: sphinx-pre-install: check for PDF min version later on

parent ed2133b7
Loading
Loading
Loading
Loading
+10 −5
Original line number Diff line number Diff line
@@ -785,12 +785,13 @@ sub recommend_sphinx_version($)
{
	my $virtualenv_cmd = shift;

	if ($latest_avail_ver lt $min_pdf_version) {
	# Version is OK. Nothing to do.
	if ($cur_version && ($cur_version ge $rec_version)) {
		if ($cur_version lt $min_pdf_version) {
			print "note: If you want pdf, you need at least Sphinx $min_pdf_version.\n";
		}

	# Version is OK. Nothing to do.
	return if ($cur_version && ($cur_version ge $rec_version));
		return;
	};

	if (!$need_sphinx) {
		# sphinx-build is present and its version is >= $min_version
@@ -837,6 +838,10 @@ sub recommend_sphinx_version($)
			printf "\t. $activate_cmd\n";
			deactivate_help();

			if ($latest_avail_ver lt $min_pdf_version) {
				print "note: If you want pdf, you need at least Sphinx $min_pdf_version.\n";
			}

			return;
		}