Skip to content

Commit

Permalink
fix: installing conflicting versions of numpy with older python versions
Browse files Browse the repository at this point in the history
  • Loading branch information
BrewingWeasel committed Aug 19, 2024
1 parent a2dcce1 commit d29ea0e
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src-tauri/src/setup_stanza.rs
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,15 @@ pub async fn setup_stanza(state: State<'_, KalbaState>, window: Window) -> Resul
.await?;
fs::write(data_dir.join("run.py"), script)?;

let requirements = reqwest::get(
"https://raw.githubusercontent.com/brewingweasel/kalba/master/stanza/requirements.txt",
)
.await?
.error_for_status()?
.text()
.await?;
fs::write(data_dir.join("requirements.txt"), requirements)?;

window.emit(
"stanzaDownloadUpdate",
ToasterPayload {
Expand All @@ -118,7 +127,7 @@ pub async fn setup_stanza(state: State<'_, KalbaState>, window: Window) -> Resul
.join("pip"),
)
.current_dir(&data_dir)
.args(["install", "stanza"])
.args(["install", "-r", "requirements.txt"])
.spawn()?
.wait()?;

Expand Down

0 comments on commit d29ea0e

Please sign in to comment.