From d29ea0eac99783a2073d374bde36dc7a70cff70a Mon Sep 17 00:00:00 2001 From: Finn Brewer Date: Mon, 19 Aug 2024 12:03:29 -0700 Subject: [PATCH] fix: installing conflicting versions of numpy with older python versions --- src-tauri/src/setup_stanza.rs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src-tauri/src/setup_stanza.rs b/src-tauri/src/setup_stanza.rs index 44abc83..c1877f5 100644 --- a/src-tauri/src/setup_stanza.rs +++ b/src-tauri/src/setup_stanza.rs @@ -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 { @@ -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()?;