lkml.org 
[lkml]   [2020]   [Mar]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] scripts/sphinx-pre-install: add '-p python3' to virtualenv
From
Date

Am 04.03.20 um 09:31 schrieb Mauro Carvalho Chehab:
> Em Wed, 4 Mar 2020 07:20:48 +0100
> Markus Heiser <markus.heiser@darmarit.de> escreveu:
>> With py3 the recommended way to install virtual environments is::
>>
>> python3 -m venv sphinx-env
>>
>> This (python3) is what worked for me on RHEL/CentOS (dnf),
>> archlinux and debian/ubuntu (tested from 16.04 up to 20.04).
>
> Hmm... from:
>
> https://packaging.python.org/guides/installing-using-pip-and-virtual-environments/
>
> This works since Python version 3.3. It sounds doable to use it.
>
> Yet, if we'll be switching to this method, the script should check if
> the version is 3.3 or newer. The logic inside get_sphinx_fname() would
> also require some changes, as it won't need to install anymore the
> virtualenv program for Python >= 3.3.

I guess you can ignore 3.2 and downwards

https://en.wikipedia.org/wiki/History_of_Python#Table_of_versions

Support for py2.7 and >=py3.3 should match nearly all use cases / distributions
we support.

BTW: starting scripts with:

-m <module-name>
Searches sys.path for the named module and runs the
corresponding .py file as a script.

is mostly more robust. The option exists also in py2. From py3.3 on
a subset of virtualenv is built-in, so you can run '-m venv' ot of the
box.

-- Markus --

\
 
 \ /
  Last update: 2020-03-04 10:21    [W:0.078 / U:0.172 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site