Skip to content

Commit a5acdca

Browse files
authored
[python] use posix-compatible dot instead of bashism source (#1699)
## Summary Think its a bit nice to be posix compatible where we can. The downside is that `source` is more recognizable, perhaps, compared to `dot`. ## How was it tested? cicd tests
1 parent 4e95590 commit a5acdca

File tree

9 files changed

+11
-11
lines changed

9 files changed

+11
-11
lines changed

docs/app/docs/devbox_examples/languages/python.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ This will install Python 3.10 in your shell. You can find other versions of Pyth
2929

3030
The `python` package automatically comes bundled with `pip`, and the `python` plugin for Devbox will automatically create a virtual environment for installing your packages locally
3131

32-
Your virtual environment is created in the `.devbox/virtenv/python` directory by default, and can be activated by running `source $VENV_DIR/bin/activate` in your devbox shell. You can activate the virtual environment automatically using the init_hook of your `devbox.json`:
32+
Your virtual environment is created in the `.devbox/virtenv/python` directory by default, and can be activated by running `. $VENV_DIR/bin/activate` in your devbox shell. You can activate the virtual environment automatically using the init_hook of your `devbox.json`:
3333

3434
```json
3535
{

docs/app/docs/devbox_examples/stacks/django.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ This example demonstrates how to configure and run a Django app using Devbox. It
2525
1. Start a devbox shell with `devbox shell`, then activate your virtual environment and install your requirements using the commands below.
2626

2727
```bash
28-
source $VENV_DIR/bin/activate
28+
. $VENV_DIR/bin/activate
2929
pip install -r requirements.txt
3030
```
3131

examples/cloud_development/temporal/devbox.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"echo 'Setting flags to allow Python C extension compilation'",
1515
"export NIX_CFLAGS_COMPILE=\"$NIX_CFLAGS_COMPILE $(cat $(dirname $(command -v clang))/../nix-support/libcxx-cxxflags)\"",
1616
"echo 'Setting up virtual environment'",
17-
"source $VENV_DIR/bin/activate"
17+
". $VENV_DIR/bin/activate"
1818
],
1919
"scripts": {
2020
"start-temporal": "temporalite start --namespace default --log-level warn --log-format pretty --ephemeral"

examples/data_science/pytorch/gradio/devbox.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@
77
"env": {},
88
"shell": {
99
"init_hook": [
10-
"source $VENV_DIR/bin/activate",
10+
". $VENV_DIR/bin/activate",
1111
"pip install -r requirements.txt"
1212
]
1313
},
1414
"nixpkgs": {
1515
"commit": "f80ac848e3d6f0c12c52758c0f25c10c97ca3b62"
1616
}
17-
}
17+
}

examples/data_science/tensorflow/devbox.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@
66
],
77
"shell": {
88
"init_hook": [
9-
"source $VENV_DIR/bin/activate",
9+
". $VENV_DIR/bin/activate",
1010
"pip install -r requirements.txt"
1111
]
1212
},
1313
"nixpkgs": {
1414
"commit": "f80ac848e3d6f0c12c52758c0f25c10c97ca3b62"
1515
}
16-
}
16+
}

examples/development/python/pip/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ This will install Python 3.10 in your shell. You can find other versions of Pyth
2626

2727
You can install `pip` by running `devbox add python3xxPackages.pip`, where `3xx` is the version of Python you want to install. This will also install the pip plugin for Devbox, which automatically creates a virtual environment for installing your packages locally
2828

29-
Your virtual environment is created in the `.devbox/virtenv/pip` directory by default, and can be activated by running `source $VENV_DIR/bin/activate` in your devbox shell. You can activate the virtual environment automatically using the init_hook of your `devbox.json`:
29+
Your virtual environment is created in the `.devbox/virtenv/pip` directory by default, and can be activated by running `. $VENV_DIR/bin/activate` in your devbox shell. You can activate the virtual environment automatically using the init_hook of your `devbox.json`:
3030

3131
```json
3232
{

examples/stacks/django/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
1. Start a devbox shell with `devbox shell`. This will activate your virtual environment and install your requirements using the commands below.
2424

2525
```bash
26-
source $VENV_DIR/bin/activate
26+
. $VENV_DIR/bin/activate
2727
pip install -r requirements.txt
2828
```
2929

plugins/pip.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "pip",
33
"version": "0.0.2",
4-
"readme": "This plugin adds a script for automatically creating a virtual environment using `venv` for python3 projects, so you can install packages with pip as normal.\nTo activate the environment, run `source $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",
4+
"readme": "This plugin adds a script for automatically creating 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",
55
"env": {
66
"VENV_DIR": "{{ .Virtenv }}/.venv"
77
},

plugins/python.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "python",
33
"version": "0.0.3",
4-
"readme": "Python in Devbox works best when used with a virtual environment (vent, 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 `source $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",
4+
"readme": "Python in Devbox works best when used with a virtual environment (vent, 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",
55
"env": {
66
"VENV_DIR": "{{ .Virtenv }}/.venv"
77
},

0 commit comments

Comments
 (0)