Add aliases for build backend requests (#9294)

I found it surprising we did not accept names like `hatchling` or
`scikit-build`
This commit is contained in:
Zanie Blue 2024-11-21 08:51:18 -06:00 committed by GitHub
parent 83c5eae1f3
commit 8149e636c3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -5,16 +5,24 @@
#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))]
pub enum ProjectBuildBackend {
#[default]
#[serde(alias = "hatchling")]
#[cfg_attr(feature = "clap", value(alias = "hatchling"))]
/// Use [hatchling](https://pypi.org/project/hatchling) as the project build backend.
Hatch,
/// Use [flit-core](https://pypi.org/project/flit-core) as the project build backend.
#[serde(alias = "flit-core")]
#[cfg_attr(feature = "clap", value(alias = "flit-core"))]
Flit,
/// Use [pdm-backend](https://pypi.org/project/pdm-backend) as the project build backend.
#[serde(alias = "pdm-backend")]
#[cfg_attr(feature = "clap", value(alias = "pdm-backend"))]
PDM,
/// Use [setuptools](https://pypi.org/project/setuptools) as the project build backend.
Setuptools,
/// Use [maturin](https://pypi.org/project/maturin) as the project build backend.
Maturin,
/// Use [scikit-build-core](https://pypi.org/project/scikit-build-core) as the project build backend.
#[serde(alias = "scikit-build-core")]
#[cfg_attr(feature = "clap", value(alias = "scikit-build-core"))]
Scikit,
}