<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Jan 22, 2016, at 1:46 PM, Nathaniel Smith <<a href="mailto:njs@pobox.com" class="">njs@pobox.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><p dir="ltr" class="">On Jan 22, 2016 10:11 AM, "Donald Stufft" <<a href="mailto:donald@stufft.io" class="">donald@stufft.io</a>> wrote:<br class="">
><br class="">
> PEP 376 added a file to the .dist-info directory called "INSTALLER" which was<br class="">
> supposed to be:<br class="">
><br class="">
>     This option is the name of the tool used to invoke the installation.<br class="">
><br class="">
> However, nothing has really ever implemented it and it's gone largely ignored<br class="">
> until just recently pip 8.0 started writing the INSTALLER file into the<br class="">
> metadata directories with a value of "pip".<br class="">
><br class="">
> I'd like to propose adding a special cased value to add to the installer file<br class="">
> that will tell projects like pip that this particular installed thing is being<br class="">
> managed by someone else, and we should keep our hands off of it. According to<br class="">
> PEP 376 the supported values for this file are r"[a-z0-9_-.]", however I think<br class="">
> since nobody has ever implemented it, we could expand that so that it so you<br class="">
> can also have a special value, of "dpkg (system)" or maybe that's not worth it<br class="">
> and we could just have "system" as a special value.</p><p dir="ltr" class="">I think we want more than just "system", because the same user could have some packages managed by dpkg and some by conda, both of which have their own dependency resolution mechanisms that are outside pip's and could get broken if pip removes stuff willy-nilly. And when pip errors out, you want to be able to explain to the user "this package is managed by conda, and using pip on it may break your conda setup..." versus "this package is managed by Debian, and using pip on it may break your Debian setup...".</p><p dir="ltr" class="">(Actually I'm not sure what the status these days is of mixing pip and conda -- they've gotten somewhat better at handling it. Is the proposed behavior in pip when it sees this flag something that distribution maintainers have asked for? Are they present in this thread?)</p><div class=""><br class=""></div></div></blockquote><div><br class=""></div>Yea, that’s why I thought about dpkg (system) or system(Debian) or something. The main reason I can think of for preferring “system” is if we don’t want to change the valid characters for a value in this file. Then you can have system(Debian) and system(Conda) and everything will work just fine.<br class=""><blockquote type="cite" class=""><div class=""><p dir="ltr" class="">> The benefit of doing this, is that with a special value in that file that says<br class="">
> "this file belongs to the OS", then pip could start looking for that file and<br class="">
> require a --force flag before it modifies any files belonging to that project.<br class="">
> Then distributors like Debian, Fedora, etc could simply write out the INSTALLER<br class="">
> file with the correct value, and pip would start to respect their files by<br class="">
> default.</p><p dir="ltr" class="">I'd like a little more clarity on exactly what circumstances justify setting this flag. If I write a new python package manager, then should I set this flag on all my packages because I don't trust anyone else to get things right? :-)</p><p dir="ltr" class="">Maybe the relevant thing is what I said above, that there is some system tracking these files that is not using the dist-info directory as its source-of-truth about what's installed, dependencies, etc.</p><p dir="ltr" class="">-n</p>
</div></blockquote></div><br class=""><div class="">
<br class="">-----------------<br class="">Donald Stufft<br class="">PGP: 0x6E3CBCE93372DCFA // 7C6B 7C5D 5E2B 6356 A926 F04F 6E3C BCE9 3372 DCFA

</div>
<br class=""></body></html>