Skip to content

Commit 86cf211

Browse files
committed
Merge pull request LykosAI#1208 from ionite34/fix-the-fix
Use relative path for UV_BUILD_CONSTRAINT to avoid issues with spaces… (cherry picked from commit c162a79487d68ba315f70f7db5c4e32030a3076a)
1 parent 16c6424 commit 86cf211

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

StabilityMatrix.Core/Models/Packages/BaseGitPackage.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,8 +239,12 @@ await PyInstallationManager.GetInstallationAsync(pythonVersion.Value).ConfigureA
239239
// setuptools 82+ removed pkg_resources, breaking source builds that import it.
240240
var buildConstraintsPath = Path.Combine(installedPackagePath, venvName, "uv-build-constraints.txt");
241241
await File.WriteAllTextAsync(buildConstraintsPath, "setuptools<82\n").ConfigureAwait(false);
242+
// Use relative path because uv splits UV_BUILD_CONSTRAINT on spaces (it's a list-type env var),
243+
// which breaks when the absolute path contains spaces. The working directory is installedPackagePath,
244+
// so the relative path resolves correctly.
245+
var relativeBuildConstraintsPath = Path.Combine(venvName, "uv-build-constraints.txt");
242246
venvRunner.UpdateEnvironmentVariables(env =>
243-
env.SetItem("UV_BUILD_CONSTRAINT", buildConstraintsPath)
247+
env.SetItem("UV_BUILD_CONSTRAINT", relativeBuildConstraintsPath)
244248
);
245249

246250
// ensure pip is installed

0 commit comments

Comments
 (0)