Improve detection of installed packages in an environment #2722
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Account for pure/plat lib differences in env
When detecting installed packages, ensure that we check both purelib
and platlib site directories when determining if a package is a
standard package.
Fix git installed package detection
A package installed from git is sometimes mistaken as a standard
package since it has a
.dist-info
directory. This change ensuresthat the pth file sources are also taken into consideration when
determining if a package is git sourced.
Additionally, this change ensures that a pth file is searched for in
both platlib and purelib site directories.
Fix incorrect pth file name lookups
This ensures that we handle cases where
foo-bar
package haseither
foo-bar.pth
orfoo_bar.pth
installed.Pull Request Check List
This might also be resolving a regression.
Relates-to: #2225 #2281
Resolves: #2730