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

inspection: use pep517 metadata build #2632

Merged
merged 2 commits into from Jul 24, 2020

Conversation

abn
Copy link
Member

@abn abn commented Jul 4, 2020

This change replaces setup.py execution in favour of pep517 metadata builds. The proposed approach executes pep517.meta.build instead of python setup.py egg_info.

This does not change the order of preference in the inspection flow for execution vs AST parsing. A build is only perfromed in cases where existing metadata inspection, SetupReader parsing etc returns an incomplete/unusable PackageInfo instance or raises PackageInfoError.

The original proposal was made in #2296 by @finswimmer.

Closes: #2296
Resolves: #1900

Pull Request Check List

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

@abn abn requested a review from a team Jul 4, 2020
@abn abn force-pushed the improve-inspection-info branch from f23b52d to 3c5d98f Compare Jul 4, 2020
@abn abn marked this pull request as ready for review Jul 4, 2020
poetry/inspection/info.py Outdated Show resolved Hide resolved
@abn abn force-pushed the improve-inspection-info branch from 3c5d98f to d82962b Compare Jul 10, 2020
@abn abn requested a review from sdispater Jul 10, 2020
@abn abn force-pushed the improve-inspection-info branch 4 times, most recently from 37961b7 to 4a2712d Compare Jul 10, 2020
@abn
Copy link
Member Author

abn commented Jul 21, 2020

@sdispater bumping this once again with the proposed changes addressing your concerns

@abn abn changed the base branch from develop to master Jul 24, 2020
This change replaces setup.py explicit execution in favour of pep517
metadata builds.

In addition to improving handling of PEP 517 metadata builds, error
handling when reading setup files have also been improved.
@abn abn force-pushed the improve-inspection-info branch from 4a2712d to 4250a5f Compare Jul 24, 2020
Copy link
Member

@sdispater sdispater left a comment

Looks good to me 👍

@abn abn merged commit f57d22e into python-poetry:master Jul 24, 2020
@abn abn deleted the improve-inspection-info branch Jul 24, 2020
@sdispater sdispater mentioned this pull request Jul 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

'BinOp' object has no attribute 's' when trying to add a git dependency with poetry
2 participants