Skip to content

Commit

Permalink
Add rye support (topgrade-rs#799)
Browse files Browse the repository at this point in the history
Rye is a new cargo-like package manager for python by @mitsuhiko.
  • Loading branch information
alok authored May 13, 2024
1 parent 4d66431 commit 2a1999f
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ pub enum Step {
Rtcl,
RubyGems,
Rustup,
Rye,
Scoop,
Sdkman,
SelfUpdate,
Expand Down
1 change: 1 addition & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,7 @@ fn run() -> Result<()> {
// The following update function should be executed on all OSes.
runner.execute(Step::Fossil, "fossil", || generic::run_fossil(&ctx))?;
runner.execute(Step::Elan, "elan", || generic::run_elan(&ctx))?;
runner.execute(Step::Rye, "rye", || generic::run_rye(&ctx))?;
runner.execute(Step::Rustup, "rustup", || generic::run_rustup(&ctx))?;
runner.execute(Step::Juliaup, "juliaup", || generic::run_juliaup(&ctx))?;
runner.execute(Step::Dotnet, ".NET", || generic::run_dotnet_upgrade(&ctx))?;
Expand Down
7 changes: 7 additions & 0 deletions src/steps/generic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,13 @@ pub fn run_rustup(ctx: &ExecutionContext) -> Result<()> {
ctx.run_type().execute(rustup).arg("update").status_checked()
}

pub fn run_rye(ctx: &ExecutionContext) -> Result<()> {
let rye = require("rye")?;

print_separator("Rye");
ctx.run_type().execute(rye).args(["self", "update"]).status_checked()
}

pub fn run_elan(ctx: &ExecutionContext) -> Result<()> {
let elan = require("elan")?;

Expand Down

0 comments on commit 2a1999f

Please sign in to comment.