On 1 May 2017 at 22:47, Nico Kadel-Garcia nkadel@gmail.com wrote:
On Sun, Apr 30, 2017 at 10:30 PM, Nick Coghlan ncoghlan@gmail.com wrote:
If the intended benefit of this change remains unclear, it may help to focus on a specific concrete case, which would be that the following operations should be completely indistinguishable at the system level from not having done anything at all (except in the sudo logs):
$ sudo pip3 install contextlib2 $ sudo pip3 uninstall contextlib2
And this successfully ignores *all* the dependencies which contextlib2 may add at installation time.
There's a reason I chose contextlib2 as my example rather than something more complex like ansible - I'm the maintainer of contextlib2, and I know it doesn't have any runtime dependencies (and likely never will, since it's a stdlib module backport).
Given the proposal at hand though, writing a `remove-pip-installed-modules` cleaner utility becomes a lot simpler that it is today, since it just needs to clear out any Python packages it finds in /usr/local (based on the Python level installation records), rather than needing to interact with the RPM database, figure out which system packages may have potentially been corrupted and reinstall them.
If the proposal is adjusted to also affect other installation directories (like the one for scripts), it will also have the significant benefit that any pip installed binaries will go into `/usr/local/bin`, so they'll appear on the default path for all regular users, but *won't* appear on the default path for "root".
Cheers, Nick.
python-devel@lists.fedoraproject.org