pypi

petr 976F at ingv.it
Mon Jun 22 14:54:24 PDT 2015


Hi Lawrence,
Hi Mojca,

I also had this in mind for quite some while, however I got stuck on several issues, when testing. So I wanted to get these fixed as well, but never found the time.

On 22 Jun 2015, at 23:12, Lawrence Velázquez <larryv at macports.org> wrote:

> On Jun 22, 2015, at 4:59 PM, Mojca Miklavec <mojca at macports.org> wrote:
> 
>> Also: wouldn't it be nice to have some pypi portgroup that would
>> automatically set:
>> - livecheck
>> - distname
>> - homepage
>> - master_sites
>> and possibly other things.

I personally -- and I guess this is in line with what Lawrence is proposing -- would integrate this into the Python portgroup itself, where one could have the following by default set.

python.use_pypi  yes

This would set all the above mentioned options set to reasonable defaults.

All could be overwritten, including something like 

`python.pypi_name` or `python.package_name` (where the correct upstream name, often `realname` is used in Portfiles) would allow you to set it to lets say `GeomagPy` in your case.


>> The following expression:
>>  master_sites        pypi:[string index ${python.rootname}
>> 0]/${python.rootname}

I think it would be great, if the mirror setup could be made more flexible and this would go into 
${port_repo}/_resources/port1.0/fetch and be referenced by something like

https://pypi.python.org/packages/source/:pypisubdir or
https://pypi.python.org/packages/source/:llsubdir

>> while being very generic, looks very ugly and is not very
>> "human-readable"/friendly. It would so much better fit into the
>> portgroup.
> 
> I want to add these defaults to python-1.0 but haven't worked out the interaction with other portgroups.
> 
> I don't think it would make much sense to have a separate pypi-1.0 portgroup. So many Python ports fetch from PyPI, and _only_ Python ports fetch from PyPI. We'd end up with quite a bit of
> 
> 	PortGroup python 1.0
> 	PortGroup pypi 1.0
> 
> which seems like needless repetition.

Agreed, see above.

>> Also, that particular port is now called
>>  name py-GeomagPy
>> I would prefer to have a port "py-geomagpy" with some settings like
>>  pypi.setup GeomagPy 0.1.328

I guess this could be handled by overwriting some default value.

>> that would automatically set the proper homepage, distname etc.
>> without having to use the CamelCase name for the package (which is
>> currently being used for no good reason other that the ease of
>> fetching files).

You might want to ask the author to change the package name ;-) 
Roman might be open for your suggestion, it is still a very established packages I guess.


> I really don't like setup procs. I do not think we should not create any more of them.
> 
> Once I add some extra defaults to python-1.0, you should be able to use python.rootname for this.
> 
> vq

BTW: would be great if we could get rid of these constructs which appear in all ports. 

if {${subport} ne ${name}} {

   livecheck.type  none
} else {
   livecheck.type  pypi
}


> _______________________________________________
> macports-dev mailing list
> macports-dev at lists.macosforge.org
> https://lists.macosforge.org/mailman/listinfo/macports-dev



More information about the macports-dev mailing list