1
0
forked from rosa/hakurei

internal/rosa: set PYTHONUNBUFFERED=1

Some python tools try to be clever and buffers output. This makes the build process appear to hang and is quite frustrating. Instead of trying to address this on a case-by-case basis, this is turned off globally for the interpreter.

Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
2026-03-26 15:29:29 +09:00
parent 4407892632
commit d514d0679f

View File

@@ -199,6 +199,10 @@ func lastIndexFunc[S ~[]E, E any](s S, f func(E) bool) (i int) {
// fixupEnviron fixes up PATH, prepends extras and returns the resulting slice. // fixupEnviron fixes up PATH, prepends extras and returns the resulting slice.
func fixupEnviron(env, extras []string, paths ...string) []string { func fixupEnviron(env, extras []string, paths ...string) []string {
// some python tools try to be clever and buffers their output, making the
// build process appear to hang
env = append(env, "PYTHONUNBUFFERED=1")
const pathPrefix = "PATH=" const pathPrefix = "PATH="
pathVal := strings.Join(paths, ":") pathVal := strings.Join(paths, ":")