Skip to content

Commit

Permalink
Chore/switch pip plugin reference to python (#2265)
Browse files Browse the repository at this point in the history
## Summary

Remove pip plugin and use Python plugin.

## How was it tested?

`devbox run lint`
`devbox run test`
`go mod tidy`
`devbox shell` testing new python plugin (`cp plugins/python.json
plugins/plugin.json` and add `"include": ["path:./plugins/"],` to
devbox.json. Though this is the output I got (not the Poetry message):

```
devbox % ./dist/devbox shell                       
Info: Ensuring packages are installed.
✓ Computed the Devbox environment.
Starting a devbox shell...
Virtual environment directory doesn't exist. Creating new one...

Poetry could not find a pyproject.toml file in /Users/dj_goku/dev/github/djgoku/devbox or its parents
```

---------

Co-authored-by: John Lago <750845+Lagoja@users.noreply.github.com>
  • Loading branch information
djgoku and Lagoja authored Sep 12, 2024
1 parent d1ab641 commit df187b9
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 21 deletions.
3 changes: 1 addition & 2 deletions docs/app/docs/guides/plugins.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Built-in plugins are available for the following packages. You can activate the
* [Redis](../devbox_examples/databases/redis.md) (redis)
* [Valkey](../devbox_examples/databases/valkey.md) (valkey)
* [PHP](../devbox_examples/languages/php.md) (php, php80, php81, php82...)
* [Pip](../devbox_examples/languages/python.md) (python39Packages.pip, python310Packages.pip, python311Packages.pip...)
* [Python](../devbox_examples/languages/python.md) (python, python-full, python-minimal...)
* [Ruby](../devbox_examples/languages/ruby.md)(ruby, ruby_3_1, ruby_3_0...)


Expand Down Expand Up @@ -163,4 +163,3 @@ Developers should directly edit helper files and check them into source control
## Plugins Source Code

Devbox Plugins are written in JSON and stored in the main Devbox Repo. You can view the source code of the current plugins [here](https://github.com/jetify-com/devbox/tree/main/plugins)

17 changes: 0 additions & 17 deletions plugins/pip.json

This file was deleted.

5 changes: 3 additions & 2 deletions plugins/python.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@
"version": "0.0.4",
"description": "Python in Devbox works best when used with a virtual environment (venv, virtualenv, etc.). Devbox will automatically create a virtual environment using `venv` for python3 projects, so you can install packages with pip as normal.\nTo activate the environment, run `. $VENV_DIR/bin/activate` or add it to the init_hook of your devbox.json\nTo change where your virtual environment is created, modify the $VENV_DIR environment variable in your init_hook",
"env": {
"VENV_DIR": "{{ .DevboxProjectDir }}/.venv"
"VENV_DIR": "{{ .DevboxProjectDir }}/.venv",
"UV_PYTHON": "{{ .DevboxProjectDir }}/.devbox/nix/profile/default/bin/python"
},
"create_files": {
"{{ .Virtenv }}/bin/venvShellHook.sh": "pip/venvShellHook.sh"
"{{ .Virtenv }}/bin/venvShellHook.sh": "python/venvShellHook.sh"
},
"shell": {
"init_hook": ["{{ .Virtenv }}/bin/venvShellHook.sh"]
Expand Down
File renamed without changes.

0 comments on commit df187b9

Please sign in to comment.