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

Steven Smith steve.t.smith at gmail.com
Tue Mar 2 15:25:43 UTC 2021


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.


> On Mar 2, 2021, at 06:40, Mojca Miklavec <mojca at macports.org> wrote:
> 
> We sometimes do batches of all the 1000+ perl ports as that's
> infeasible to do manually (nobody will test 1000+ ports if they build
> and work correctly on his computer).
> (I would usually check the buildbot results and open tickets for those
> that fail.)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 3898 bytes
Desc: not available
URL: <http://lists.macports.org/pipermail/macports-dev/attachments/20210302/e1570a39/attachment.bin>


More information about the macports-dev mailing list