Suggestion to slightly simplify pypi ports

Ryan Schmidt ryandesign at macports.org
Mon Jun 24 13:55:41 UTC 2019



On Jun 23, 2019, at 05:02, Mojca Miklavec wrote:

> I guess this then changes my question into: how could we get rid of
> these two rows?
> 
>    master_sites        pypi:[string index ${python.rootname}
> 0]/${python.rootname}
>    distname            ${python.rootname}-${version}
> 
> We still need to keep in mind that some ports might prefer to fetch
> python modules from github for whatever reason, so it needs to keep
> working in cases like those.
> 
> Maybe something along the lines of "python.use_pypi yes" which would
> set the two?

I think that would be my recommendation, yes. The similar functionality in the php-1.1 portgroup (php.pecl yes) has been in place for years and works fine as far as I can tell (however most php modules are maintained by me, so it's possible that if there were many others maintaining php modules, their unique coding styles might reveal problems with this approach that I haven't encountered with my coding style). python.use_pypi would be an option, it would default to no, and you would add an option_proc to it (like php-1.1's php._set_pecl) so that when it is set to yes, it would set pypi-appropriate values for distname, master_sites, and the livecheck options. Maybe it should only set the *defaults* of those options, rather than setting the options themselves... but I see that in the php-1.1 portgroup I'm setting the values, not the defaults, and I don't remember if that was intentional. Oh well.



More information about the macports-dev mailing list