-
Notifications
You must be signed in to change notification settings - Fork 264
[pip] Add pip support (via venv) DEV-1146 #147
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
Conversation
nginx fails to start when the temporary directories in shell-helper-nginx.conf don't exist yet. Specifically, the `cache` subdirectory needs to be created under the temp directory. To fix this: 1. Use os.TempDir() to ensure we use the OS-specific temporary directory (which on macOS isn't `/tmp`). 2. Don't use a `cache` subdirectory so we don't need to worry about the directory existing.
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.
TIL about pex. Nice work!
lgtm, but will defer to others who are more familiar with python environments.
// ImportError: libstdc++.so.6: cannot open shared object file: No such file or directory | ||
// possible solution is to set $LD_LIBRARY_PATH | ||
// https://nixos.wiki/wiki/Packaging/Quirks_and_Caveats |
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.
Try adding gcc
or binutils
nix package when building with pandas.
return nil | ||
} | ||
|
||
return usererr.New( |
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.
must be case-insen....
python -m venv %[1]s; | ||
source %[2]s;`) |
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.
Just in case srcDir
has spaces:
python -m venv %[1]s; | |
source %[2]s;`) | |
python -m venv "%[1]s"; | |
source "%[2]s";`) |
devbox_test.go
Outdated
@@ -12,6 +12,7 @@ import ( | |||
) | |||
|
|||
func TestDevbox(t *testing.T) { | |||
os.Setenv("TMPDIR", "/tmp") |
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.
If you use t.Setenv
it'll automatically restore the original value and guard against changing the value in parallel tests.
It might also be worth checking that /tmp
exists before using it so we can provide a helpful error.
Summary
This is stacked on #105. Please review that one first.
Adds basic pip support.
Does not yet libraries with native extensions like
pandas
but there's a plan for that.How was it tested?
devbox shell
.devbox build