From 3f4999f946caff6d7065920df3d14b97666c27c2 Mon Sep 17 00:00:00 2001 From: Ben Brown <9870007+brownben@users.noreply.github.com> Date: Thu, 28 Nov 2024 15:53:55 +0000 Subject: [PATCH] change how virtual env is set instead of setting the `prefix` setting we set the `home` setting which propagates to `prefix` --- src/python/interpreters.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/python/interpreters.rs b/src/python/interpreters.rs index b849fb5..6206524 100644 --- a/src/python/interpreters.rs +++ b/src/python/interpreters.rs @@ -45,7 +45,7 @@ impl MainInterpreter { if let Ok(virtual_enviroment) = env::var("VIRTUAL_ENV") { virtual_enviroment_path = WideCString::from_str(&virtual_enviroment).unwrap(); - config.assume_init_mut().prefix = virtual_enviroment_path.as_mut_ptr().cast(); + config.assume_init_mut().home = virtual_enviroment_path.as_mut_ptr().cast(); } ffi::Py_InitializeFromConfig(ptr::from_mut(config.assume_init_mut()));