python package installed with setuptools: fixing permission of the PKG-INFO file

Enrico Maria Crisostomo enrico.m.crisostomo at gmail.com
Fri Mar 23 10:39:46 UTC 2018



> On 23 Mar 2018, at 11:37, Mojca Miklavec <mojca at macports.org> wrote:
> 
> On 23 March 2018 at 11:35, Enrico Maria Crisostomo wrote:
>> On 23 Mar 2018, at 11:06, Mojca Miklavec wrote:
>>> 
>>> I would say this in an upstream issue that should be reported and
>>> fixed. (That said, we could probably also have some code to
>>> automatically fix these kind of problems after extracting the files.)
>> 
>> Thanks Mojca.  I'll see whether I can report it upstream, then.  Yes, if this file should have an expected permission mask perhaps it would be desirable to fix it and emit a warning.
>> 
>>> For the moment by far the easiest thing to do would be to use
>>>   system "chmod +r ${worksrcpath}/wherever-the-file-is"
>>> probably in post-extract phase.
>> 
>> Thanks, I'll try that then.  The python version appear multiple times in the path: I'll try with a plain replacement, hoping the path structure is not python version-dependent.
>> 
>>> You can do it in post-destroot, but why not fix it immediately? (I
>>> guess that other files in the tarball might need fixing as well.)
>> 
>> Good point.  I'll do that in post-extract.  I didn't know whether the setup code was making some assumptions (some obvious to me) and set it as such.  From your answer I infer that's not the case, in which case the post-extract phase is probably a better place to do it.
> 
> During post-extract there shouldn't be any strange python version in the path.

Doh!  It makes sense.  Great then, it seems post-extract is the way to go for this case.

> 
> Mojca



More information about the macports-dev mailing list