From 976e38614e6b26b0138c86435c4215e86bbe3b0d Mon Sep 17 00:00:00 2001 From: NeuralFault Date: Tue, 17 Feb 2026 17:49:39 -0500 Subject: [PATCH] Added PIP_CONSTRAINT hook so pip process used for building CLIP inherit's the setuptools constraint in UV_BUILD_CONSTRAINT. --- StabilityMatrix.Core/Models/Packages/VladAutomatic.cs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/StabilityMatrix.Core/Models/Packages/VladAutomatic.cs b/StabilityMatrix.Core/Models/Packages/VladAutomatic.cs index 09cc94b8..18411183 100644 --- a/StabilityMatrix.Core/Models/Packages/VladAutomatic.cs +++ b/StabilityMatrix.Core/Models/Packages/VladAutomatic.cs @@ -312,6 +312,8 @@ public override async Task InstallPackage( ) .ConfigureAwait(false); + ApplySetuptoolsConstraints(venvRunner, installLocation); + await venvRunner.PipInstall(["setuptools", "rich", "uv"]).ConfigureAwait(false); if (options.PythonOptions.PythonVersion is { Minor: < 12 }) { @@ -431,6 +433,8 @@ public override async Task Update( ) .ConfigureAwait(false); + ApplySetuptoolsConstraints(venvRunner, installedPackage.FullPath!.Unwrap()); + await venvRunner.CustomInstall("launch.py --upgrade --test", onConsoleOutput).ConfigureAwait(false); try @@ -468,6 +472,12 @@ public override async Task Update( return baseUpdateResult; } + private static void ApplySetuptoolsConstraints(IPyVenvRunner venvRunner, string installLocation) + { + var constraintPath = Path.Combine(installLocation, "venv", "uv-build-constraints.txt"); + venvRunner.UpdateEnvironmentVariables(env => env.SetItem("PIP_CONSTRAINT", constraintPath)); + } + private class VladExtensionManager(VladAutomatic package) : GitPackageExtensionManager(package.PrerequisiteHelper) {