Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion examples/development/python/poetry/poetry-demo/devbox.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"packages": {
"poetry@1.4": {
"last_modified": "2023-05-19T19:44:39Z",
"plugin_version": "0.0.1",
"plugin_version": "0.0.2",
"resolved": "github:NixOS/nixpkgs/4a22f6f0a4b4354778f786425babce9a56f6b5d8#poetry",
"source": "devbox-search",
"version": "1.4.2",
Expand Down
1 change: 0 additions & 1 deletion internal/impl/devbox.go
Original file line number Diff line number Diff line change
Expand Up @@ -766,7 +766,6 @@ func (d *Devbox) computeNixEnv(ctx context.Context, usePrintDevEnvCache bool) (m
// Append variables from current env if --pure is not passed
currentEnv := os.Environ()
env, err := d.parseEnvAndExcludeSpecialCases(currentEnv)

if err != nil {
return nil, err
}
Expand Down
7 changes: 5 additions & 2 deletions plugins/poetry.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
{
"name": "poetry",
"version": "0.0.2",
"version": "0.0.3",
"readme": "This plugin automatically configures poetry to use the version of python installed in your Devbox shell, instead of the Python version that it is bundled with. Your pyproject.toml must be in the same directory as your devbox.json.",
"env": {
"POETRY_VIRTUALENVS_IN_PROJECT": "true",
"POETRY_VIRTUALENVS_CREATE": "true",
"POETRY_VIRTUALENVS_PATH": "{{.Virtenv}}/.virtualenvs"
},
"create_files": {
"{{ .Virtenv }}/bin/initHook.sh": "poetry/initHook.sh"
},
"shell": {
"init_hook": [
"poetry env use $(command -v python) --no-interaction"
"{{ .Virtenv }}/bin/initHook.sh"
]
}
}
4 changes: 4 additions & 0 deletions plugins/poetry/initHook.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh

poetry env use $(command -v python) --no-interaction