GNU bug report logs - #71672
[PATCH] python: Prefer python3 over python

Previous Next

Package: automake-patches;

Reported by: Collin Funk <collin.funk1 <at> gmail.com>

Date: Thu, 20 Jun 2024 09:51:01 UTC

Severity: normal

Full log


View this message in rfc822 format

From: Collin Funk <collin.funk1 <at> gmail.com>
To: 71672 <at> debbugs.gnu.org
Subject: [bug#71672] [PATCH] python: Prefer python3 over python
Date: Thu, 20 Jun 2024 02:50:16 -0700
[Message part 1 (text/plain, inline)]
Hi,

Shouldn't AM_PATH_PYTHON check for the python3 command before python?
The full recommendation of how these should be setup is in PEP 394
[1].

On modern systems I don't think it should matter. On Fedora 40:

    $ command -v python
    /usr/bin/python
    $ command -v python3
    /usr/bin/python3
    $ python --version
    Python 3.12.3
    $ python3 --version
    Python 3.12.3

The difference mostly exists on older machines. On CentOS 7.9 for
example:

    $ command -v python
    /usr/bin/python
    $ command -v python3
    /usr/bin/python3
    $ python --version
    Python 2.7.5
    $ python3 --version
    Python 3.6.8

I've attached a proposed path. I don't see a situation where a
python3.* is installed without a python3 link. Therefore checking for
python3 and fallingback on python seems reasonable to me.

Collin

[1] https://peps.python.org/pep-0394/
[0001-python-Prefer-python3-over-python.patch (text/x-patch, attachment)]

This bug report was last modified 109 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.