Bug#737376: texlive-extra-utils: Debian pythontex can't use python3
On Wed, Feb 12, 2014 at 08:02:51AM +0900, Norbert Preining wrote: Hi Julian, python3 /usr/share/texlive/texmf-dist/scripts/pythontex/pythontex3.py \ --interpreter python:python3 $@ Ok, changed the script. Will rebuild later on with checkout from CTAN of today. Is the same needed for depythontex3? I guess no? Indeed: depythontex has no similar option, so depythontex3 is actually unnecessary. Julian -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#737376: texlive-extra-utils: Debian pythontex can't use python3
On Mi, 12 Feb 2014, Julian Gilbey wrote: Indeed: depythontex has no similar option, so depythontex3 is actually unnecessary. Well, if you only want to run python3 it does not hurt to have depythontex3 as more or less python3 .../depythontex2.py somewhere. Anyway, I just found a file that was recently included in TL that contains GFDL ...arg..(only backcover text The licese is included ...) but still, it has to go. How much do I hate rebuilding all the packages every day ;-) Norbert PREINING, Norbert http://www.preining.info JAIST, Japan TeX Live Debian Developer DSA: 0x09C5B094 fp: 14DF 2E6C 0307 BE6D AD76 A9C0 D2BF 4AA3 09C5 B094 -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#737376: texlive-extra-utils: Debian pythontex can't use python3
On Mon, Feb 10, 2014 at 08:33:21AM +0900, Norbert Preining wrote: tags 737376 + pending thanks On So, 02 Feb 2014, Julian Gilbey wrote: Create a copy of pythontex.py in /usr/share/texlive/texmf-dist/scripts/pythontex, called say pythontex3-init.py (pythontex3.py is already used), which has the first line THere is already a script pythontex3.py in the directory, but it still is called with evn python. I have installed changes to the packaging that we instead install a script for (de)pythontex3 that warns if python3 is not available, otherwise runs the script with python3 (yours had exec ...) I hope that fits you? See git 914322d3f in texlive-nonbin repo Thanks, Norbert! After numerous failed attempts to clone the git repository (alioth keeps dropping https connections :-( ) I finally gave up and looked at the online version ;-) I hadn't realised, but it's now been explained, that the (de)pythontex3.py scripts are just Python 3 translations of the (de)pythontex2.py scripts and they behave identically otherwise. So it is almost pointless having the /usr/bin/(de)pythontex3 scripts, as they achieve nothing unless someone uninstalls all of their python2.x packages and python-minimal and is left with only /usr/bin/python3 on their system. (This is unlikely to happen.) And in that case, /usr/bin/pythontex will fail, but /usr/bin/pythontex3 will succeed. It's unlikely to be a real use-case. Much more interesting would be if the /usr/bin/pythontex3 were to include the argument --interpreter python:python3 before $@, for that way, the python interpreter used for the embedded python code would be python3 rather than python=python2. In that way, /usr/bin/pythontex3 would actually have value. There is no similar argument for depythontex, so depythontex3 would be there for parallel but has no significant use beyond it. :-) Julian -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#737376: texlive-extra-utils: Debian pythontex can't use python3
Hi Julian, After numerous failed attempts to clone the git repository (alioth keeps dropping https connections :-( ) I finally gave up and looked at Huu? Strange. I hadn't realised, but it's now been explained, that the (de)pythontex3.py scripts are just Python 3 translations of the (de)pythontex2.py scripts and they behave identically otherwise. So it is almost pointless having the /usr/bin/(de)pythontex3 scripts, as No. Much more interesting would be if the /usr/bin/pythontex3 were to include the argument --interpreter python:python3 before $@, for Did you see the scripts I have added to the texlive-extra tree and that will be installed? texlive-nonbin.git/texlive-extra-debian/pythontex3 is nothing else but: if which python3 /dev/null 21 then python3 /usr/share/texlive/texmf-dist/scripts/pythontex/pythontex3.py $@ else echo You need to have python3 installed to be able to use 2 echo the Python 3 version of pythontex! 2 echo Exiting. 2 fi That is why I wrote in the last email that I used your script, but changed the exec to a call to python3 ... That should suffice, though, right? Norbert PREINING, Norbert http://www.preining.info JAIST, Japan TeX Live Debian Developer DSA: 0x09C5B094 fp: 14DF 2E6C 0307 BE6D AD76 A9C0 D2BF 4AA3 09C5 B094 -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#737376: texlive-extra-utils: Debian pythontex can't use python3
On Wed, Feb 12, 2014 at 07:33:01AM +0900, Norbert Preining wrote: Much more interesting would be if the /usr/bin/pythontex3 were to include the argument --interpreter python:python3 before $@, for Did you see the scripts I have added to the texlive-extra tree and that will be installed? texlive-nonbin.git/texlive-extra-debian/pythontex3 is nothing else but: if which python3 /dev/null 21 then python3 /usr/share/texlive/texmf-dist/scripts/pythontex/pythontex3.py $@ else echo You need to have python3 installed to be able to use 2 echo the Python 3 version of pythontex! 2 echo Exiting. 2 fi That is why I wrote in the last email that I used your script, but changed the exec to a call to python3 ... Indeed. I wrote that script before I understood what pythontex3 did. Geoffrey wrote to me (but forgot to copy in the bug report): Julian, In the latest beta relase, I've modified the hashbangs in `pythontex2.py` and `pythontex3.py` to `env python2` and `env python3`. If no bugs are found in the next several days, I will release to CTAN and then it will be available for TeX Live. One thing I forgot to mention. The version of Python that launches PythonTeX is primarily used to manage/oversee code execution...and this version doesn't really matter (except for highlighting and console emulation). The version of Python that is actually used to run user code from the document is determined by what `python` gives on the command line. This can be customized with the `--interpreter` option. For example, `pythontex --interpreter python:python3 file.tex` would call the temporary scripts that PythonTeX uses with `python3 temp_script`. Geoff So... That should suffice, though, right? So in its current form it doesn't actually achieve anything of value. But changing the call to read: python3 /usr/share/texlive/texmf-dist/scripts/pythontex/pythontex3.py \ --interpreter python:python3 $@ would actually make it do what people would expect, which is to use python3 to process the code in the LaTeX document. Julian -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#737376: texlive-extra-utils: Debian pythontex can't use python3
Hi Julian, python3 /usr/share/texlive/texmf-dist/scripts/pythontex/pythontex3.py \ --interpreter python:python3 $@ Ok, changed the script. Will rebuild later on with checkout from CTAN of today. Is the same needed for depythontex3? I guess no? Norbert PREINING, Norbert http://www.preining.info JAIST, Japan TeX Live Debian Developer DSA: 0x09C5B094 fp: 14DF 2E6C 0307 BE6D AD76 A9C0 D2BF 4AA3 09C5 B094 -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#737376: texlive-extra-utils: Debian pythontex can't use python3
tags 737376 + pending thanks On So, 02 Feb 2014, Julian Gilbey wrote: Create a copy of pythontex.py in /usr/share/texlive/texmf-dist/scripts/pythontex, called say pythontex3-init.py (pythontex3.py is already used), which has the first line THere is already a script pythontex3.py in the directory, but it still is called with evn python. I have installed changes to the packaging that we instead install a script for (de)pythontex3 that warns if python3 is not available, otherwise runs the script with python3 (yours had exec ...) I hope that fits you? See git 914322d3f in texlive-nonbin repo Thanks Norbert PREINING, Norbert http://www.preining.info JAIST, Japan TeX Live Debian Developer DSA: 0x09C5B094 fp: 14DF 2E6C 0307 BE6D AD76 A9C0 D2BF 4AA3 09C5 B094 -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#737376: texlive-extra-utils: Debian pythontex can't use python3
On Mon, Feb 03, 2014 at 11:21:17AM +0900, Norbert Preining wrote: On So, 02 Feb 2014, Julian Gilbey wrote: That way, pythontex will use Python 2.7 and pythontex3 will use Python 3.x. And we should recommend/depend/suggest both python2 and python3, or is there a different way? I would think that anyone actively trying to use pythontex3 would be knowingly using python3 and hence having python3 installed. The devscripts package is a good example of such a thing (lots of Suggests and explanation in the package description and README). Alternatively, if one wanted to be extra-careful, the /usr/bin/pythontex3 script could, instead of a symlink, be the following (untested): #!/bin/sh if which python3 /dev/null 21 then exec /usr/share/texlive/texmf-dist/scripts/pythontex3.py $@ else echo You need to have python3 installed to be able to use 2 echo the Python 3 version of pythontex! 2 echo Exiting. 2 fi Julian -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#737376: texlive-extra-utils: Debian pythontex can't use python3
Package: texlive-extra-utils Version: 2013.20131219-1 Tags: patch I just read about pythontex in TUGboat - it sounds great! I was a little surprised that it says, though, that it's only for Python 2.7. So I looked at the code, and it has support for Python 3.2+; yay! Unfortunately, though, the invocation doesn't allow this to work on Debian: /usr/bin/pythontex - /usr/share/texlive/texmf-dist/scripts/pythontex/pythontex.py has the first line: #!/usr/bin/env python and on Debian, /usr/bin/python is a symlink to python2.7, so the rest of the pythontex.py code, which checks whether python2 or python3 is being used, is effectively redundant. My suggested patch is as follows: Create a copy of pythontex.py in /usr/share/texlive/texmf-dist/scripts/pythontex, called say pythontex3-init.py (pythontex3.py is already used), which has the first line #!/usr/bin/python3 or #!/usr/bin/env python3 and symlink /usr/bin/pythontex3 to it. That way, pythontex will use Python 2.7 and pythontex3 will use Python 3.x. Julian -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#737376: texlive-extra-utils: Debian pythontex can't use python3
On So, 02 Feb 2014, Julian Gilbey wrote: That way, pythontex will use Python 2.7 and pythontex3 will use Python 3.x. And we should recommend/depend/suggest both python2 and python3, or is there a different way? Norbert PREINING, Norbert http://www.preining.info JAIST, Japan TeX Live Debian Developer DSA: 0x09C5B094 fp: 14DF 2E6C 0307 BE6D AD76 A9C0 D2BF 4AA3 09C5 B094 -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org