Repository navigation
Conversation
Documentation build overview
166 files changed ·
|
2fed7a0 to
96c81fc
Compare
| For consistency, it is RECOMMENDED that build backends implement the | ||
| following interface for building variant wheels: | ||
|
|
||
| - variant metadata seed is stored in ``pyproject.toml`` file, as |
There was a problem hiding this comment.
The word "seed" here and in the next section isn't too helpful. It seems to imply that changes may occur, it's only a starting point (a la "random seed"). That isn't the case - the metadata in pyproject.toml and in variants.json should actually be 100% consistent. And as for PEP 621, if both exist, I'd expect the pyproject.toml version to be authoritative.
There was a problem hiding this comment.
I'm not opposed to replacing or removing "seed", but there are some differences:
variantswill only include the selected variant.providers.{namespace}.static-propertiesmay be filled from a plugin.default-priorities.feature.{namespace}may be filled from a plugin.
There was a problem hiding this comment.
@mgorny I still don't like "seed" at all. I suggest "variant configuration" instead.
f80e6e8 to
b7ad00c
Compare
|
I just remembered that I had made a diagram early on in wheelnext/pep_817_wheel_variants#9. Here's the latest version:
Needs some tweaks to align with the final version of this PEP, but we may want to consider including it - a lot easier to grasp than lots of text and numbered lists of steps. EDIT: or better, include into the reworked PEP 817 as an Informational PEP, since it looks like we're going that way. |
93b34f5 to
8a445ad
Compare
e15a67e to
6c99577
Compare
0ff098b to
405bcb6
Compare
a8b327a to
017ce84
Compare
405bcb6 to
c225d2f
Compare
97b5ea0 to
e029b64
Compare
c225d2f to
1f819e6
Compare
e4f3057 to
1e4b442
Compare
rgommers
left a comment
There was a problem hiding this comment.
This probably is still in flux at the moment, but I had a look. Overall looks good, and all of the main decisions still make sense to me. The main comment I have right now is that default-priorities.feature is still used in some places.
eda6717 to
df2b8e4
Compare
6255877 to
b9060ff
Compare
c0c345d to
24ec08c
Compare
|
@mgorny the diff is quite large, how about rebasing or merging in the main branch of |
|
Oh, sorry, I thought I've rebased it already. |
Signed-off-by: Michał Górny <mgorny@quansight.com>
Signed-off-by: Michał Górny <mgorny@quansight.com>
Signed-off-by: Michał Górny <mgorny@quansight.com>
Signed-off-by: Michał Górny <mgorny@quansight.com>
Signed-off-by: Michał Górny <mgorny@quansight.com>
Signed-off-by: Michał Górny <mgorny@quansight.com>
|
Oh, I needed to change base here. |
Signed-off-by: Michał Górny <mgorny@quansight.com>
rgommers
left a comment
There was a problem hiding this comment.
Here is a first set of comments - I'm about halfway through, more coming later today or tomorrow.
| list of variant feature names and their values that are valid | ||
| according to the provider plugin. The ordering of the lists is | ||
| insignificant. A particular plugin version MUST always return the same | ||
| lists (modulo ordering), irrespective of any runtime conditions. |
There was a problem hiding this comment.
It would be good to state in the Rationale that the ordering of get_all_configs is insignificant because the interface is meant only for validating that properties/features are valid. And that it's useful to leave the list unordered because (reason: I think so that only features that are actually used need to be specified in feature-order).
|
|
||
| The ``build-requires`` key is only valid in the ``pyproject.toml`` file. | ||
| In a variant wheel built from that file, the ``build-requires`` and | ||
| ``plugin-api`` keys MUST be removed, and ``static-properties`` MUST be |
There was a problem hiding this comment.
static-properties MUST be added -> that seems to imply that it must always be added, even when building a null variant.
It's a little hard to work this out in my head, but this juggling between required/optional and what metadata must be retained in the built wheel feels like it has room for corner cases.
There was a problem hiding this comment.
That's actually a good question. I suppose it must be added, because otherwise you'd end up with a provider entry that has none of the required keys.
There was a problem hiding this comment.
Now I wonder if we should make it explicit in PEP 850 that it may be empty.
There was a problem hiding this comment.
Wait a minute, I've gotten confused here. These are the lists of all supported properties, so they should always be filled, as we expect them to be the same across all variants. I suppose a tool may remove a provider if the variant doesn't use it, but it definitely mustn't output build-requires or incorrect static-properties.
There was a problem hiding this comment.
Hmm, but no, that will break PEP 850 schema. We can't remove the provider information without removing it from namespace order, and if we removed it there, we couldn't guarantee consistency.
| .. code:: toml | ||
|
|
||
| [variant] | ||
| "$schema" = "https://variants-schema.wheelnext.dev/peps/850/v0.2.0.json" |
There was a problem hiding this comment.
This schema must be bumped right? PEP 850 has v0.2.0, and we're adding to it here?
There was a problem hiding this comment.
No, the JSON schema is not being changed. We've decided against having a separate TOML schema, so the extensions here don't affect the schema. This is probably something that should be mentioned in the rationale.
There was a problem hiding this comment.
Ah, okay - then yes, let's add that prominently in Rationale.
Co-authored-by: Ralf Gommers <ralf.gommers@gmail.com>
Signed-off-by: Michał Górny <mgorny@quansight.com>
Signed-off-by: Michał Górny <mgorny@quansight.com>
Signed-off-by: Michał Górny <mgorny@quansight.com>
rgommers
left a comment
There was a problem hiding this comment.
Some more comments on the text, nothing too dramatic.
| Type: Standards Track | ||
| Topic: Packaging | ||
| Requires: 825, 850 | ||
| Created: 02-Mar-2026 |
There was a problem hiding this comment.
| Created: 02-Mar-2026 | |
| Created: 26-Oct-2026 |
| backends. All of this is given as a recommendation to make documentation | ||
| universal, build backends interchangeable and therefore improve user | ||
| experience. At the same, build backends are permitted to follow a | ||
| different implementation path as necessary to fit their specific use | ||
| cases. |
There was a problem hiding this comment.
I'm not so sure about this part, it feels like an unnecessary disclaimer. This can be said of many PEPs "feel free to ignore and use tool.xxx to do your own thing".
I'll need to think about this some more, but I'm currently inclined to suggest leaving out these sentences.
|
|
||
| The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", | ||
| "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this | ||
| document are to be interpreted as described in :rfc:`2119`. |
There was a problem hiding this comment.
Can we remove this? It's just boilerplate.
| For consistency, it is RECOMMENDED that build backends implement the | ||
| following interface for building variant wheels: | ||
|
|
||
| - variant metadata seed is stored in ``pyproject.toml`` file, as |
There was a problem hiding this comment.
@mgorny I still don't like "seed" at all. I suggest "variant configuration" instead.
| .. code:: toml | ||
|
|
||
| [variant] | ||
| "$schema" = "https://variants-schema.wheelnext.dev/peps/850/v0.2.0.json" |
There was a problem hiding this comment.
This doesn't look right to me. It'd be very unusual to point at an actual JSON schema here. I think all we want is the version number. There will only ever be one authoritative place for a schema; we don't want to indicate that one can make up their own.
|
|
||
| When using build backends, using ``get_requires*()`` hooks for exposing | ||
| provider plugin dependencies as regular build dependencies is | ||
| recommended. This permits reusing the existing frontend logic for |
There was a problem hiding this comment.
Why "recommended"? I don't think that build backends should be making their own choices here, this should be mandatory.
| integration`_) follows from :pep:`518` specifying that such tables are | ||
| "reserved for future use by other PEPs". Therefore, introducing the | ||
| ``[variant]`` table is backwards compatible. | ||
|
|
There was a problem hiding this comment.
I'd state explicitly here that hence there are no additional backwards compatibility implications beyond those listed in PEP 825.
| There are no new security implications beyond what is already noted in | ||
| :pep:`850`. In particular, the use of provider plugins during build time | ||
| is not seen as an additional risk, given that the dependencies are | ||
| provided by the user directly (for example, in ``pyproject.toml``) and |
There was a problem hiding this comment.
| provided by the user directly (for example, in ``pyproject.toml``) and | |
| specified by the package author directly (in ``pyproject.toml``) and |

Here's an early draft, mostly as context to #40.
📚 Documentation preview 📚: https://wheelnext-peps--44.org.readthedocs.build/