---
title: "An introduction to wheel variants for Python package maintainers"
description: "PEPs 817, 825 and 850 extend Python wheels with variants: labeled builds of the same release whose variant.json declares compatibility properties (namespace :: feature :: value) such as CUDA version, GPU sm_arch or AVX-512 support."
url: "https://swe.quest/articles/an-introduction-to-wheel-variants-for-python-package-maintainers-6b93b981952775da"
canonical: "https://astral.sh/blog/wheel-variants-for-maintainers"
source: "Astral"
published: "2026-11-30"
difficulty: "medium"
kind: "Deep dive"
reading_minutes: 9
tags: ["python","build-systems","open-source"]
---

# An introduction to wheel variants for Python package maintainers

A post on [Astral](https://swe.quest/sources/astral.md), published 2026-11-30, 9 min read, Deep dive. Original: [https://astral.sh/blog/wheel-variants-for-maintainers](https://astral.sh/blog/wheel-variants-for-maintainers)

## Summary

PEPs 817, 825 and 850 extend Python wheels with variants: labeled builds of the same release whose variant.json declares compatibility properties (namespace :: feature :: value) such as CUDA version, GPU sm\_arch or AVX-512 support. Installers query provider plugins (e.g. nvidia-variant-provider, x86-64 provider) in isolated environments to learn what the host supports, treat a wheel as compatible only if every declared feature matches, and rank compatible wheels by namespace priority, then feature and value. Maintainers can also gate dependencies with variant markers, but should publish variants of dependencies rather than pick dependency versions per variant, since universal resolvers may fail to lock. The format is provisionally accepted in PEP 825 and testable via uv 0.13.8's wheel-variants preview against the WheelNext test index.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [Python](https://swe.quest/tags/python.md) (Languages)
- [Build systems](https://swe.quest/tags/build-systems.md) (Engineering practices)
- [Open source](https://swe.quest/tags/open-source.md) (Engineering practices)

## Prerequisites

- Python packaging and wheels ([easy posts on Python](https://swe.quest/tags/python.md?difficulty=easy))
- wheel platform tags
- CUDA and GPU architectures ([easy posts on Hardware](https://swe.quest/tags/hardware.md?difficulty=easy))

## Keywords

wheel variants, PEP 817, PEP 825, PEP 850, uv, PyTorch, CUDA, WheelNext

## Related posts

- [Making Python in Zed Fun](https://swe.quest/articles/making-python-in-zed-fun-1887e7de7b4c59d3.md): Zed · 2025-10-02 · Easy · 5 min read · Python, Developer tools
  Zed reworked its Python support around a generic per-language toolchain selector backed by Microsoft's python-environment-tools, the same library Visual Studio Code uses for venv detection.
- [Vulnerability and malware checks in uv](https://swe.quest/articles/vulnerability-and-malware-checks-in-uv-b720e417a88a2049.md): Astral · 2026-06-08 · Easy · 6 min read · Supply chain security, Python, Build systems
  uv gains two preview security features: \`uv audit\`, a native replacement for pip-audit that checks locked dependencies against known vulnerabilities and adverse statuses like deprecation, running 4-10x faster on typical projects, and an opt-in malware check (\`UV\_MALWARE\_CHECK=1\`) that queries OSV for MAL advisories on every sync and aborts before malicious code runs.
- [From Zero to GPU: A Guide to Building and Scaling Production-Ready CUDA Kernels](https://swe.quest/articles/from-zero-to-gpu-a-guide-to-building-and-scaling-production-ready-cuda-kernels-c01f08e3adeb6b0b.md): Hugging Face · 2025-08-18 · Medium · 16 min read · Hardware, Python, C & C++, Build systems, Machine learning
  Hugging Face's kernel-builder lets developers write a custom CUDA kernel, register it as a native PyTorch operator, build it reproducibly with Nix for every supported PyTorch/CUDA combination, and publish it to the Hub for loading via \`get\_kernel\`.
- [Securing Python projects from supply-chain attacks](https://swe.quest/articles/securing-python-projects-from-supply-chain-attacks-9ecc242dbcff9bf0.md): Astral · 2026-11-23 · Medium · 7 min read · Supply chain security, Python, CI/CD, Build systems
  Hash-pinning is the core defense against compromised maintainer accounts or hacked distribution servers, because version pins alone fail when PyPI files can be added post-release and GitHub Action tags can be force-pushed.
- [Roll it out, roll it back, never redeploy](https://swe.quest/articles/roll-it-out-roll-it-back-never-redeploy-c13aa355b1437d78.md): Railway · 2026-07-17 · Medium · 7 min read · Deployment, Configuration management, AI agents, Developer tools
  Railway now offers feature flags across its dashboard, CLI, TypeScript SDK and MCP server, so code can ship dark behind a default-off flag and be rolled out to a team, a percentage of users, or targeted segments without redeploying.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
