[MacPorts] #34326: Python ports do not adhere to PEP 394 and provide "python2" and "python3"

MacPorts noreply at macports.org
Sun May 24 13:07:43 PDT 2015


#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                                       |
-------------------------------------------------+-------------------------

Comment (by larryv@…):

 Replying to [comment:29 larryv@…]:
 > Long answer: Coming soon.

 Okay, I lied. Sorry.

 We cannot currently adhere to PEP 394 in full (not easily, anyway). But
 we should be able to adhere to the most important parts.

 We should not simply augment the current `python` select group. Doing so
 would preclude the 2.//x// links and 3.//x// links from coexisting,
 since only one port can be selected at a time. We do allow multiple
 Python ports to be installed concurrently, so this limitation would
 violate a pretty important part of the PEP.

 Using `python2` and `python3` ports would be inconsistent with our usual
 method of providing users with a selection. I don't think we want to
 create another `perl5`-type situation.

 I recommend creating new `python2` and `python3` select groups.
 - Pros
     - Is the standards MacPorts method of allowing users to choose
       a default from a selection of versioned ports.
     - Allows the 2.//x// and 3.//x// symlinks to exist concurrently.
     - Does not impose behavior on users who have already made
       a selection using the `python` group.
 - Cons
     - Not actually possible right now. Surprise! The select-1.0
       portgroup does not yet allow one port to register itself with
       multiple select groups. Fortunately, this functionality should be
       easy to add.
     - Cannot install the symlinks automatically whenever a `python2x` or
       `python3x` port is installed. MacPorts does not provide a good way
       of doing this.
     - Cannot force the `python` link to refer to the same interpreter as
       `python2`. I don't think this is important; the PEP already
       explicitly recommends that `python` be used for cross-compatible
       scripts only. This would, in any case, interfere with users who
       have already made a selection.

 I will begin implementing this immediately, if no one has any compelling
 objections.

-- 
Ticket URL: <https://trac.macports.org/ticket/34326#comment:35>
MacPorts <https://www.macports.org/>
Ports system for OS X


More information about the macports-tickets mailing list