Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve detection of installed packages in an environment #2722

Merged
merged 3 commits into from Jul 31, 2020

Conversation

abn
Copy link
Member

@abn abn commented Jul 24, 2020

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 ensures
that 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 has
either foo-bar.pth or foo_bar.pth installed.

Pull Request Check List

This might also be resolving a regression.

Relates-to: #2225 #2281
Resolves: #2730

  • Added tests for changed code.
  • Updated documentation for changed code.

@abn abn added the kind/bug Something isn't working as expected label Jul 24, 2020
@abn abn added this to the 1.1 milestone Jul 24, 2020
@abn abn requested a review from a team Jul 24, 2020
@abn abn force-pushed the fix-installed-packages branch from 5f5c802 to f3007fb Compare Jul 24, 2020
abn added 3 commits Jul 30, 2020
When detecting installed packages, ensure that we check both purelib
and platlib site directories when determining if a package is a
standard package.
A package installed from git is sometimes mistaken as a standard
package since it has a `.dist-info` directory. This change ensures
that 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.
Copy link
Member

@sdispater sdispater left a comment

Looks good to me 👍

@sdispater sdispater merged commit c019b81 into python-poetry:master Jul 31, 2020
@sdispater sdispater mentioned this pull request Sep 18, 2020
@abn abn deleted the fix-installed-packages branch Oct 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working as expected
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1.1a3/b2 does not detect installed packages as git
2 participants