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

Use PEP 517 to extract non-static pyproject.toml metadata #2633

Merged
merged 1 commit into from
Mar 25, 2024

Conversation

charliermarsh
Copy link
Member

Summary

When a user passes a pyproject.toml to pip compile (e.g., uv pip compile pyproject.toml), we extract the requirements from the pyproject.toml directly. However... that isn't always possible (as seen in the linked issues). When it's not, we instead need to run the PEP 517 build hooks to identify the metadata.

Closes #1624.

Closes #1644.

Test Plan

cargo test

@zanieb
Copy link
Member

zanieb commented Mar 24, 2024

Sorry I'm a little lost in all the changes lately, just want to confirm does this address #2130 as well? or was that addressed previously?

@charliermarsh
Copy link
Member Author

I don't think so, that issue surprises me but I'll look into it separately...

@@ -967,6 +967,87 @@ impl MarkerTree {
}
}

/// Remove the extras from a marker, returning `None` if the marker tree evaluates to `true`.
Copy link
Member

Choose a reason for hiding this comment

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

Maybe @BurntSushi should review this marker code.

Copy link
Member Author

Choose a reason for hiding this comment

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

Sure, feel free @BurntSushi.

Copy link
Member Author

Choose a reason for hiding this comment

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

Messaged with Andrew, I want to build on this branch (but not related to the markers) so I'm going to merge and address any review comments post-merge.

Copy link
Member

@BurntSushi BurntSushi left a comment

Choose a reason for hiding this comment

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

LGTM. :-) Nice marker tests!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
3 participants