-
Notifications
You must be signed in to change notification settings - Fork 45
[WIP]feat:support isolated python runtime for building #1237
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
internal/pyenv/pybuild.go
Outdated
for _, p := range parts { | ||
if p == pkgcfg { | ||
found = true | ||
break | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's better to replace with slices.Contains
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done in 3f9c97b.
return err | ||
} | ||
lines := strings.Split(string(b), "\n") | ||
rpath := "-Wl,-rpath," + filepath.Join(pyHome, "lib") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems that's unnecessary, #1163 will set up -rpath
automatically.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done in 5643951, I keep FindPythonRpath to dynamically resolve the local Python library path.
internal/pyenv
llgo build
, automatically download a Python environment intoLLGoCache
, pip corresponding site-packages, and set up the runtime.Current issues:
llgo run
andllgo build
. When running the binary, the program falls back to the system’s default Python.