Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions StabilityMatrix.Core/Models/Packages/VladAutomatic.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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 })
{
Expand Down Expand Up @@ -431,6 +433,8 @@ public override async Task<InstalledPackageVersion> Update(
)
.ConfigureAwait(false);

ApplySetuptoolsConstraints(venvRunner, installedPackage.FullPath!.Unwrap());

await venvRunner.CustomInstall("launch.py --upgrade --test", onConsoleOutput).ConfigureAwait(false);

try
Expand Down Expand Up @@ -468,6 +472,12 @@ public override async Task<InstalledPackageVersion> 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)
{
Expand Down
Loading