Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove support for rust-cpython #2044

Merged
merged 6 commits into from
Jun 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 1 addition & 8 deletions src/build_options.rs
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ pub struct BuildOptions {
pub find_interpreter: bool,

/// Which kind of bindings to use.
#[arg(short, long, value_parser = ["pyo3", "pyo3-ffi", "rust-cpython", "cffi", "uniffi", "bin"])]
#[arg(short, long, value_parser = ["pyo3", "pyo3-ffi", "cffi", "uniffi", "bin"])]
pub bindings: Option<String>,

/// The directory to store the built wheels in. Defaults to a new "wheels"
Expand Down Expand Up @@ -920,8 +920,6 @@ fn find_bindings(
let minor = pyo3_ffi_minimum_python_minor_version(ver.major, ver.minor)
.unwrap_or(MINIMUM_PYTHON_MINOR);
Some(("pyo3-ffi".to_string(), minor))
} else if deps.contains_key("cpython") {
Some(("rust-cpython".to_string(), MINIMUM_PYTHON_MINOR))
} else if deps.contains_key("uniffi") {
Some(("uniffi".to_string(), MINIMUM_PYTHON_MINOR))
} else {
Expand Down Expand Up @@ -1365,8 +1363,6 @@ mod test {
find_bridge(&pyo3_mixed, Some("pyo3")),
Ok(BridgeModel::Bindings(..))
));

assert!(find_bridge(&pyo3_mixed, Some("rust-cpython")).is_err());
}

#[test]
Expand All @@ -1384,7 +1380,6 @@ mod test {
find_bridge(&pyo3_pure, Some("pyo3")),
Ok(BridgeModel::BindingsAbi3(3, 7))
));
assert!(find_bridge(&pyo3_pure, Some("rust-cpython")).is_err());
}

#[test]
Expand Down Expand Up @@ -1421,7 +1416,6 @@ mod test {
);
assert_eq!(find_bridge(&cffi_pure, None).unwrap(), BridgeModel::Cffi);

assert!(find_bridge(&cffi_pure, Some("rust-cpython")).is_err());
assert!(find_bridge(&cffi_pure, Some("pyo3")).is_err());
}

Expand All @@ -1441,7 +1435,6 @@ mod test {
BridgeModel::Bin(None)
);

assert!(find_bridge(&hello_world, Some("rust-cpython")).is_err());
assert!(find_bridge(&hello_world, Some("pyo3")).is_err());

let pyo3_bin = MetadataCommand::new()
Expand Down
2 changes: 1 addition & 1 deletion src/develop.rs
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ pub struct DevelopOptions {
short = 'b',
long = "bindings",
alias = "binding-crate",
value_parser = ["pyo3", "pyo3-ffi", "rust-cpython", "cffi", "uniffi", "bin"]
value_parser = ["pyo3", "pyo3-ffi", "cffi", "uniffi", "bin"]
)]
pub bindings: Option<String>,
/// Pass --release to cargo
Expand Down
2 changes: 1 addition & 1 deletion tests/cmd/build.stdout
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Options:
-b, --bindings <BINDINGS>
Which kind of bindings to use

[possible values: pyo3, pyo3-ffi, rust-cpython, cffi, uniffi, bin]
[possible values: pyo3, pyo3-ffi, cffi, uniffi, bin]

-o, --out <OUT>
The directory to store the built wheels in. Defaults to a new "wheels" directory in the
Expand Down
2 changes: 1 addition & 1 deletion tests/cmd/develop.stdout
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Options:
-b, --bindings <BINDINGS>
Which kind of bindings to use

[possible values: pyo3, pyo3-ffi, rust-cpython, cffi, uniffi, bin]
[possible values: pyo3, pyo3-ffi, cffi, uniffi, bin]

--strip
Strip the library for minimum file size
Expand Down
2 changes: 1 addition & 1 deletion tests/cmd/publish.stdout
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ Options:
-b, --bindings <BINDINGS>
Which kind of bindings to use

[possible values: pyo3, pyo3-ffi, rust-cpython, cffi, uniffi, bin]
[possible values: pyo3, pyo3-ffi, cffi, uniffi, bin]

-o, --out <OUT>
The directory to store the built wheels in. Defaults to a new "wheels" directory in the
Expand Down