From 769530e68c20a9477e65698bb5364ec9b796142e Mon Sep 17 00:00:00 2001 From: Devon Stewart Date: Tue, 15 Oct 2024 14:21:44 -0700 Subject: [PATCH] Evict uv if we see requirements.txt --- internal/backends/python/python.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/internal/backends/python/python.go b/internal/backends/python/python.go index 3e09f74e..92be5938 100644 --- a/internal/backends/python/python.go +++ b/internal/backends/python/python.go @@ -741,6 +741,12 @@ func makePythonUvBackend() api.LanguageBackend { return false, err } + // If we see a requirements.txt, let's make sure we don't accidentally + // choose uv over pip. + if info, err := os.Stat(PythonPipBackend.Specfile); err == nil { + return info == nil, nil + } + return cfg.Tool.Poetry == nil, nil }, Lockfile: "uv.lock",