Skip to content
This repository has been archived by the owner on Jul 17, 2024. It is now read-only.

Commit

Permalink
fix: Disable python-build.
Browse files Browse the repository at this point in the history
  • Loading branch information
milesj committed Oct 21, 2023
1 parent 68525fe commit 88d88fb
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 29 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## 0.1.2

#### ⚙️ Internal

- Temporarily disabling `python-build` functionality.

## 0.1.1

#### 🐞 Fixes
Expand Down
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "python_plugin"
version = "0.1.1"
version = "0.1.2"
edition = "2021"
license = "MIT"
publish = false
Expand Down
54 changes: 27 additions & 27 deletions src/proto.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,33 +23,33 @@ pub fn register_tool(Json(_): Json<ToolMetadataInput>) -> FnResult<Json<ToolMeta
}))
}

#[plugin_fn]
pub fn native_install(
Json(input): Json<NativeInstallInput>,
) -> FnResult<Json<NativeInstallOutput>> {
let mut output = NativeInstallOutput::default();
let env = get_proto_environment()?;

// https://github.com/pyenv/pyenv/tree/master/plugins/python-build
if command_exists(&env, "python-build") {
host_log!("Building with `python-build` instead of downloading a pre-built");

let result = exec_command!(
inherit,
"python-build",
[
input.context.version.as_str(),
input.install_dir.real_path().to_str().unwrap(),
]
);

output.installed = result.exit_code == 0;
} else {
output.skip_install = true;
}

Ok(Json(output))
}
// #[plugin_fn]
// pub fn native_install(
// Json(input): Json<NativeInstallInput>,
// ) -> FnResult<Json<NativeInstallOutput>> {
// let mut output = NativeInstallOutput::default();
// let env = get_proto_environment()?;

// // https://github.com/pyenv/pyenv/tree/master/plugins/python-build
// if command_exists(&env, "python-build") {
// host_log!("Building with `python-build` instead of downloading a pre-built");

// let result = exec_command!(
// inherit,
// "python-build",
// [
// input.context.version.as_str(),
// input.install_dir.real_path().to_str().unwrap(),
// ]
// );

// output.installed = result.exit_code == 0;
// } else {
// output.skip_install = true;
// }

// Ok(Json(output))
// }

#[derive(Deserialize)]
struct ReleaseEntry {
Expand Down

0 comments on commit 88d88fb

Please sign in to comment.