Very Large Number of Python ports Don't Exist in ${python.default_version } (py39)

Ryan Schmidt ryandesign at macports.org
Tue Mar 2 15:30:41 UTC 2021



On Mar 2, 2021, at 09:25, Steven Smith wrote:

> The approach of other Python package managers (conda, pip) is to simply use whatever the installed version is and presume that the package will build and work. If it doesn’t, post an issue.
> 
> Currently, keeping MacPorts Python ports up-to-date requires hand editing every single Portfile, committing the edit, creating a PR, reviewing the PR, and merging the PR, all multiplied by the 1,945 ports (!) that use PortGroup python.
> 
> A far more reasonable and efficient approach would be to modify python-1.0.tcl to define the subport py${python.default_version}-${name} (in addition to the subports created by python.versions).
> 
> Increment the default Python version, and you increment all our Python ports with no extra work. Don’t want this? Add a flag to prevent it. Want to keep the previous version around too? That can also be added automatically, and controlled with a flag.
> 
> Any issues with specific packages will be treated like they’re already treated by conda or pip.
> 
> This is also akin to the approach that Mojca describes for perl ports, except that it’s handled mostly automatically.
> 
> This would greatly simply Python version migration in MacPorts.

It doesn't/can't work that way. If we want to offer multiple python versions, which I think is a good thing, then you have to update each port. Whether to commit that change to all ports at once without testing it and leave it to users to report breakage or to commit it only to select ports after verifying it works can be discussed. Historically I am in favor of verifying your commits work beforehand.



More information about the macports-dev mailing list