[MacPorts] #34326: No select group for "python3" command
#34326: No select group for "python3" command -------------------------------------+-------------------------------------- Reporter: mikko@… | Owner: macports-tickets@… Type: enhancement | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.0.4 Keywords: | Port: -------------------------------------+-------------------------------------- Macports provides selection of default Python interpreter as described here: http://stackoverflow.com/a/6159178/315168 (sudo port select python...) It would be nice to have select for "python3" command, because Python 2.x and Python 3.x scripts are incompatible and there is no way to invoke default "python3". E.g. Ubuntu/Debian provides python3 command which points to latest Python 3.x interpreter. Spec: http://www.python.org/dev/peps/pep-0394/ Example and more xplatform discussion here: http://stackoverflow.com/a/10164449/315168 -- Ticket URL: <https://trac.macports.org/ticket/34326> MacPorts <http://www.macports.org/> Ports system for Mac OS
#34326: No select group for "python3" command -------------------------------------+-------------------------------------- Reporter: mikko@… | Owner: macports-tickets@… Type: enhancement | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.0.4 Keywords: | Port: -------------------------------------+-------------------------------------- Changes (by ryandesign@…): * cc: erickt@…, jwa@…, raimue@… (added) -- Ticket URL: <https://trac.macports.org/ticket/34326#comment:1> MacPorts <http://www.macports.org/> Ports system for Mac OS
#34326: No select group for "python3" command -------------------------------------+-------------------------------------- Reporter: mikko@… | Owner: macports-tickets@… Type: enhancement | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.0.4 Keywords: | Port: -------------------------------------+-------------------------------------- Comment(by raimue@…): `bin/python2` could be added to the normal `python`group. However, `bin/python3` would require a new select group. -- Ticket URL: <https://trac.macports.org/ticket/34326#comment:2> MacPorts <http://www.macports.org/> Ports system for Mac OS
#34326: No select group for "python3" command --------------------------+-------------------------------- Reporter: mikko@… | Owner: macports-tickets@… Type: enhancement | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.0.4 Resolution: | Keywords: Port: | --------------------------+-------------------------------- Comment (by eric.lebigot@…): Related: the python32 port contains a python3 command, which could clash with a python3 command created through port select. It looks to me like the python32 port should not contain any python3 command and that handling it should be done through port select. +1 vote for adding a python3 group. :) -- Ticket URL: <https://trac.macports.org/ticket/34326#comment:3> MacPorts <http://www.macports.org/> Ports system for Mac OS
#34326: No select group for "python3" command --------------------------+-------------------------------- Reporter: mikko@… | Owner: macports-tickets@… Type: enhancement | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.0.4 Resolution: | Keywords: Port: | --------------------------+-------------------------------- Comment (by felipou@…): I'm interested in this too. I'm not very experienced with creating ports (created just one so far), but it seems like there could be some complications to implementing this. Basically it would be a matter of creating a python3 group (basically just duplicate the python_select port: https://trac.macports.org/browser/trunk/dports/sysutils/python_select?order=...) and setting this group at the python3 ports (like https://trac.macports.org/browser/trunk/dports/lang/python33/Portfile). The thing is, I suspected it isn't possible to set multiple select groups for a single port, and python3 ports already set the python select group. If this isn't so (that is, macports already supports multiple select groups), this seems like a fairly easy thing to do. Otherwise, we would need to implement this in macports first. Then I won't be able to help, I have never programmed in Tcl before. Can someone more experienced with macports enlighten us about this issue? -- Ticket URL: <https://trac.macports.org/ticket/34326#comment:5> MacPorts <http://www.macports.org/> Ports system for OS X
#34326: No select group for "python3" command --------------------------+-------------------------------- Reporter: mikko@… | Owner: macports-tickets@… Type: enhancement | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.0.4 Resolution: | Keywords: Port: | --------------------------+-------------------------------- Comment (by lucractius@…): This needs to be looked at, either the feature is easy or it is hard, can we get an answer which guides progress? Lack of python2 and python3 shortcuts leaves macports out of line with other package management tools and makes it harder to use. -- Ticket URL: <https://trac.macports.org/ticket/34326#comment:7> MacPorts <http://www.macports.org/> Ports system for OS X
#34326: No select group for "python3" command --------------------------+-------------------------------- Reporter: mikko@… | Owner: macports-tickets@… Type: enhancement | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.0.4 Resolution: | Keywords: Port: | --------------------------+-------------------------------- Comment (by pixilla@…): The python32 port supports "port select": {{{ $ python --version Python 2.7.6 $ port select python Available versions for python: none python25-apple python26 python26-apple python27 (active) python27-apple python32 $ sudo port select python python32 Selecting 'python32' for 'python' succeeded. 'python32' is now active. $ python --version Python 3.2.5 }}} -- Ticket URL: <https://trac.macports.org/ticket/34326#comment:8> MacPorts <http://www.macports.org/> Ports system for OS X
#34326: No select group for "python3" command --------------------------+-------------------------------- Reporter: mikko@… | Owner: macports-tickets@… Type: enhancement | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.0.4 Resolution: | Keywords: Port: | --------------------------+-------------------------------- Comment (by sean@…): Replying to [comment:7 lucractius@…]:
This needs to be looked at, either the feature is easy or it is hard, can we get an answer which guides progress? Lack of python2 and python3 shortcuts leaves macports out of line with other package management tools and makes it harder to use.
I agree. This is a historic failure of python 2.6+ not including a python2 link but is easy enough to fix in MacPorts. How do other package managers do this? How should MacPorts? I guess we should leave the current port select for python untouched and just add a python2 and python3 select group? -- Ticket URL: <https://trac.macports.org/ticket/34326#comment:10> MacPorts <http://www.macports.org/> Ports system for OS X
#34326: No select group for "python3" command --------------------------+-------------------------------- Reporter: mikko@… | Owner: macports-tickets@… Type: enhancement | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.0.4 Resolution: | Keywords: Port: | --------------------------+-------------------------------- Comment (by sean@…): Replying to [comment:8 pixilla@…]:
The python32 port supports "port select":
The issue is that there is no `python2` nor `python3` in `${prefix}/bin`. -- Ticket URL: <https://trac.macports.org/ticket/34326#comment:11> MacPorts <http://www.macports.org/> Ports system for OS X
#34326: No select group for "python3" command --------------------------+-------------------------------- Reporter: mikko@… | Owner: macports-tickets@… Type: enhancement | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.0.4 Resolution: | Keywords: Port: | --------------------------+-------------------------------- Comment (by pixilla@…): Replying to [comment:11 sean@…]:
Replying to [comment:8 pixilla@…]:
The python32 port supports "port select":
The issue is that there is no `python2` nor `python3` in `${prefix}/bin`. Does [https://trac.macports.org/attachment/ticket/34326/patch- python_select-add-versioned-bin.diff patch-python_select-add-versioned- bin.diff] cover the files we would want to add {2,3} to?
-- Ticket URL: <https://trac.macports.org/ticket/34326#comment:12> MacPorts <http://www.macports.org/> Ports system for OS X
#34326: No select group for "python3" command --------------------------+-------------------------------- Reporter: mikko@… | Owner: macports-tickets@… Type: enhancement | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.0.4 Resolution: | Keywords: Port: | --------------------------+-------------------------------- Comment (by pixilla@…): If the desire is to have bin/python2 and bin/python3 side by side than new python2_select and python3_select ports could provide that. -- Ticket URL: <https://trac.macports.org/ticket/34326#comment:13> MacPorts <http://www.macports.org/> Ports system for OS X
#34326: No select group for "python3" command --------------------------+-------------------------------- Reporter: mikko@… | Owner: macports-tickets@… Type: enhancement | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.0.4 Resolution: | Keywords: Port: | --------------------------+-------------------------------- Comment (by felipou@…): Replying to [comment:13 pixilla@…]:
If the desire is to have bin/python2 and bin/python3 side by side than new python2_select and python3_select ports could provide that.
Can you help me do that? Just point me in the right directions. Should I just copy the python_select port and modify what I see fit? And then request that the related python packages add the related group? Is it ok for a port to have two "select groups" related to it? (for example, python32 would be related both to python_select and python3_select) -- Ticket URL: <https://trac.macports.org/ticket/34326#comment:14> MacPorts <http://www.macports.org/> Ports system for OS X
#34326: No select group for "python3" command --------------------------+-------------------------------- Reporter: mikko@… | Owner: macports-tickets@… Type: enhancement | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.0.4 Resolution: | Keywords: Port: | --------------------------+-------------------------------- Comment (by aivazis@…): Replying to [comment:12 pixilla@…]:
Replying to [comment:11 sean@…]:
Replying to [comment:8 pixilla@…]:
The python32 port supports "port select":
The issue is that there is no `python2` nor `python3` in `${prefix}/bin`. Does [https://trac.macports.org/attachment/ticket/34326/patch- python_select-add-versioned-bin.diff patch-python_select-add-versioned- bin.diff] cover the files we would want to add {2,3} to?
It looks to me like this patch solves the problem in its entirety. Did anyone else test? What is the progress in pushing it to distribution? -- Ticket URL: <https://trac.macports.org/ticket/34326#comment:15> MacPorts <http://www.macports.org/> Ports system for OS X
#34326: No select group for "python3" command --------------------------+-------------------------------- Reporter: mikko@… | Owner: macports-tickets@… Type: enhancement | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.0.4 Resolution: | Keywords: Port: | --------------------------+-------------------------------- Comment (by raimue@…): Replying to [comment:15 aivazis@…]:
Does [https://trac.macports.org/attachment/ticket/34326/patch- python_select-add-versioned-bin.diff patch-python_select-add-versioned- bin.diff] cover the files we would want to add {2,3} to?
It looks to me like this patch solves the problem in its entirety. Did anyone else test? What is the progress in pushing it to distribution?
That won't solve the real issue. This will provide either `python2` or `python3`, not both at the same time. As said above, we would need python2_select and python3_select groups for this. -- Ticket URL: <https://trac.macports.org/ticket/34326#comment:16> MacPorts <http://www.macports.org/> Ports system for OS X
#34326: No select group for "python3" command --------------------------+-------------------------------- Reporter: mikko@… | Owner: macports-tickets@… Type: enhancement | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.0.4 Resolution: | Keywords: Port: | --------------------------+-------------------------------- Comment (by calvin.giles@…): Can a select group point to the command of another select group? As in: port select python2 python26 port select python3 python33 port select python python3 Here, python ports are divided into python2 and python3 selects, and the python select points to the results of those. This feels cleaner to me anyway - choosing which version of python2 is separate from the 2 or 3 choice. On the other hand, it forces the python command to match the version of python2 or python3, which os a little less generic. Can this be implemented more easiliy? (I have not done any ports dev yet) -- Ticket URL: <https://trac.macports.org/ticket/34326#comment:17> MacPorts <http://www.macports.org/> Ports system for OS X
#34326: Python ports do not adhere to PEP 394 and provide "python2" and "python3" -------------------------------------------------+------------------------- Reporter: mikko@… | Owner: macports- Type: enhancement | tickets@… Priority: Normal | Status: new Component: ports | Milestone: Resolution: | Version: 2.0.4 Port: python_select python24 python25 | Keywords: python26 python27 python31 python32 python33 | python34 | -------------------------------------------------+------------------------- Changes (by larryv@…): * cc: and.damore@…, g5pw@…, guillaume.salagnac@…, larryv@…, macports.jgonggrijp@…, nad@… (added) * port: => python_select python24 python25 python26 python27 python31 python32 python33 python34 Comment: Consolidating #38661, #42747, and #45130 into this ticket. -- Ticket URL: <https://trac.macports.org/ticket/34326#comment:18> MacPorts <http://www.macports.org/> Ports system for OS X
participants (1)
-
MacPorts