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

feat: support setuptools dynamic dependencies #894

Merged
merged 10 commits into from
Oct 21, 2024

Conversation

mkniewallner
Copy link
Collaborator

@mkniewallner mkniewallner commented Oct 15, 2024

Closes #421.
Closes #724.

PR Checklist

  • A description of the changes is added to the description of this PR.
  • If there is a related issue, make sure it is linked to this PR.
  • If you've fixed a bug or added code that should be tested, add tests!
  • If you've added or modified a feature, documentation in docs is updated

Description of changes

Continuing the work made in #724.

Specification for setuptools dynamic dependecnies: https://setuptools.pypa.io/en/stable/userguide/pyproject_config.html#dynamic-metadata.

In comparison to the initial implementation, this PR moves the logic into PEP621DependencyGetter, since dynamic dependencies in setuptools are only supported when using PEP 621 metadata definition. This also makes it possible to handle cases where only dependencies or optional dependencies are defined dynamically, since it's a valid use case.

@mkniewallner mkniewallner marked this pull request as ready for review October 15, 2024 22:38
@mkniewallner mkniewallner requested a review from fpgmaas October 15, 2024 22:38
Copy link

codecov bot commented Oct 15, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 92.5%. Comparing base (fca9448) to head (1ff9347).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##            main    #894     +/-   ##
=======================================
+ Coverage   92.4%   92.5%   +0.1%     
=======================================
  Files         37      37             
  Lines        994    1011     +17     
  Branches      96      99      +3     
=======================================
+ Hits         919     936     +17     
  Misses        60      60             
  Partials      15      15             

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@mkniewallner mkniewallner force-pushed the feat/support-setuptools-dynamic-dependencies branch from 3ffbce5 to 1ff9347 Compare October 21, 2024 17:05
@mkniewallner mkniewallner enabled auto-merge (squash) October 21, 2024 17:06
@mkniewallner mkniewallner disabled auto-merge October 21, 2024 17:08
@mkniewallner mkniewallner enabled auto-merge (squash) October 21, 2024 17:08
@mkniewallner mkniewallner merged commit 596a7be into main Oct 21, 2024
22 checks passed
@mkniewallner mkniewallner deleted the feat/support-setuptools-dynamic-dependencies branch October 21, 2024 17:29
@fofoni
Copy link

fofoni commented Oct 22, 2024

Thanks for this!

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.

KeyError when pyproject.toml dependencies are dynamically read from requirements.txt
4 participants