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

Add support for pex3 lock subset. #2647

Merged
merged 3 commits into from
Jan 23, 2025
Merged

Conversation

jsirois
Copy link
Member

@jsirois jsirois commented Jan 21, 2025

Closes #2411

@jsirois jsirois changed the title WIP: Add support for pex3 lock subset. Add support for pex3 lock subset. Jan 23, 2025
@jsirois jsirois marked this pull request as ready for review January 23, 2025 17:04
@jsirois jsirois requested a review from huonw January 23, 2025 17:04
constraint=constraint_by_project_name[req.project_name],
)
)
to_resolve.extend(requires_dist.filter_dependencies(req, locked_req))
Copy link
Member Author

@jsirois jsirois Jan 23, 2025

Choose a reason for hiding this comment

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

This was the only tricky bit. To correctly subset you need to consider extras but no other marker expressions. Luckily, the --elide-unused-requires-dists feature stabilized in https://github.com/pex-tool/pex/releases/tag/v2.25.2 included this machinery. The new integration tests cover this case.

Copy link
Collaborator

@huonw huonw left a comment

Choose a reason for hiding this comment

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

Very nice, thanks for picking up the feature request!

@jsirois jsirois merged commit b8474a2 into pex-tool:main Jan 23, 2025
23 checks passed
@jsirois jsirois deleted the issues/2411 branch January 23, 2025 23:34
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.

Allow subsetting a PEX lockfile in PEX format, not just pip
2 participants