Skip to content

Commit

Permalink
Modify for not breaking $CARGO_TARGET_DIR workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
eatPizza311 authored Oct 12, 2023
1 parent 1582e23 commit 24cb453
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions crates/irust_repl/irust_kernel/irust_kernel/install.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,21 @@ def get_cargo_target_dir():
print('Fetching `irust` repo and compiling `Re` executable')
subprocess.run(["git", "clone","--depth","1", "https://github.com/sigmasd/irust"],cwd=td)
irust_repl_dir = os.path.join(td,"irust", "crates", "irust_repl")
subprocess.run(["cargo", "b", "--release", "--example", "re", "--target-dir",cargo_target_dir], cwd=irust_repl_dir)

src = os.path.join(irust_repl_dir, cargo_target_dir, "release", "examples", "re")
subprocess.run(
[
"cargo",
"b",
"--release",
"--example",
"re",
"--target-dir",
cargo_target_dir,
"--manifest-path",
os.path.join(irust_repl_dir, "Cargo.toml"),
]
)

src = os.path.join(cargo_target_dir, "release", "examples", "re")
dst = os.path.join(td, "re")
shutil.copy2(src, dst)
shutil.rmtree(os.path.join(td,"irust"))
Expand Down

0 comments on commit 24cb453

Please sign in to comment.