/opt/local/bin/python2.5 as default MacPorts' "python" interpreter
Currently there is no official "python" interpreter for MacPorts (in the past there was a link to python2.3 even when python24 was installed, IIRC) but many Python programs (or their shebang lines) expect a "python" command in the PATH, otherwise Leopard's python2.5 is picked from its symbolic link "/usr/bin/python" and they don't work correctly. This is the case, for example, of Sudoku and Chess in gnome-games. I think that, similarly to the destroot phase of Tcl (ln -s ${prefix}/bin/tclsh8.5 ${destroot}${prefix}/bin/tclsh) an "/opt/local/bin/python" link should be created pointing to the 2.5 version, as MacPorts' "default" Python version.
Guido Soranzio wrote:
Currently there is no official "python" interpreter for MacPorts (in the past there was a link to python2.3 even when python24 was installed, IIRC) but many Python programs (or their shebang lines) expect a "python" command in the PATH, otherwise Leopard's python2.5 is picked from its symbolic link "/usr/bin/python" and they don't work correctly.
Or Tiger's python2.3 is picked, and it works even less correctly... (or alternatively python2.5, from python.org and /usr/local/bin)
This is the case, for example, of Sudoku and Chess in gnome-games.
And a lot of other ports have been patched, to avoid any use of the "python" command directly (this has been something of a pain to do)
I think that, similarly to the destroot phase of Tcl
(ln -s ${prefix}/bin/tclsh8.5 ${destroot}${prefix}/bin/tclsh)
an "/opt/local/bin/python" link should be created pointing to the 2.5 version, as MacPorts' "default" Python version.
The /opt/local/bin/python was leading to "python24", which was the default MacPorts Python version. The decision was made to move to python_select instead, and not have any default at all. http://lists.macosforge.org/pipermail/macports-dev/2007-August/ 002547.html So currently the initial setup with python_select(8) is mandatory... But I think it was a mistake to remove the default python version, and we should probably upgrade python to 2.5 - and perl to 5.10 ? --anders
A number of portfiles also just set the configure.env variable PYTHON=$ {prefix}/bin/python2.5 Is there any reason this can not be made part of the default environment for port? On 18 Jan 2008, at 04:34, Anders F Björklund wrote:
Guido Soranzio wrote:
Currently there is no official "python" interpreter for MacPorts (in the past there was a link to python2.3 even when python24 was installed, IIRC) but many Python programs (or their shebang lines) expect a "python" command in the PATH, otherwise Leopard's python2.5 is picked from its symbolic link "/usr/bin/python" and they don't work correctly.
Or Tiger's python2.3 is picked, and it works even less correctly... (or alternatively python2.5, from python.org and /usr/local/bin)
This is the case, for example, of Sudoku and Chess in gnome-games.
And a lot of other ports have been patched, to avoid any use of the "python" command directly (this has been something of a pain to do)
I think that, similarly to the destroot phase of Tcl
(ln -s ${prefix}/bin/tclsh8.5 ${destroot}${prefix}/bin/tclsh)
an "/opt/local/bin/python" link should be created pointing to the 2.5 version, as MacPorts' "default" Python version.
The /opt/local/bin/python was leading to "python24", which was the default MacPorts Python version. The decision was made to move to python_select instead, and not have any default at all.
http://lists.macosforge.org/pipermail/macports-dev/2007-August/002547.html
So currently the initial setup with python_select(8) is mandatory... But I think it was a mistake to remove the default python version, and we should probably upgrade python to 2.5 - and perl to 5.10 ?
--anders
_______________________________________________ macports-dev mailing list macports-dev@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo/macports-dev
Randall Wood randall.h.wood@alexandriasoftware.com http://shyramblings.blogspot.com "The rules are simple: The ball is round. The game lasts 90 minutes. All the rest is just philosophy."
Citando Anders F Björklund :
Guido Soranzio wrote:
Currently there is no official "python" interpreter for MacPorts (in the past there was a link to python2.3 even when python24 was installed, IIRC) but many Python programs (or their shebang lines) expect a "python" command in the PATH, otherwise Leopard's python2.5 is picked from its symbolic link "/usr/bin/python" and they don't work correctly.
Or Tiger's python2.3 is picked, and it works even less correctly... (or alternatively python2.5, from python.org and /usr/local/bin)
This is the case, for example, of Sudoku and Chess in gnome-games.
And a lot of other ports have been patched, to avoid any use of the "python" command directly (this has been something of a pain to do)
I think that, similarly to the destroot phase of Tcl
(ln -s ${prefix}/bin/tclsh8.5 ${destroot}${prefix}/bin/tclsh)
an "/opt/local/bin/python" link should be created pointing to the 2.5 version, as MacPorts' "default" Python version.
The /opt/local/bin/python was leading to "python24", which was the default MacPorts Python version. The decision was made to move to python_select instead, and not have any default at all.
http://lists.macosforge.org/pipermail/macports-dev/2007-August/ 002547.html
So currently the initial setup with python_select(8) is mandatory... But I think it was a mistake to remove the default python version, and we should probably upgrade python to 2.5 - and perl to 5.10 ?
So, for a port that works well with tiger's python2.3, leopard's python2.5 and macports' python2.3, 2.4 or 2.5, the correct dependency would be port:python_select or bin:python:python_select? And the python to choose ${prefix}/bin/python or the first python in the PATH? Emmanuel
Emmanuel Hainry wrote:
So, for a port that works well with tiger's python2.3, leopard's python2.5 and macports' python2.3, 2.4 or 2.5, the correct dependency would be port:python_select or bin:python:python_select? And the python to choose ${prefix}/bin/python or the first python in the PATH?
No, because python_select does not depend on any specific python version. It is used to make symlinks for already installed python version. Although the select files which are currently in python_select/files should be moved into the appropriate ports. The purpose of python_select is to give the user the choice which python version they want to run when typing in "python" or by #!/usr/bin/env python. Rainer
Rainer Müller wrote:
The purpose of python_select is to give the user the choice which python version they want to run when typing in "python" or by #!/usr/bin/env python.
The default, however, with or without python-select is now: /usr/bin/python. But it seems that it is missing a "python25-apple" selection for Leopard, so default selection there is /usr/bin/python2.3 (No such file or directory) --anders
Anders F Björklund wrote:
But it seems that it is missing a "python25-apple" selection for Leopard, so default selection there is /usr/bin/python2.3 (No such file or directory)
Good catch. I will fix that. Rainer
Just a note that ticket #13452 is still open, so given that the gnome/ python 'which (python) version will be used where' is still not resolved (and I realize that involves several maintainers coordinating, so I am not complaining, just observing), I'm not terrribly sanguine about seeing the default python move up to 2.5, but I suppose that won't affect this underlying issue either way... --Doug
participants (6)
-
Anders F Björklund
-
Douglas Philips
-
Emmanuel Hainry
-
Guido Soranzio
-
Rainer Müller
-
Randall Wood