From 890717680e7c8c8a93d8b6e109cfb0dcf2a6a032 Mon Sep 17 00:00:00 2001 From: Thomas Tanon Date: Fri, 4 Oct 2024 13:26:33 +0200 Subject: [PATCH] UV: Always run "sync" (#288) UV is fast, it's a good idea to run sync everytime to avoid surprises --- .changelog/_unreleased.toml | 5 +++++ kraken-build/src/kraken/std/python/buildsystem/uv.py | 3 +++ 2 files changed, 8 insertions(+) create mode 100644 .changelog/_unreleased.toml diff --git a/.changelog/_unreleased.toml b/.changelog/_unreleased.toml new file mode 100644 index 00000000..cee1e924 --- /dev/null +++ b/.changelog/_unreleased.toml @@ -0,0 +1,5 @@ +[[entries]] +id = "d8ada304-d3fe-43f0-b4fa-7d655949cdbc" +type = "improvement" +description = "Always run `uv sync`" +author = "thomas.pellissier-tanon@helsing.ai" diff --git a/kraken-build/src/kraken/std/python/buildsystem/uv.py b/kraken-build/src/kraken/std/python/buildsystem/uv.py index 4c5a5ce5..8c510681 100644 --- a/kraken-build/src/kraken/std/python/buildsystem/uv.py +++ b/kraken-build/src/kraken/std/python/buildsystem/uv.py @@ -301,3 +301,6 @@ def install(self, settings: PythonSettings) -> None: unsafe_command = [self.uv_bin, "sync"] + indexes.to_unsafe_args() logger.info("Running %s in '%s'", safe_command, self.project_directory) sp.check_call(unsafe_command, cwd=self.project_directory) + + def always_install(self) -> bool: + return True