[MacPorts] #65643: python1.0 portgroup and selecting default python version.

MacPorts noreply at macports.org
Tue Aug 9 16:34:29 UTC 2022


#65643: python1.0 portgroup and selecting default python version.
-------------------------------------+-------------------------------------
 Reporter:  Lord-Kamina              |      Owner:  (none)
     Type:  defect                   |     Status:  new
 Priority:  Normal                   |  Milestone:
Component:  ports                    |    Version:
 Keywords:  python python_select     |       Port:  python310 python39
  portgroup                          |  python38 python37 python36
-------------------------------------+-------------------------------------
 Ok so...

 A while ago I made a local portfile (not sure why I never committed it,
 there must have been some mess or another in it) for an updated mesa.

 At the time, I think python37 was what most ports were using, so I added a
 build dependency on python37 (and of course other modules it might need to
 build). I just upgraded to Monterey yesterday and was rebuilding all my
 ports, and this one failed to build. Why? Obviously, because the default
 python has moved on from 3.7, so the required submodules weren't
 installed.

 I added a python39 variant, installed the appropriate deps and everything
 built and everyone was happy, but this got me thinking... isn't there a
 better way to deal with default python versions?

 Then I got an idea I wanted to discuss, which is the purpose of this
 ticket. I'm not sure if there's anything preventing it, or if you
 intentionally don't want to handle it this way, but... couldn't the python
 portgroup determine the default version (and variant) based on the output
 of `port select`?

 It would be as simple as doing `port select --list python3 | grep -E
 '([a-zA-Z0-9]+)\s?\(active\)$' | sed 's|(active)||'` (there is probably a
 better or more concise way to do it from macports itself, without
 resorting to bash and external processes, but you get the idea)

 Is there any particular reason such behavior would be undesirable?

-- 
Ticket URL: <https://trac.macports.org/ticket/65643>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list