Files
nixpkgs/pkgs/by-name/wi/windmill/python_versions.patch

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

38 lines
1.6 KiB
Diff
Raw Permalink Normal View History

2025-10-09 14:15:47 +02:00
diff --git a/windmill-worker/src/python_versions.rs b/windmill-worker/src/python_versions.rs
index 3d71e9f9ec..c9166b52c6 100644
--- a/windmill-worker/src/python_versions.rs
+++ b/windmill-worker/src/python_versions.rs
@@ -326,6 +326,7 @@ impl PyV {
}
pub async fn list_available_python_versions() -> Vec<Self> {
+ return vec![PyVAlias::Py312.into()];
match Self::list_available_python_versions_inner().await {
Ok(pyvs) => pyvs,
Err(e) => {
@@ -591,6 +592,10 @@ impl PyV {
w_id: &str,
occupancy_metrics: &mut Option<&mut OccupancyMetrics>,
) -> error::Result<()> {
+ let v = self.to_string();
+ append_logs(job_id, w_id, format!("\nREQUESTED PYTHON INSTALL IGNORED ({})", v), conn).await;
+ return Err(error::Error::BadConfig(format!("Python is managed through the NixOS system configuration. Change the Windmill instance setting to version '3.12'")));
+
let v = self.to_string();
append_logs(job_id, w_id, format!("\nINSTALLING PYTHON ({})", v), conn).await;
// Create dirs for newly installed python
@@ -695,11 +700,11 @@ impl PyV {
"find",
&self.to_string(),
"--system",
- "--python-preference=only-managed",
+ "--python-preference=only-system",
])
.envs([
("UV_PYTHON_INSTALL_DIR", PY_INSTALL_DIR),
- ("UV_PYTHON_PREFERENCE", "only-managed"),
+ ("UV_PYTHON_PREFERENCE", "only-system"),
])
// .stdout(Stdio::piped())
.stderr(Stdio::piped())