From b5172b29a129a4b58f9218badabfe22d71fe0e0e Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Wed, 20 Nov 2024 18:19:47 +0100 Subject: [PATCH 1/2] Fix mypy error worker/configure.py:45: error: Value of type variable "SupportsRichComparisonT" of "min" cannot be "int | None" [type-var] worker/configure.py:45: error: Incompatible return value type (got "int | None", expected "int") [return-value] --- buildbot/worker/configure.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/buildbot/worker/configure.py b/buildbot/worker/configure.py index fe9d7d4..87b2092 100644 --- a/buildbot/worker/configure.py +++ b/buildbot/worker/configure.py @@ -39,7 +39,7 @@ def disk_free_in_gb(builder: worker.utils.Builder) -> float: def get_thread_count(thread_memory_in_GB: float) -> int: - num_threads = psutil.cpu_count() + num_threads = psutil.cpu_count() or 1 memory_in_GB = psutil.virtual_memory().total / (1024**3) return min(int(memory_in_GB / thread_memory_in_GB), num_threads) -- 2.30.2 From 7222b2b04c4e20bd482f1d7f2c1a72a610b42df5 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Wed, 20 Nov 2024 19:34:56 +0100 Subject: [PATCH 2/2] Invoke wheel cleaner after the install step This allows to circumvent some issues which results in Linux wheel files being much bigger than they should. Ref blender/blender!130623 --- buildbot/worker/blender/compile.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/buildbot/worker/blender/compile.py b/buildbot/worker/blender/compile.py index 5fff990..b551533 100644 --- a/buildbot/worker/blender/compile.py +++ b/buildbot/worker/blender/compile.py @@ -533,3 +533,8 @@ def compile_install(builder: worker.blender.CodeBuilder) -> None: builder.setup_build_environment() cmake_configure(builder) cmake_build(builder, True) + + if builder.python_module: + wheel_cleanup_tool = builder.blender_dir / "tools" / "utils_build" / "wheel_cleanup.py" + if wheel_cleanup_tool.exists(): + builder.call(("python", wheel_cleanup_tool, builder.install_dir / "bpy")) -- 2.30.2