Add build_extras requirements field to recipe to allow adding extra build-requires - #412
Conversation
|
Without having looked at this in detail, is this something we require on a frequent basis when building recipes, since I assume we can always add build-time requirements by patching the packages' |
|
Currently just scipy.
Yes but this is much more annoying. |
|
We need often to pin or cap build requirements or transitive requirements for packages. Sometimes we need to substitute a fork of a build requirement. All these things can be done much more conveniently with this field than with a patch. |
|
Especially in the common case where e.g., a setuptools release breaks a bunch of our packages and we want to add a cap everywhere. Adding one patch per recipe is frustrating. |
|
Using it here to substitute a fork of gast that supports Python 3.15: |
|
Agreed, the use case makes sense, and I am aligned with it. But we should note the way this is currently implemented:
This is additive, and doesn't replace existing build requirements. How do we make it replace the build requirements entirely? Perhaps another field |
It seems to work fine? If it doesn't work in the future, then we can modify it. But you will note that pyodide/pyodide#6355 is using this change and CI is green. |
|
Ah, your new comment came up just as I was typing mine. I would suggest making this clearer in the recipe format docs. pyodide/pyodide#6355 looks good to me, then. |
|
i.e., what I mean is that |
|
How about |
|
Works for me! |
There was a problem hiding this comment.
This reads better to me now. I have a few questions and suggestions, but overall LGTM.
Could you please add:
- an integration recipe test that exercises this
- a unit test that adds extra build requirements with PEP 508 markers (I checked locally that these already work, but we've already had a regression for this before, so one test would actually be great)
- a CHANGELOG entry?
Thanks @hoodmane!
P.S. I was going to suggest that we should add a note about this new field to the "The meta.yaml specification" page but I couldn't find it. As it turns out, it's gone with pyodide/pyodide#6181 and we never added that page to pyodide-build's docs. We should add it at some point.
ryanking13
left a comment
There was a problem hiding this comment.
Thanks, yeah this is often annoying when we need to deal with some old packages or when there is a breaking changes in the build system.
Since we are slowly deprecating the recipes system (at least in my opinion), I am okay with adding some adhoc features to the recipes to make our life easier. People who are building packages out of tree would rarely use recipes anyways.
|
I still think the recipes play an important role in testing new emscripten versions and new abis and finding Emscripten bugs and other problems. If we reduce the number too much, the risk is that problems are discovered downstream much later by people without the resources to fix them. Especially since maintaining the recipes is quite a lot easier with langage models, so the cost has gone down. |
No description provided.