Skip to content

Commit

Permalink
feat/uv project envvar support (#287)
Browse files Browse the repository at this point in the history
* UV_PROJECT_ENVIRONMENT was merged!

* Consistency across different projects
  • Loading branch information
blast-hardcheese authored Sep 5, 2024
1 parent e95ee42 commit 9782e39
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -128,5 +128,5 @@ wrapped-test-%:
UPM_SUITE_PREFIX="$$suite_prefix" go test
endif

fmt:
format:
go fmt github.com/replit/upm/...
7 changes: 6 additions & 1 deletion internal/backends/python/python.go
Original file line number Diff line number Diff line change
Expand Up @@ -755,7 +755,12 @@ func makePythonUvBackend() api.LanguageBackend {
return pkgdir
}

return ""
retval := os.Getenv("UV_PROJECT_ENVIRONMENT")
if retval != "" {
return retval
}

return ".venv"
},
SortPackages: pkg.SortPrefixSuffix(normalizePackageName),

Expand Down

0 comments on commit 9782e39

Please sign in to comment.