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 July 24, 2020 20:16
abn added 3 commits July 30, 2020 16:10
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

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 October 6, 2020 22:00
Copy link

github-actions bot commented Mar 1, 2024

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 1, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
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