[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Texmacs-dev] python -> python2

From: Sebastian Miele
Subject: [Texmacs-dev] python -> python2
Date: Sun, 26 Jul 2020 22:30:42 +0200
User-agent: mu4e 1.4.12; emacs 27.0.91

On current Arch Linux, 'python --version' reports 'Python 3.8.3'. The
most recent Arch Linux package for TeXmacs contains TeXmacs 1.99.12. Its
PKGBUILD contains:

  find -name '*.py' | xargs sed -i 's/env python/env python2/'

The first line produces incorrect results on the current trunk/src,
because today there are python scripts with 'env python3', which
gets changed to 'env python23'.

I do not know Python. But I suspect that something like the
following is the case: In the past, just 'python' unambiguously
meant Python 2. At least on some systems there was no 'python2',
even if Python 2 was installed. Because of that 'python' was used
instead of 'python2' in TeXmacs.

Today the situation is different: Just 'python' means Python 3 at
least on Arch Linux. I strongly suspect that assumption A holds,
where A is: On recent systems, installing Python 2 always provides
a 'python2' in the path. If not, it can be considered to be a bug
of that system.

In fact, files like plugins/xypic/progs/init-xypic.scm today
consistently contain:

  (define (python-command)
    (if (url-exists-in-path? "python3") "python3" "python2"))

  (define (python-exists?)
    (or (url-exists-in-path? "python3")
        (url-exists-in-path? "python2")))

I do not understand the details. But almost certainly it means: A
already is assumed there.

Therefore I recommend the following: Run

: find -name '*.py' | xargs sed -i 's/env python$/env python2/'

(note the added '$') on trunk/svn and commit.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]