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

Read package name from pyproject.toml #188

Merged
merged 6 commits into from
Dec 3, 2020
Merged

Read package name from pyproject.toml #188

merged 6 commits into from
Dec 3, 2020

Conversation

cjolowicz
Copy link
Owner

@cjolowicz cjolowicz commented Dec 3, 2020

  • Add Poetry.config.name property to provide access to the package name as defined in pyproject.toml.
  • Use this property to construct the egg fragment for sdist file URLs.

Rationale:

  • Avoid spawning a subprocess running poetry version to determine the name.
  • Avoid the need to parse Poetry output meant for human consumption.
  • We will need to parse pyproject.toml anyway for extras support.

Note that poetry version canonicalizes the package name. We don't bother here, because pip uninstall will do so anyway.

This adds a core dependency on tomlkit, the TOML parser used by Poetry.

@cjolowicz cjolowicz added the refactoring Refactoring label Dec 3, 2020
@cjolowicz cjolowicz merged commit 2a8633c into master Dec 3, 2020
@cjolowicz cjolowicz deleted the poetry-config branch December 3, 2020 10:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactoring Refactoring
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant