From 43b7ed9082707e98f8bd325fadce94dfe7a2d532 Mon Sep 17 00:00:00 2001 From: messense Date: Fri, 14 Oct 2022 18:03:27 +0800 Subject: [PATCH] cli: add possible values to bindings --- src/build_options.rs | 4 ++-- tests/cmd/build.stdout | 4 +++- tests/cmd/publish.stdout | 4 +++- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/build_options.rs b/src/build_options.rs index 96cd3cac2..3ee86711b 100644 --- a/src/build_options.rs +++ b/src/build_options.rs @@ -161,8 +161,8 @@ pub struct BuildOptions { #[arg(short = 'f', long, conflicts_with = "interpreter")] pub find_interpreter: bool, - /// Which kind of bindings to use. Possible values are pyo3, rust-cpython, cffi and bin - #[arg(short, long)] + /// Which kind of bindings to use. + #[arg(short, long, value_parser = ["pyo3", "pyo3-ffi", "rust-cpython", "cffi", "bin"])] pub bindings: Option, /// The directory to store the built wheels in. Defaults to a new "wheels" diff --git a/tests/cmd/build.stdout b/tests/cmd/build.stdout index c61af7d1c..1dcee50c6 100644 --- a/tests/cmd/build.stdout +++ b/tests/cmd/build.stdout @@ -37,7 +37,9 @@ Options: Find interpreters from the host machine -b, --bindings - Which kind of bindings to use. Possible values are pyo3, rust-cpython, cffi and bin + Which kind of bindings to use + + [possible values: pyo3, pyo3-ffi, rust-cpython, cffi, bin] -o, --out The directory to store the built wheels in. Defaults to a new "wheels" directory in the diff --git a/tests/cmd/publish.stdout b/tests/cmd/publish.stdout index c6e6e2363..f8f9d78d2 100644 --- a/tests/cmd/publish.stdout +++ b/tests/cmd/publish.stdout @@ -71,7 +71,9 @@ Options: Find interpreters from the host machine -b, --bindings - Which kind of bindings to use. Possible values are pyo3, rust-cpython, cffi and bin + Which kind of bindings to use + + [possible values: pyo3, pyo3-ffi, rust-cpython, cffi, bin] -o, --out The directory to store the built wheels in. Defaults to a new "wheels" directory in the