Skip .egg-info build metadata during distribution discovery#13762
Skip .egg-info build metadata during distribution discovery#13762fireattack wants to merge 2 commits intopypa:mainfrom
Conversation
Fixes an issue where pip uninstall would fail when run from a directory containing .egg-info build metadata (created by 'pip install .' or 'python setup.py egg_info'). When the current directory is in sys.path and contains .egg-info without installation records, pip would incorrectly identify it as the installed package location instead of the actual installation in site-packages, causing uninstall to fail with 'No files were found to uninstall'. This fix adds a check to skip .egg-info directories that lack installation record files (installed-files.txt or RECORD), ensuring pip finds the actual installed package.
|
Hello! Thank you for your interest in improving pip! As a community supported project, we greatly appreciate it! Unfortunately, we currently have limited capacity to review contributions, so it may take some time until we are able to review your PR. We would appreciate your patience. If you have any questions, concerns, or want to remind us to take a look at your PR, feel free to leave a comment at any time. In the meanwhile... could you add a changelog entry and a test verifying that the bug is actually fixed? Preferably, it would be an unit test under |
Fixes #13459.
When the current directory is in sys.path and contains .egg-info without installation records, pip would incorrectly identify it as the installed package location instead of the actual installation in site-packages, causing uninstall to fail with 'No files were found to uninstall'.
This fix adds a check to skip .egg-info directories that lack installation record files (installed-files.txt or RECORD), ensuring pip finds the actual installed package.