Skip to content

Commit eff1191

Browse files
authored
Merge pull request LykosAI#1209 from ionite34/backport/main/pr-1208
[dev to main] backport: Use relative path for UV_BUILD_CONSTRAINT to avoid issues with spaces… (1208)
2 parents 16c6424 + 86cf211 commit eff1191

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)