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

Reorder pip install to better prioritize #914

Merged
merged 1 commit into from
Sep 16, 2024
Merged

Conversation

mdellweg
Copy link
Member

pipdeptree as a debugging tool should really go last.

@mdellweg mdellweg marked this pull request as ready for review September 16, 2024 10:47
@mdellweg
Copy link
Member Author

pipdeptree as a debugging tool should really go last.

Does not seem to work.

@mdellweg
Copy link
Member Author

Pip’s current implementation of the provider implements get_preference as follows:

Prefer if any of the known requirements is “direct”, e.g. points to an explicit URL.

If equal, prefer if any requirement is “pinned”, i.e. contains operator === or ==.

If equal, calculate an approximate “depth” and resolve requirements closer to the user-specified requirements first.

Order user-specified requirements by the order they are specified.

If equal, prefers “non-free” requirements, i.e. contains at least one operator, such as >= or <.

If equal, order alphabetically for consistency (helps debuggability).

pipdeptree as a debugging tool should really go last.
@ggainey ggainey merged commit c4cd2b8 into pulp:main Sep 16, 2024
10 of 11 checks passed
@mdellweg mdellweg deleted the reorder_pip branch September 16, 2024 22:07
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.

2 participants