From: Mauro Carvalho Chehab <mchehab@kernel.org>
To: "Bird, Tim" <Tim.Bird@sony.com>
Cc: "linux-doc@vger.kernel.org" <linux-doc@vger.kernel.org>,
"corbet@lwn.net" <corbet@lwn.net>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: RFC: Fix for sphinx setup message
Date: Sat, 22 Feb 2020 08:16:44 +0100 [thread overview]
Message-ID: <20200222081644.4ce926a0@kernel.org> (raw)
In-Reply-To: <MWHPR13MB0895675B302AF38BB1D141BBFD120@MWHPR13MB0895.namprd13.prod.outlook.com>
Hi Tim,
Em Fri, 21 Feb 2020 22:15:36 +0000
"Bird, Tim" <Tim.Bird@sony.com> escreveu:
> (Resend: Sorry for the dup. I forgot to include the maintainers, and I had the LKML
> address wrong.)
>
> I was trying to set up my machine to do some documentation work,
> and I had some problems with the sphinx install. I figured out how to work
> around the issue, but I have a question about how to add the information
> to scripts/sphinx-pre-install (or whether it should go somewhere else).
>
> Detailed messages below, but the TLl;DR is that I got the message:
> -------
> You should run:
>
> sudo apt-get install dvipng fonts-noto-cjk latexmk librsvg2-bin texlive-xetex
> /usr/bin/virtualenv sphinx_1.7.9
> . sphinx_1.7.9/bin/activate
> pip install -r ./Documentation/sphinx/requirements.txt
> ...
> ------
>
> The pip install step didn't work, and I found that I needed to have everything
> based on python3 instead. When I replaced:
> /usr/bin/virtualenv sphinx_1.7.9
> with
> /usr/bin/virtualenv -p python3 sphinx_1.7.9
> everything worked.
>
> This message is coming from scripts/sphinx-pre-install (I believe on line 708).
>
> Should I go ahead and submit a patch to add '-p python3' to that line?
>
> Are there any downsides to enforcing that the virtualenv used for the
> documentation build use python3 only?
Actually, the script tries to detect if python3 is installed. Currently, it
does it by seeking for a python3 variant of virtualenv. If it finds, it
changes the recommendation accordingly. The actual code with does that is
this one:
my $virtualenv = findprog("virtualenv-3");
$virtualenv = findprog("virtualenv-3.5") if (!$virtualenv);
$virtualenv = findprog("virtualenv") if (!$virtualenv);
$virtualenv = "virtualenv" if (!$virtualenv);
This works fine on older Fedora distros (and probably CentOS/RHEL), where
there is a python3 variant of virtualenv. On Ubuntu (and Fedora 31), it
will just use virtualenv.
So, perhaps if we add something like this (untested):
my $python = findprog("python3");
if ($python)
$virtualenv = "$virtualenv -p $python";
it would make the trick. Please notice, however, that this could cause
troubles with some distros that might have a version of virtualenv that
won't work with the above. So, perhaps we should add something like the
above inside give_debian_hints(), and either ensure that other Debian and
Ubuntu LTS versions will work with such change, or add some checks for the
Ubuntu/Debian versions where we know this works.
Note: the version of the distribution (and its name) is already stored
at the global var $system_release.
Cheers,
Mauro
next prev parent reply other threads:[~2020-02-22 7:16 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-21 22:15 RFC: Fix for sphinx setup message Bird, Tim
2020-02-22 7:16 ` Mauro Carvalho Chehab [this message]
2020-02-22 7:23 ` Mauro Carvalho Chehab
2020-02-24 19:50 ` Bird, Tim
-- strict thread matches above, loose matches on Subject: below --
2020-02-21 21:33 Bird, Tim
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200222081644.4ce926a0@kernel.org \
--to=mchehab@kernel.org \
--cc=Tim.Bird@sony.com \
--cc=corbet@lwn.net \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.