Open chrahunt opened 5 years ago
@chrahunt and I discussed this ~14 hours ago on a call. I'm on board for doing this.
Hey, any update on this issue ? This behavior is still causing pip removing system files. I already proposed help in a previous related ticket a few years ago but if you need anything I can definitely volunteer again.
What's the problem this feature will solve?
Currently, pip unconditionally removes scripts associated with
scripts
andentrypoints/console_scripts
on uninstallation of a package. That happens here.This may contribute to problems like #4670 and is in general a bad practice, since there's nothing that ties a Python package to these files.
Describe the solution you'd like
We should only include these scripts for editable installs, i.e. move the block under here.
Legacy installs (
setup.py install
) and PEP 517 installs both record the set of installed files, to include installed scripts and generated entrypoints. By making this change we reduce the scope of code that is uninstalling files that may have nothing to do with the package in question.Alternative Solutions
--record
option tosetup.py develop
, but it didn't seem to produce any outputsetup.py develop --uninstall
instead - this doesn't remove any scripts (so it would be a backwards-incompatible change) and it also removes our ability to do rollback of uninstallation.Additional context
None