How about a MacPorts "system" (generic) python port?

Chris Jones jonesc at hep.phy.cam.ac.uk
Fri Jul 15 08:04:33 UTC 2022


>> Some users have objected to being made to install multiple versions of python, especially python27 which is EOL, so when possible we usually choose to use a recommended version of python3x (as specified in the python portgroup) rather than python27.
> 
> I'd be among those users (save for the v2.7 tidbit). However as I pointed out in the ticket, using a moving recommended version currently leads to an increasing number of different python versions. Many ports also require add-on packages in order to be built or run, and those too stick around when the recommended version is updated. Try to clean that up afterwards, especially if you use Python yourself too and aren't too regarding of the version you're using (maybe because you use `port select`).
> 
> I don't like complaining without offering potential solutions. So in the ticket I suggested that the Python PG could provide some optional logic for ports that need Python as a build and/or runtime dependency, adding variants so users can decide which version(s) they want to maintain.
> There's an alternative that's probably better: provide a `port:python3` or(/and) maybe even a `port:python` which becomes the designated replacement of /usr/bin/python{,3}. Have that install in its own location that doesn't clash with any of the existing python ports. Addons then become `py3-foo`
> subports, or the `py-foo` main ports that are now stubs (any of them which aren't?). Now you can update this generic port as you deem fit.
> 
> I think this will also be a lot clearer for users who want "just a Python" port without specific reasons to pick a specific version.

we already have a solution to this, for users that 'just want a python3'

 > sudo port select python3 python310

replacing python310 with your preferred version.

I see no need for what you propose above in addition.

Chris


More information about the macports-dev mailing list