You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/collections/_documentation/development/contribute/environment.md
+25-6Lines changed: 25 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,7 @@ sidebar_order: 1
9
9
10
10
Follow [the Docker file in the repository](https://github.com/getsentry/sentry/blob/master/docker/Dockerfile) but instead of creating and installing a wheel, install the package in editable mode (`pip install . -e`).
11
11
12
-
### Macintosh OS X
12
+
### macOS
13
13
14
14
{% capture __alert_content -%}
15
15
macOS Catalina will recommend that you use the zsh shell, instead of bash. While the differences are minimal, this guide only covers bash, so for best results please use bash. You can verify this by typing `echo $SHELL`, which should result in `/bin/bash`.
@@ -36,7 +36,7 @@ It's important that you remain in the repo's root directory for the rest of the
36
36
%}
37
37
38
38
39
-
### Macintosh OS X - System Dependencies
39
+
### macOS - System Dependencies
40
40
41
41
Install [Homebrew](http://brew.sh), and then run `brew bundle` to install the various system packages as listed in sentry's `Brewfile`.
42
42
@@ -45,7 +45,7 @@ One thing that requires manual attention is `docker`, which should have just bee
45
45
You can verify that docker is running by running `docker ps`. If it doesn't error with something like `Error response from daemon: dial unix docker.raw.sock: connect: connection refused`, you're good to continue.
46
46
47
47
48
-
### Macintosh OS X - Python
48
+
### macOS - Python
49
49
50
50
Unfortunately, homebrew recently removed Python 2. While some versions of macOS ship with Python 2, it's recommended to not use the system's installation. Sentry also requires a specific version of Python, as shown in the file `.python-version`, and this may differ from the system's python.
51
51
@@ -76,7 +76,7 @@ PATH="" exec /bin/bash -l
76
76
If it worked, running `which python` should result in something like `/Users/you/.pyenv/shims/python`.
77
77
78
78
79
-
### Macintosh OS X - NodeJS
79
+
### macOS - NodeJS
80
80
81
81
Sentry also requires a specific version of NodeJS. Like pyenv, we recommend using [volta](https://github.com/volta-cli/volta) to install and manage node versions. Unfortunately, brew doesn't provide volta yet, but installation is quite easy. Run:
82
82
@@ -108,7 +108,7 @@ node -v
108
108
Volta intercepts this and automatically downloads and installs the node version in sentry's `package.json`.
109
109
110
110
111
-
### Macintosh OS X - Python (virtual environment)
111
+
### macOS - Python (virtual environment)
112
112
113
113
You're now ready to create a python virtual environment. Run:
114
114
@@ -126,7 +126,7 @@ source .venv/bin/activate
126
126
If everything worked, running `which python` should now result in something like `/Users/you/whereever-you-cloned-sentry/.venv/bin/python`.
127
127
128
128
129
-
### Macintosh OS X - Final Bootstrap
129
+
### macOS - Final Bootstrap
130
130
131
131
The last step is to run `make bootstrap`. This will take a long time, as it basically installs sentry and all of its dependencies, starts up external services, and preps databases.
132
132
@@ -139,6 +139,25 @@ The last step is to run `make bootstrap`. This will take a long time, as it basi
139
139
%}
140
140
141
141
142
+
### macOS - direnv (optional, but recommended)
143
+
144
+
We have a [direnv](https://github.com/direnv/direnv) configuration for Sentry. It automatically sets some helpful environment variables for you, automatically activates your virtual environment, and does some simple state checking to guide you towards the expected development environment.
145
+
146
+
To install it, run `brew install direnv`. You'll want to add this to the end of your `~/.bashrc` file:
147
+
148
+
```bash
149
+
eval"$(direnv hook bash)"
150
+
```
151
+
152
+
And after doing that, reload your shell:
153
+
154
+
```bash
155
+
PATH=""exec /bin/bash -l
156
+
```
157
+
158
+
Now, direnv should automatically execute (or you might need to type `direnv allow`). If you've followed this guide correctly, it should succeed.
0 commit comments