Opened 11 years ago

Closed 10 years ago

#38661 closed defect (duplicate)

python32 @3.2.3 doesn't create a python3 link while python2 is installed

Reported by: macports.jgonggrijp@… Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version: 2.1.3
Keywords: Cc: jyrkiwahlstedt, erickt@…, cooljeanius (Eric Gallager), raimue (Rainer Müller), g5pw (Aljaž Srebrnič), guillaumesalagnac
Port: python_select python32 python33 python31

Description

I have python26, python27 and python32 installed on Mac OS X 10.6.8 with Xcode 3.2.6. Normally when Python 2 and Python 3 are installed alongside on a unixy system there should be both a python2 link and a python3 link, as detailed in PEP 394: http://www.python.org/dev/peps/pep-0394/

MacPorts does indeed install a python2 command, but no python3 command. This is what I get when I run ls /opt/local/bin/python*:

/opt/local/bin/python		/opt/local/bin/python2.6-config	/opt/local/bin/pythonw
/opt/local/bin/python-config	/opt/local/bin/python2.7	/opt/local/bin/pythonw2
/opt/local/bin/python2		/opt/local/bin/python2.7-config	/opt/local/bin/pythonw2.6
/opt/local/bin/python2-config	/opt/local/bin/python3.2	/opt/local/bin/pythonw2.7
/opt/local/bin/python2.6	/opt/local/bin/python3.2-config	/opt/local/bin/pythonw3.2

Usually I have python27 selected as the default version, but changing that setting to python32 does not change the above directory listing.

This may also affect other python3x ports; I haven't checked whether that is the case.

Somewhat related: ticket 34326.

Change History (13)

comment:1 Changed 11 years ago by cooljeanius (Eric Gallager)

Cc: egall@… added

Cc Me!

comment:2 Changed 11 years ago by jmroot (Joshua Root)

Cc: raimue@… added
Port: python_select added

I think the python2 and python3 links should really be managed by port select. Where does your existing python2 link point to, BTW?

comment:3 in reply to:  2 ; Changed 11 years ago by macports.jgonggrijp@…

python2 points to python2.7.

I think the python2 and python3 links should both exist regardless of what version is selected as the default. The Python versions are installed in parallel for a reason; you want to be able to run both and be able to (portably) indicate which one for example in a shebang line. See the PEP for a full rationale.

comment:4 in reply to:  3 ; Changed 11 years ago by larryv (Lawrence Velázquez)

Replying to macports.jgonggrijp@…:

I think the python2 and python3 links should both exist regardless of what version is selected as the default.

I would assume that the python2 and python3 select groups would be independent of the python select group.

comment:5 in reply to:  4 Changed 11 years ago by macports.jgonggrijp@…

I would assume that the python2 and python3 select groups would be independent of the python select group.

Well, that would certainly be nice. I guess this is what jmr meant, sorry for being dense. ;)

Though as far as portability (and the PEP) is concerned, it's sufficient if each link points to the latest corresponding version that is installed.

comment:6 Changed 11 years ago by g5pw (Aljaž Srebrnič)

Cc: g5pw@… added

Cc Me!

comment:7 Changed 11 years ago by g5pw (Aljaž Srebrnič)

Anyone already working on this? I can give a shot at splitting python_select into python{2,3}_select.

comment:8 in reply to:  7 ; Changed 11 years ago by larryv (Lawrence Velázquez)

Replying to g5pw@…:

Anyone already working on this? I can give a shot at splitting python_select into python{2,3}_select.

I’m not sure we want to get rid of the python select group. Adding python2 and python3 is probably fine, though.

comment:9 in reply to:  8 ; Changed 11 years ago by g5pw (Aljaž Srebrnič)

Replying to larryv@…:

I’m not sure we want to get rid of the python select group. Adding python2 and python3 is probably fine, though.

Why not? I don't suggest removing it completely, but splitting it two select groups. Then we just have to figure out how to select %prefix/bin/python.

comment:10 in reply to:  9 Changed 11 years ago by larryv (Lawrence Velázquez)

Replying to g5pw@…:

Replying to larryv@…:

I’m not sure we want to get rid of the python select group. Adding python2 and python3 is probably fine, though.

Why not? I don't suggest removing it completely, but splitting it two select groups. Then we just have to figure out how to select %prefix/bin/python.

I’m not sure what you mean.

My thought is that we’d have three groups—“python”, “python2”, and “python3”—all set independently of each other.

comment:11 Changed 10 years ago by guillaumesalagnac

Cc me

comment:12 Changed 10 years ago by guillaumesalagnac

Cc: guillaume.salagnac@… added

Cc Me!

comment:13 Changed 10 years ago by larryv (Lawrence Velázquez)

Resolution: duplicate
Status: newclosed

Consolidating into #34326.

Note: See TracTickets for help on using tickets.