forked from jetify-com/devbox
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
## Summary Builtin plugin for Poetry that configures it to use the installed version of python, instead of the one that Poetry is built with This also sets some environment variables that create the poetry virtualenv inside the project ## How was it tested? Tested using the example project, also in this PR. Run `poetry env info` to confirm it's using the right version of Poetry
- Loading branch information
Showing
7 changed files
with
51 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"packages": [ | ||
"python@3.10", | ||
"python@3.8", | ||
"poetry@1.4" | ||
], | ||
"shell": { | ||
|
22 changes: 13 additions & 9 deletions
22
examples/development/python/poetry/poetry-demo/devbox.lock
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,19 @@ | ||
{ | ||
"lockfile_version": "1", | ||
"packages": { | ||
"poetry": { | ||
"last_modified": "", | ||
"resolved": "github:NixOS/nixpkgs/f80ac848e3d6f0c12c52758c0f25c10c97ca3b62#poetry", | ||
"version": "" | ||
"poetry@1.4": { | ||
"last_modified": "2023-05-19T19:44:39Z", | ||
"plugin_version": "0.0.1", | ||
"resolved": "github:NixOS/nixpkgs/4a22f6f0a4b4354778f786425babce9a56f6b5d8#poetry", | ||
"source": "devbox-search", | ||
"version": "1.4.2" | ||
}, | ||
"python310": { | ||
"last_modified": "", | ||
"resolved": "github:NixOS/nixpkgs/f80ac848e3d6f0c12c52758c0f25c10c97ca3b62#python310", | ||
"version": "" | ||
"python@3.8": { | ||
"last_modified": "2023-06-30T04:44:22Z", | ||
"plugin_version": "0.0.1", | ||
"resolved": "github:NixOS/nixpkgs/3c614fbc76fc152f3e1bc4b2263da6d90adf80fb#python38", | ||
"source": "devbox-search", | ||
"version": "3.8.17" | ||
} | ||
} | ||
} | ||
} |
58 changes: 19 additions & 39 deletions
58
examples/development/python/poetry/poetry-demo/poetry.lock
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"name": "poetry", | ||
"version": "0.0.1", | ||
"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.", | ||
"env": { | ||
"POETRY_VIRTUALENVS_IN_PROJECT": "true", | ||
"POETRY_VIRTUALENVS_CREATE": "true", | ||
"POETRY_VIRTUALENVS_PATH": "{{.Virtenv}}/.virtualenvs" | ||
}, | ||
"shell": { | ||
"init_hook": [ | ||
"poetry env use $(command -v python) --quiet --no-interaction" | ||
] | ||
} | ||
} |