Re: python -> python2

Darcy Shen via Texmacs-dev <[email protected]>
Newsgroups gmane.editors.texmacs.devel
Message-ID <[email protected]>
Most of the python scripts are maintained by me(Darcy Shen).


$ git grep "env python3"

misc/admin/pr:#!/usr/bin/env python3
plugins/tmpy/session/tm_tikz.py:#!/usr/bin/env python3


I found that two of the python scripts use "#!/usr/bin/env python3", I 
will fix it later.

Currently, we use Python 2 as an alternative to run the python scripts.

We will try to keep Python 2 compatibility, but Python 3 is preferred.


On 2020/7/27 上午4:30, Sebastian Miele wrote:
> 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.
>
> _______________________________________________
> Texmacs-dev mailing list
> [email protected]
> https://lists.gnu.org/mailman/listinfo/texmacs-dev


_______________________________________________
Texmacs-dev mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/texmacs-dev
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.