Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Inline dependency-versions syntax #2122

Open
wants to merge 9 commits into
base: main
Choose a base branch
from
Open

Conversation

joerick
Copy link
Contributor

@joerick joerick commented Jan 5, 2025

To help with #2002, I propose a way to specify dependency version constraints inline, without the extra file. This would eliminate the need for an additional CIBW_PYODIDE_BUILD_VERSION option, while being consistent with our existing version management system.

This would allow setting the pyodide-build version like:

CIBW_DEPENDENCY_VERSIONS_PYODIDE: "packages: pyodide-build==0.29.1"

So far, no implementation yet, just docs for discussion.

@joerick joerick marked this pull request as draft January 5, 2025 14:48
@joerick
Copy link
Contributor Author

joerick commented Jan 27, 2025

Having reviewed #2002 again, I think this would be a useful feature. Specifically, there's a check for compatible versions between pyodide and pyodide-build - if we provide an option for CIBW_PYODIDE_VERSION, and we don't have this, changing pyodide version becomes a bit hassle, because you need to make a constraints file as well.

@joerick joerick force-pushed the dependency-version-inline branch from 1912c7a to 870a1dd Compare January 31, 2025 13:22
@joerick joerick marked this pull request as ready for review February 23, 2025 12:10
@joerick
Copy link
Contributor Author

joerick commented Feb 23, 2025

This should be ready to go, pending review.

@joerick joerick requested a review from henryiii February 28, 2025 12:48
@henryiii
Copy link
Contributor

Two questions:

  • packages = [] would avoid pinning?
  • How does this interact with inherit? Can you inherit from a file and add a package?

@henryiii
Copy link
Contributor

I've managed to make some conflicts due to #2276. I can rebase if you prefer, sorry!

@joerick
Copy link
Contributor Author

joerick commented Mar 1, 2025

  • packages = [] would avoid pinning?

Good point. I think that should be equivalent to 'latest', as in it pins nothing. I'll make sure that's covered with a test case.

  • How does this interact with inherit? Can you inherit from a file and add a package?

It doesn't inherit. I considered including it but because of the backwards-compatibility requirements1 it's awkward to implement (the syntax is different from the other table-style options). Also, I couldn't think of a situation it might be useful. What do you think?

Footnotes

  1. the existing string-form (just a path) means that if we start using the table-form, characters like ;: will be parsed differently. I'm sure it could be worked around somehow, but it might require some messy code, didn't seem worth the effort/complexity.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants