sentry-devenv 1.20.0__tar.gz → 1.22.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (84) hide show
  1. {sentry_devenv-1.20.0 → sentry_devenv-1.22.0}/PKG-INFO +76 -14
  2. {sentry_devenv-1.20.0 → sentry_devenv-1.22.0}/README.md +75 -13
  3. {sentry_devenv-1.20.0 → sentry_devenv-1.22.0}/devenv/lib/colima.py +3 -0
  4. sentry_devenv-1.22.0/devenv/lib/uv.py +56 -0
  5. {sentry_devenv-1.20.0 → sentry_devenv-1.22.0}/devenv/main.py +1 -1
  6. {sentry_devenv-1.20.0 → sentry_devenv-1.22.0}/pyproject.toml +1 -1
  7. {sentry_devenv-1.20.0 → sentry_devenv-1.22.0}/sentry_devenv.egg-info/PKG-INFO +76 -14
  8. {sentry_devenv-1.20.0 → sentry_devenv-1.22.0}/sentry_devenv.egg-info/SOURCES.txt +1 -0
  9. {sentry_devenv-1.20.0 → sentry_devenv-1.22.0}/tests/lib/test_venv.py +4 -4
  10. {sentry_devenv-1.20.0 → sentry_devenv-1.22.0}/ci/integration/repo/devenv/sync.py +0 -0
  11. {sentry_devenv-1.20.0 → sentry_devenv-1.22.0}/devenv/__init__.py +0 -0
  12. {sentry_devenv-1.20.0 → sentry_devenv-1.22.0}/devenv/__main__.py +0 -0
  13. {sentry_devenv-1.20.0 → sentry_devenv-1.22.0}/devenv/bootstrap.py +0 -0
  14. {sentry_devenv-1.20.0 → sentry_devenv-1.22.0}/devenv/checks/__init__.py +0 -0
  15. {sentry_devenv-1.20.0 → sentry_devenv-1.22.0}/devenv/checks/dockerConfig.py +0 -0
  16. {sentry_devenv-1.20.0 → sentry_devenv-1.22.0}/devenv/checks/dockerDesktop.py +0 -0
  17. {sentry_devenv-1.20.0 → sentry_devenv-1.22.0}/devenv/checks/limaDns.py +0 -0
  18. {sentry_devenv-1.20.0 → sentry_devenv-1.22.0}/devenv/checks/test.py +0 -0
  19. {sentry_devenv-1.20.0 → sentry_devenv-1.22.0}/devenv/colima.py +0 -0
  20. {sentry_devenv-1.20.0 → sentry_devenv-1.22.0}/devenv/constants.py +0 -0
  21. {sentry_devenv-1.20.0 → sentry_devenv-1.22.0}/devenv/doctor.py +0 -0
  22. {sentry_devenv-1.20.0 → sentry_devenv-1.22.0}/devenv/fetch.py +0 -0
  23. {sentry_devenv-1.20.0 → sentry_devenv-1.22.0}/devenv/lib/__init__.py +0 -0
  24. {sentry_devenv-1.20.0 → sentry_devenv-1.22.0}/devenv/lib/archive.py +0 -0
  25. {sentry_devenv-1.20.0 → sentry_devenv-1.22.0}/devenv/lib/brew.py +0 -0
  26. {sentry_devenv-1.20.0 → sentry_devenv-1.22.0}/devenv/lib/config.py +0 -0
  27. {sentry_devenv-1.20.0 → sentry_devenv-1.22.0}/devenv/lib/context.py +0 -0
  28. {sentry_devenv-1.20.0 → sentry_devenv-1.22.0}/devenv/lib/direnv.py +0 -0
  29. {sentry_devenv-1.20.0 → sentry_devenv-1.22.0}/devenv/lib/docker.py +0 -0
  30. {sentry_devenv-1.20.0 → sentry_devenv-1.22.0}/devenv/lib/fs.py +0 -0
  31. {sentry_devenv-1.20.0 → sentry_devenv-1.22.0}/devenv/lib/gcloud.py +0 -0
  32. {sentry_devenv-1.20.0 → sentry_devenv-1.22.0}/devenv/lib/github.py +0 -0
  33. {sentry_devenv-1.20.0 → sentry_devenv-1.22.0}/devenv/lib/limactl.py +0 -0
  34. {sentry_devenv-1.20.0 → sentry_devenv-1.22.0}/devenv/lib/modules.py +0 -0
  35. {sentry_devenv-1.20.0 → sentry_devenv-1.22.0}/devenv/lib/node.py +0 -0
  36. {sentry_devenv-1.20.0 → sentry_devenv-1.22.0}/devenv/lib/proc.py +0 -0
  37. {sentry_devenv-1.20.0 → sentry_devenv-1.22.0}/devenv/lib/repository.py +0 -0
  38. {sentry_devenv-1.20.0 → sentry_devenv-1.22.0}/devenv/lib/rosetta.py +0 -0
  39. {sentry_devenv-1.20.0 → sentry_devenv-1.22.0}/devenv/lib/tenv.py +0 -0
  40. {sentry_devenv-1.20.0 → sentry_devenv-1.22.0}/devenv/lib/venv.py +0 -0
  41. {sentry_devenv-1.20.0 → sentry_devenv-1.22.0}/devenv/lib_check/__init__.py +0 -0
  42. {sentry_devenv-1.20.0 → sentry_devenv-1.22.0}/devenv/lib_check/brew.py +0 -0
  43. {sentry_devenv-1.20.0 → sentry_devenv-1.22.0}/devenv/lib_check/types.py +0 -0
  44. {sentry_devenv-1.20.0 → sentry_devenv-1.22.0}/devenv/pin_gha.py +0 -0
  45. {sentry_devenv-1.20.0 → sentry_devenv-1.22.0}/devenv/py.typed +0 -0
  46. {sentry_devenv-1.20.0 → sentry_devenv-1.22.0}/devenv/pythons.py +0 -0
  47. {sentry_devenv-1.20.0 → sentry_devenv-1.22.0}/devenv/sync.py +0 -0
  48. {sentry_devenv-1.20.0 → sentry_devenv-1.22.0}/devenv/update.py +0 -0
  49. {sentry_devenv-1.20.0 → sentry_devenv-1.22.0}/sentry_devenv.egg-info/dependency_links.txt +0 -0
  50. {sentry_devenv-1.20.0 → sentry_devenv-1.22.0}/sentry_devenv.egg-info/entry_points.txt +0 -0
  51. {sentry_devenv-1.20.0 → sentry_devenv-1.22.0}/sentry_devenv.egg-info/requires.txt +0 -0
  52. {sentry_devenv-1.20.0 → sentry_devenv-1.22.0}/sentry_devenv.egg-info/top_level.txt +0 -0
  53. {sentry_devenv-1.20.0 → sentry_devenv-1.22.0}/setup.cfg +0 -0
  54. {sentry_devenv-1.20.0 → sentry_devenv-1.22.0}/tests/__init__.py +0 -0
  55. {sentry_devenv-1.20.0 → sentry_devenv-1.22.0}/tests/checks/__init__.py +0 -0
  56. {sentry_devenv-1.20.0 → sentry_devenv-1.22.0}/tests/checks/test_dockerConfig.py +0 -0
  57. {sentry_devenv-1.20.0 → sentry_devenv-1.22.0}/tests/conftest.py +0 -0
  58. {sentry_devenv-1.20.0 → sentry_devenv-1.22.0}/tests/doctor/__init__.py +0 -0
  59. {sentry_devenv-1.20.0 → sentry_devenv-1.22.0}/tests/doctor/devenv/checks/bad_check.py +0 -0
  60. {sentry_devenv-1.20.0 → sentry_devenv-1.22.0}/tests/doctor/devenv/checks/bad_fix.py +0 -0
  61. {sentry_devenv-1.20.0 → sentry_devenv-1.22.0}/tests/doctor/devenv/checks/broken_check.py +0 -0
  62. {sentry_devenv-1.20.0 → sentry_devenv-1.22.0}/tests/doctor/devenv/checks/broken_fix.py +0 -0
  63. {sentry_devenv-1.20.0 → sentry_devenv-1.22.0}/tests/doctor/devenv/checks/failing_check.py +0 -0
  64. {sentry_devenv-1.20.0 → sentry_devenv-1.22.0}/tests/doctor/devenv/checks/failing_check_with_msg.py +0 -0
  65. {sentry_devenv-1.20.0 → sentry_devenv-1.22.0}/tests/doctor/devenv/checks/no_check.py +0 -0
  66. {sentry_devenv-1.20.0 → sentry_devenv-1.22.0}/tests/doctor/devenv/checks/no_name.py +0 -0
  67. {sentry_devenv-1.20.0 → sentry_devenv-1.22.0}/tests/doctor/devenv/checks/no_tags.py +0 -0
  68. {sentry_devenv-1.20.0 → sentry_devenv-1.22.0}/tests/doctor/devenv/checks/passing_check.py +0 -0
  69. {sentry_devenv-1.20.0 → sentry_devenv-1.22.0}/tests/doctor/test_attempt_fix.py +0 -0
  70. {sentry_devenv-1.20.0 → sentry_devenv-1.22.0}/tests/doctor/test_filter_failing_checks.py +0 -0
  71. {sentry_devenv-1.20.0 → sentry_devenv-1.22.0}/tests/doctor/test_load_checks.py +0 -0
  72. {sentry_devenv-1.20.0 → sentry_devenv-1.22.0}/tests/doctor/test_prompt_for_fix.py +0 -0
  73. {sentry_devenv-1.20.0 → sentry_devenv-1.22.0}/tests/doctor/test_run_checks.py +0 -0
  74. {sentry_devenv-1.20.0 → sentry_devenv-1.22.0}/tests/lib/test_archive.py +0 -0
  75. {sentry_devenv-1.20.0 → sentry_devenv-1.22.0}/tests/lib/test_brew.py +0 -0
  76. {sentry_devenv-1.20.0 → sentry_devenv-1.22.0}/tests/lib/test_direnv.py +0 -0
  77. {sentry_devenv-1.20.0 → sentry_devenv-1.22.0}/tests/lib/test_fs.py +0 -0
  78. {sentry_devenv-1.20.0 → sentry_devenv-1.22.0}/tests/lib/test_github.py +0 -0
  79. {sentry_devenv-1.20.0 → sentry_devenv-1.22.0}/tests/lib/test_proc.py +0 -0
  80. {sentry_devenv-1.20.0 → sentry_devenv-1.22.0}/tests/lib/test_repository.py +0 -0
  81. {sentry_devenv-1.20.0 → sentry_devenv-1.22.0}/tests/test_main.py +0 -0
  82. {sentry_devenv-1.20.0 → sentry_devenv-1.22.0}/tests/test_pythons.py +0 -0
  83. {sentry_devenv-1.20.0 → sentry_devenv-1.22.0}/tests/test_sync.py +0 -0
  84. {sentry_devenv-1.20.0 → sentry_devenv-1.22.0}/tests/utils.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: sentry_devenv
3
- Version: 1.20.0
3
+ Version: 1.22.0
4
4
  Summary: Utilities for setting up a Sentry development environment
5
5
  Author-email: Joshua Li <joshua.li@sentry.io>, Ian Woodard <ian.woodard@sentry.io>, Buck Evan <buck.evan@sentry.io>
6
6
  Classifier: Programming Language :: Python :: 3
@@ -47,7 +47,6 @@ To update this installation, run `devenv update`.
47
47
 
48
48
  This is intended for initial setup of a new machine.
49
49
 
50
-
51
50
  `devenv fetch [repository name]`
52
51
 
53
52
  Any repository on github in the form of `[org]/[reponame]`
@@ -71,7 +70,6 @@ In general, our library is designed to isolate, as much as possible, a repo's de
71
70
  For example, [gcloud](#gcloud) is installed to `[reporoot]/.devenv/bin/gcloud` (with the gcloud sdk at `[reporoot]/.devenv/bin/google-cloud-sdk`).
72
71
  An exception to this would be python virtualenvs, which was implemented before the idea of `[reporoot]/.devenv`.
73
72
 
74
-
75
73
  `devenv doctor`
76
74
 
77
75
  Use this to diagnose and fix common issues.
@@ -79,14 +77,25 @@ Use this to diagnose and fix common issues.
79
77
  Repo-specific checks and fixes can be defined in `[reporoot]/devenv/checks`.
80
78
  Otherwise we have "builtin" checks and fixes in `devenv.checks`.
81
79
 
80
+ `devenv update`
81
+
82
+ This updates the global devenv installation, and global tools.
83
+
84
+ If you're upgrading from a particularly old devenv, it won't have `update` so you need to:
85
+ `~/.local/share/sentry-devenv/venv/bin/pip install -U sentry-devenv`
86
+
82
87
 
83
88
  ## technical overview
84
89
 
85
90
  Everything devenv needs is in `~/.local/share/sentry-devenv`.
86
91
 
87
- - `~/.local/share/sentry-devenv/bin` contains `devenv` and `direnv`
88
- - we currently rely on a minimal [`[reporoot]/.envrc`](#direnv) to add `[reporoot]/.devenv/bin` to PATH
89
- - see [examples](#examples) for .envrc suggestions
92
+ - `~/.local/share/sentry-devenv/bin` contains:
93
+ - `devenv` itself
94
+ - `direnv`
95
+ - we currently rely on direnv and a minimal [`[reporoot]/.envrc`](#direnv) to add `[reporoot]/.devenv/bin` to PATH
96
+ - see [examples](#examples) for .envrc suggestions
97
+ - global tools: `docker` (cli), `colima`
98
+
90
99
 
91
100
  ### runtime
92
101
 
@@ -157,6 +166,59 @@ export VIRTUAL_ENV="${PWD}/.venv"
157
166
  PATH_add "${PWD}/.venv/bin"
158
167
  ```
159
168
 
169
+ if using uv:
170
+
171
+ `[reporoot]/devenv/sync.py`
172
+ ```py
173
+ from devenv.lib import uv
174
+
175
+ def main(context: dict[str, str]) -> int:
176
+ reporoot = context["reporoot"]
177
+ cfg = config.get_repo(reporoot)
178
+
179
+ uv.install(
180
+ cfg["uv"]["version"],
181
+ cfg["uv"][constants.SYSTEM_MACHINE],
182
+ cfg["uv"][f"{constants.SYSTEM_MACHINE}_sha256"],
183
+ reporoot,
184
+ )
185
+
186
+ # reporoot/.venv is the default venv location
187
+ print(f"syncing .venv ...")
188
+ proc.run(("uv", "sync", "--frozen", "--quiet"))
189
+
190
+ return 0
191
+ ```
192
+
193
+ `[reporoot]/devenv/config.ini`
194
+ ```ini
195
+ [uv]
196
+ darwin_arm64 = https://github.com/astral-sh/uv/releases/download/0.7.21/uv-aarch64-apple-darwin.tar.gz
197
+ darwin_arm64_sha256 = c73af7a4e0bcea9b5b593a0c7e5c025ee78d8be3f7cd60bfeadc8614a16c92ef
198
+ darwin_x86_64 = https://github.com/astral-sh/uv/releases/download/0.7.21/uv-x86_64-apple-darwin.tar.gz
199
+ darwin_x86_64_sha256 = f8a9b4f4a80a44653344d36b53e148134176e8f7cc99f8e823676a57c884595e
200
+ linux_arm64 = https://github.com/astral-sh/uv/releases/download/0.7.21/uv-aarch64-unknown-linux-gnu.tar.gz
201
+ linux_arm64_sha256 = 1dae18211605b9d00767d913da5108aea50200a88372bf8a2e1f56abdbe509f0
202
+ linux_x86_64 = https://github.com/astral-sh/uv/releases/download/0.7.21/uv-x86_64-unknown-linux-gnu.tar.gz
203
+ linux_x86_64_sha256 = ca3e8898adfce5fcc891d393a079013fa4bd0d9636cef11aded8a7485bcba312
204
+ # used for autoupdate
205
+ version = 0.7.21
206
+ ```
207
+
208
+ `[reporoot]/.python-version`
209
+ ```
210
+ 3.13.3
211
+ ```
212
+
213
+ `[reporoot]/pyproject.toml`
214
+ ```
215
+ [project]
216
+ name = "foo"
217
+ version = "0.0.0"
218
+ ```
219
+
220
+ or classic pip:
221
+
160
222
  `[reporoot]/devenv/sync.py`
161
223
  ```py
162
224
  from devenv.lib import config, venv
@@ -185,13 +247,13 @@ editable =
185
247
  .
186
248
 
187
249
  [python3.12.3]
188
- darwin_x86_64 = https://github.com/indygreg/python-build-standalone/releases/download/20240415/cpython-3.12.3+20240415-x86_64-apple-darwin-install_only.tar.gz
250
+ darwin_x86_64 = https://github.com/astral-sh/python-build-standalone/releases/download/20240415/cpython-3.12.3+20240415-x86_64-apple-darwin-install_only.tar.gz
189
251
  darwin_x86_64_sha256 = c37a22fca8f57d4471e3708de6d13097668c5f160067f264bb2b18f524c890c8
190
- darwin_arm64 = https://github.com/indygreg/python-build-standalone/releases/download/20240415/cpython-3.12.3+20240415-aarch64-apple-darwin-install_only.tar.gz
252
+ darwin_arm64 = https://github.com/astral-sh/python-build-standalone/releases/download/20240415/cpython-3.12.3+20240415-aarch64-apple-darwin-install_only.tar.gz
191
253
  darwin_arm64_sha256 = ccc40e5af329ef2af81350db2a88bbd6c17b56676e82d62048c15d548401519e
192
- linux_x86_64 = https://github.com/indygreg/python-build-standalone/releases/download/20240415/cpython-3.12.3+20240415-x86_64-unknown-linux-gnu-install_only.tar.gz
254
+ linux_x86_64 = https://github.com/astral-sh/python-build-standalone/releases/download/20240415/cpython-3.12.3+20240415-x86_64-unknown-linux-gnu-install_only.tar.gz
193
255
  linux_x86_64_sha256 = a73ba777b5d55ca89edef709e6b8521e3f3d4289581f174c8699adfb608d09d6
194
- linux_arm64 = https://github.com/indygreg/python-build-standalone/releases/download/20240415/cpython-3.12.3+20240415-aarch64-unknown-linux-gnu-install_only.tar.gz
256
+ linux_arm64 = https://github.com/astral-sh/python-build-standalone/releases/download/20240415/cpython-3.12.3+20240415-aarch64-unknown-linux-gnu-install_only.tar.gz
195
257
  linux_arm64_sha256 = ec8126de97945e629cca9aedc80a29c4ae2992c9d69f2655e27ae73906ba187d
196
258
  ```
197
259
 
@@ -238,13 +300,13 @@ python = 3.12.3
238
300
  requirements = inhouse-tool/requirements-dev.txt
239
301
 
240
302
  [python3.12.3]
241
- darwin_x86_64 = https://github.com/indygreg/python-build-standalone/releases/download/20240415/cpython-3.12.3+20240415-x86_64-apple-darwin-install_only.tar.gz
303
+ darwin_x86_64 = https://github.com/astral-sh/python-build-standalone/releases/download/20240415/cpython-3.12.3+20240415-x86_64-apple-darwin-install_only.tar.gz
242
304
  darwin_x86_64_sha256 = c37a22fca8f57d4471e3708de6d13097668c5f160067f264bb2b18f524c890c8
243
- darwin_arm64 = https://github.com/indygreg/python-build-standalone/releases/download/20240415/cpython-3.12.3+20240415-aarch64-apple-darwin-install_only.tar.gz
305
+ darwin_arm64 = https://github.com/astral-sh/python-build-standalone/releases/download/20240415/cpython-3.12.3+20240415-aarch64-apple-darwin-install_only.tar.gz
244
306
  darwin_arm64_sha256 = ccc40e5af329ef2af81350db2a88bbd6c17b56676e82d62048c15d548401519e
245
- linux_x86_64 = https://github.com/indygreg/python-build-standalone/releases/download/20240415/cpython-3.12.3+20240415-x86_64-unknown-linux-gnu-install_only.tar.gz
307
+ linux_x86_64 = https://github.com/astral-sh/python-build-standalone/releases/download/20240415/cpython-3.12.3+20240415-x86_64-unknown-linux-gnu-install_only.tar.gz
246
308
  linux_x86_64_sha256 = a73ba777b5d55ca89edef709e6b8521e3f3d4289581f174c8699adfb608d09d6
247
- linux_arm64 = https://github.com/indygreg/python-build-standalone/releases/download/20240415/cpython-3.12.3+20240415-aarch64-unknown-linux-gnu-install_only.tar.gz
309
+ linux_arm64 = https://github.com/astral-sh/python-build-standalone/releases/download/20240415/cpython-3.12.3+20240415-aarch64-unknown-linux-gnu-install_only.tar.gz
248
310
  linux_arm64_sha256 = ec8126de97945e629cca9aedc80a29c4ae2992c9d69f2655e27ae73906ba187d
249
311
  ```
250
312
 
@@ -34,7 +34,6 @@ To update this installation, run `devenv update`.
34
34
 
35
35
  This is intended for initial setup of a new machine.
36
36
 
37
-
38
37
  `devenv fetch [repository name]`
39
38
 
40
39
  Any repository on github in the form of `[org]/[reponame]`
@@ -58,7 +57,6 @@ In general, our library is designed to isolate, as much as possible, a repo's de
58
57
  For example, [gcloud](#gcloud) is installed to `[reporoot]/.devenv/bin/gcloud` (with the gcloud sdk at `[reporoot]/.devenv/bin/google-cloud-sdk`).
59
58
  An exception to this would be python virtualenvs, which was implemented before the idea of `[reporoot]/.devenv`.
60
59
 
61
-
62
60
  `devenv doctor`
63
61
 
64
62
  Use this to diagnose and fix common issues.
@@ -66,14 +64,25 @@ Use this to diagnose and fix common issues.
66
64
  Repo-specific checks and fixes can be defined in `[reporoot]/devenv/checks`.
67
65
  Otherwise we have "builtin" checks and fixes in `devenv.checks`.
68
66
 
67
+ `devenv update`
68
+
69
+ This updates the global devenv installation, and global tools.
70
+
71
+ If you're upgrading from a particularly old devenv, it won't have `update` so you need to:
72
+ `~/.local/share/sentry-devenv/venv/bin/pip install -U sentry-devenv`
73
+
69
74
 
70
75
  ## technical overview
71
76
 
72
77
  Everything devenv needs is in `~/.local/share/sentry-devenv`.
73
78
 
74
- - `~/.local/share/sentry-devenv/bin` contains `devenv` and `direnv`
75
- - we currently rely on a minimal [`[reporoot]/.envrc`](#direnv) to add `[reporoot]/.devenv/bin` to PATH
76
- - see [examples](#examples) for .envrc suggestions
79
+ - `~/.local/share/sentry-devenv/bin` contains:
80
+ - `devenv` itself
81
+ - `direnv`
82
+ - we currently rely on direnv and a minimal [`[reporoot]/.envrc`](#direnv) to add `[reporoot]/.devenv/bin` to PATH
83
+ - see [examples](#examples) for .envrc suggestions
84
+ - global tools: `docker` (cli), `colima`
85
+
77
86
 
78
87
  ### runtime
79
88
 
@@ -144,6 +153,59 @@ export VIRTUAL_ENV="${PWD}/.venv"
144
153
  PATH_add "${PWD}/.venv/bin"
145
154
  ```
146
155
 
156
+ if using uv:
157
+
158
+ `[reporoot]/devenv/sync.py`
159
+ ```py
160
+ from devenv.lib import uv
161
+
162
+ def main(context: dict[str, str]) -> int:
163
+ reporoot = context["reporoot"]
164
+ cfg = config.get_repo(reporoot)
165
+
166
+ uv.install(
167
+ cfg["uv"]["version"],
168
+ cfg["uv"][constants.SYSTEM_MACHINE],
169
+ cfg["uv"][f"{constants.SYSTEM_MACHINE}_sha256"],
170
+ reporoot,
171
+ )
172
+
173
+ # reporoot/.venv is the default venv location
174
+ print(f"syncing .venv ...")
175
+ proc.run(("uv", "sync", "--frozen", "--quiet"))
176
+
177
+ return 0
178
+ ```
179
+
180
+ `[reporoot]/devenv/config.ini`
181
+ ```ini
182
+ [uv]
183
+ darwin_arm64 = https://github.com/astral-sh/uv/releases/download/0.7.21/uv-aarch64-apple-darwin.tar.gz
184
+ darwin_arm64_sha256 = c73af7a4e0bcea9b5b593a0c7e5c025ee78d8be3f7cd60bfeadc8614a16c92ef
185
+ darwin_x86_64 = https://github.com/astral-sh/uv/releases/download/0.7.21/uv-x86_64-apple-darwin.tar.gz
186
+ darwin_x86_64_sha256 = f8a9b4f4a80a44653344d36b53e148134176e8f7cc99f8e823676a57c884595e
187
+ linux_arm64 = https://github.com/astral-sh/uv/releases/download/0.7.21/uv-aarch64-unknown-linux-gnu.tar.gz
188
+ linux_arm64_sha256 = 1dae18211605b9d00767d913da5108aea50200a88372bf8a2e1f56abdbe509f0
189
+ linux_x86_64 = https://github.com/astral-sh/uv/releases/download/0.7.21/uv-x86_64-unknown-linux-gnu.tar.gz
190
+ linux_x86_64_sha256 = ca3e8898adfce5fcc891d393a079013fa4bd0d9636cef11aded8a7485bcba312
191
+ # used for autoupdate
192
+ version = 0.7.21
193
+ ```
194
+
195
+ `[reporoot]/.python-version`
196
+ ```
197
+ 3.13.3
198
+ ```
199
+
200
+ `[reporoot]/pyproject.toml`
201
+ ```
202
+ [project]
203
+ name = "foo"
204
+ version = "0.0.0"
205
+ ```
206
+
207
+ or classic pip:
208
+
147
209
  `[reporoot]/devenv/sync.py`
148
210
  ```py
149
211
  from devenv.lib import config, venv
@@ -172,13 +234,13 @@ editable =
172
234
  .
173
235
 
174
236
  [python3.12.3]
175
- darwin_x86_64 = https://github.com/indygreg/python-build-standalone/releases/download/20240415/cpython-3.12.3+20240415-x86_64-apple-darwin-install_only.tar.gz
237
+ darwin_x86_64 = https://github.com/astral-sh/python-build-standalone/releases/download/20240415/cpython-3.12.3+20240415-x86_64-apple-darwin-install_only.tar.gz
176
238
  darwin_x86_64_sha256 = c37a22fca8f57d4471e3708de6d13097668c5f160067f264bb2b18f524c890c8
177
- darwin_arm64 = https://github.com/indygreg/python-build-standalone/releases/download/20240415/cpython-3.12.3+20240415-aarch64-apple-darwin-install_only.tar.gz
239
+ darwin_arm64 = https://github.com/astral-sh/python-build-standalone/releases/download/20240415/cpython-3.12.3+20240415-aarch64-apple-darwin-install_only.tar.gz
178
240
  darwin_arm64_sha256 = ccc40e5af329ef2af81350db2a88bbd6c17b56676e82d62048c15d548401519e
179
- linux_x86_64 = https://github.com/indygreg/python-build-standalone/releases/download/20240415/cpython-3.12.3+20240415-x86_64-unknown-linux-gnu-install_only.tar.gz
241
+ linux_x86_64 = https://github.com/astral-sh/python-build-standalone/releases/download/20240415/cpython-3.12.3+20240415-x86_64-unknown-linux-gnu-install_only.tar.gz
180
242
  linux_x86_64_sha256 = a73ba777b5d55ca89edef709e6b8521e3f3d4289581f174c8699adfb608d09d6
181
- linux_arm64 = https://github.com/indygreg/python-build-standalone/releases/download/20240415/cpython-3.12.3+20240415-aarch64-unknown-linux-gnu-install_only.tar.gz
243
+ linux_arm64 = https://github.com/astral-sh/python-build-standalone/releases/download/20240415/cpython-3.12.3+20240415-aarch64-unknown-linux-gnu-install_only.tar.gz
182
244
  linux_arm64_sha256 = ec8126de97945e629cca9aedc80a29c4ae2992c9d69f2655e27ae73906ba187d
183
245
  ```
184
246
 
@@ -225,13 +287,13 @@ python = 3.12.3
225
287
  requirements = inhouse-tool/requirements-dev.txt
226
288
 
227
289
  [python3.12.3]
228
- darwin_x86_64 = https://github.com/indygreg/python-build-standalone/releases/download/20240415/cpython-3.12.3+20240415-x86_64-apple-darwin-install_only.tar.gz
290
+ darwin_x86_64 = https://github.com/astral-sh/python-build-standalone/releases/download/20240415/cpython-3.12.3+20240415-x86_64-apple-darwin-install_only.tar.gz
229
291
  darwin_x86_64_sha256 = c37a22fca8f57d4471e3708de6d13097668c5f160067f264bb2b18f524c890c8
230
- darwin_arm64 = https://github.com/indygreg/python-build-standalone/releases/download/20240415/cpython-3.12.3+20240415-aarch64-apple-darwin-install_only.tar.gz
292
+ darwin_arm64 = https://github.com/astral-sh/python-build-standalone/releases/download/20240415/cpython-3.12.3+20240415-aarch64-apple-darwin-install_only.tar.gz
231
293
  darwin_arm64_sha256 = ccc40e5af329ef2af81350db2a88bbd6c17b56676e82d62048c15d548401519e
232
- linux_x86_64 = https://github.com/indygreg/python-build-standalone/releases/download/20240415/cpython-3.12.3+20240415-x86_64-unknown-linux-gnu-install_only.tar.gz
294
+ linux_x86_64 = https://github.com/astral-sh/python-build-standalone/releases/download/20240415/cpython-3.12.3+20240415-x86_64-unknown-linux-gnu-install_only.tar.gz
233
295
  linux_x86_64_sha256 = a73ba777b5d55ca89edef709e6b8521e3f3d4289581f174c8699adfb608d09d6
234
- linux_arm64 = https://github.com/indygreg/python-build-standalone/releases/download/20240415/cpython-3.12.3+20240415-aarch64-unknown-linux-gnu-install_only.tar.gz
296
+ linux_arm64 = https://github.com/astral-sh/python-build-standalone/releases/download/20240415/cpython-3.12.3+20240415-aarch64-unknown-linux-gnu-install_only.tar.gz
235
297
  linux_arm64_sha256 = ec8126de97945e629cca9aedc80a29c4ae2992c9d69f2655e27ae73906ba187d
236
298
  ```
237
299
 
@@ -174,6 +174,9 @@ def start(restart: bool = False) -> ColimaStatus:
174
174
  if platform.machine() == "arm64":
175
175
  args = [*args, "--vm-type=vz", "--vz-rosetta", "--mount-type=virtiofs"]
176
176
 
177
+ # removing all docker contexts to ensure only colima context is created
178
+ shutil.rmtree(f"{home}/.docker/contexts", ignore_errors=True)
179
+
177
180
  proc.run(
178
181
  (
179
182
  # we share the "default" machine across repositories
@@ -0,0 +1,56 @@
1
+ from __future__ import annotations
2
+
3
+ import os
4
+ import shutil
5
+ import tempfile
6
+
7
+ from devenv.lib import archive
8
+ from devenv.lib import fs
9
+ from devenv.lib import proc
10
+
11
+
12
+ def _install(url: str, sha256: str, into: str) -> None:
13
+ with tempfile.TemporaryDirectory(dir=into) as tmpd:
14
+ archive_file = archive.download(url, sha256, dest=f"{tmpd}/download")
15
+ archive.unpack(archive_file, tmpd, perform_strip1=True)
16
+
17
+ # the archive was atomically placed into tmpd so
18
+ # these are on the same fs and can be atomically moved too
19
+ os.replace(f"{tmpd}/uv", f"{into}/uv")
20
+ os.replace(f"{tmpd}/uvx", f"{into}/uvx")
21
+
22
+
23
+ def uninstall(binroot: str) -> None:
24
+ for fp in (f"{binroot}/uv", f"{binroot}/uvx"):
25
+ try:
26
+ os.remove(fp)
27
+ except FileNotFoundError:
28
+ # it's better to do this than to guard with
29
+ # os.path.exists(fp) because if it's an invalid or circular
30
+ # symlink the result'll be False!
31
+ pass
32
+
33
+
34
+ def _version(binpath: str) -> str:
35
+ stdout = proc.run((binpath, "--version"), stdout=True)
36
+ # uv 0.7.21 (77c771c7f 2025-07-14)
37
+ return stdout.split()[1]
38
+
39
+
40
+ def install(version: str, url: str, sha256: str, reporoot: str) -> None:
41
+ binroot = fs.ensure_binroot(reporoot)
42
+ binpath = f"{binroot}/uv"
43
+
44
+ if shutil.which("uv", path=binroot) == binpath:
45
+ installed_version = _version(binpath)
46
+ if version == installed_version:
47
+ return
48
+ print(f"installed uv {installed_version} is unexpected!")
49
+
50
+ print(f"installing uv {version}...")
51
+ uninstall(binroot)
52
+ _install(url, sha256, binroot)
53
+
54
+ installed_version = _version(binpath)
55
+ if version != installed_version:
56
+ raise SystemExit("Failed to install uv {version}!")
@@ -103,7 +103,7 @@ def main() -> ExitCode:
103
103
  # https://sentry.sentry.io/settings/projects/sentry-dev-env/keys/
104
104
  dsn="https://9bdb053cb8274ea69231834d1edeec4c@o1.ingest.sentry.io/5723503",
105
105
  # enable performance monitoring
106
- enable_tracing=True,
106
+ traces_sample_rate=1.0,
107
107
  )
108
108
 
109
109
  return devenv(sys.argv, f"{home}/.config/sentry-devenv/config.ini")
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "sentry_devenv"
7
- version = "1.20.0"
7
+ version = "1.22.0"
8
8
  authors = [
9
9
  { name="Joshua Li", email="joshua.li@sentry.io" },
10
10
  { name="Ian Woodard", email="ian.woodard@sentry.io" },
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: sentry_devenv
3
- Version: 1.20.0
3
+ Version: 1.22.0
4
4
  Summary: Utilities for setting up a Sentry development environment
5
5
  Author-email: Joshua Li <joshua.li@sentry.io>, Ian Woodard <ian.woodard@sentry.io>, Buck Evan <buck.evan@sentry.io>
6
6
  Classifier: Programming Language :: Python :: 3
@@ -47,7 +47,6 @@ To update this installation, run `devenv update`.
47
47
 
48
48
  This is intended for initial setup of a new machine.
49
49
 
50
-
51
50
  `devenv fetch [repository name]`
52
51
 
53
52
  Any repository on github in the form of `[org]/[reponame]`
@@ -71,7 +70,6 @@ In general, our library is designed to isolate, as much as possible, a repo's de
71
70
  For example, [gcloud](#gcloud) is installed to `[reporoot]/.devenv/bin/gcloud` (with the gcloud sdk at `[reporoot]/.devenv/bin/google-cloud-sdk`).
72
71
  An exception to this would be python virtualenvs, which was implemented before the idea of `[reporoot]/.devenv`.
73
72
 
74
-
75
73
  `devenv doctor`
76
74
 
77
75
  Use this to diagnose and fix common issues.
@@ -79,14 +77,25 @@ Use this to diagnose and fix common issues.
79
77
  Repo-specific checks and fixes can be defined in `[reporoot]/devenv/checks`.
80
78
  Otherwise we have "builtin" checks and fixes in `devenv.checks`.
81
79
 
80
+ `devenv update`
81
+
82
+ This updates the global devenv installation, and global tools.
83
+
84
+ If you're upgrading from a particularly old devenv, it won't have `update` so you need to:
85
+ `~/.local/share/sentry-devenv/venv/bin/pip install -U sentry-devenv`
86
+
82
87
 
83
88
  ## technical overview
84
89
 
85
90
  Everything devenv needs is in `~/.local/share/sentry-devenv`.
86
91
 
87
- - `~/.local/share/sentry-devenv/bin` contains `devenv` and `direnv`
88
- - we currently rely on a minimal [`[reporoot]/.envrc`](#direnv) to add `[reporoot]/.devenv/bin` to PATH
89
- - see [examples](#examples) for .envrc suggestions
92
+ - `~/.local/share/sentry-devenv/bin` contains:
93
+ - `devenv` itself
94
+ - `direnv`
95
+ - we currently rely on direnv and a minimal [`[reporoot]/.envrc`](#direnv) to add `[reporoot]/.devenv/bin` to PATH
96
+ - see [examples](#examples) for .envrc suggestions
97
+ - global tools: `docker` (cli), `colima`
98
+
90
99
 
91
100
  ### runtime
92
101
 
@@ -157,6 +166,59 @@ export VIRTUAL_ENV="${PWD}/.venv"
157
166
  PATH_add "${PWD}/.venv/bin"
158
167
  ```
159
168
 
169
+ if using uv:
170
+
171
+ `[reporoot]/devenv/sync.py`
172
+ ```py
173
+ from devenv.lib import uv
174
+
175
+ def main(context: dict[str, str]) -> int:
176
+ reporoot = context["reporoot"]
177
+ cfg = config.get_repo(reporoot)
178
+
179
+ uv.install(
180
+ cfg["uv"]["version"],
181
+ cfg["uv"][constants.SYSTEM_MACHINE],
182
+ cfg["uv"][f"{constants.SYSTEM_MACHINE}_sha256"],
183
+ reporoot,
184
+ )
185
+
186
+ # reporoot/.venv is the default venv location
187
+ print(f"syncing .venv ...")
188
+ proc.run(("uv", "sync", "--frozen", "--quiet"))
189
+
190
+ return 0
191
+ ```
192
+
193
+ `[reporoot]/devenv/config.ini`
194
+ ```ini
195
+ [uv]
196
+ darwin_arm64 = https://github.com/astral-sh/uv/releases/download/0.7.21/uv-aarch64-apple-darwin.tar.gz
197
+ darwin_arm64_sha256 = c73af7a4e0bcea9b5b593a0c7e5c025ee78d8be3f7cd60bfeadc8614a16c92ef
198
+ darwin_x86_64 = https://github.com/astral-sh/uv/releases/download/0.7.21/uv-x86_64-apple-darwin.tar.gz
199
+ darwin_x86_64_sha256 = f8a9b4f4a80a44653344d36b53e148134176e8f7cc99f8e823676a57c884595e
200
+ linux_arm64 = https://github.com/astral-sh/uv/releases/download/0.7.21/uv-aarch64-unknown-linux-gnu.tar.gz
201
+ linux_arm64_sha256 = 1dae18211605b9d00767d913da5108aea50200a88372bf8a2e1f56abdbe509f0
202
+ linux_x86_64 = https://github.com/astral-sh/uv/releases/download/0.7.21/uv-x86_64-unknown-linux-gnu.tar.gz
203
+ linux_x86_64_sha256 = ca3e8898adfce5fcc891d393a079013fa4bd0d9636cef11aded8a7485bcba312
204
+ # used for autoupdate
205
+ version = 0.7.21
206
+ ```
207
+
208
+ `[reporoot]/.python-version`
209
+ ```
210
+ 3.13.3
211
+ ```
212
+
213
+ `[reporoot]/pyproject.toml`
214
+ ```
215
+ [project]
216
+ name = "foo"
217
+ version = "0.0.0"
218
+ ```
219
+
220
+ or classic pip:
221
+
160
222
  `[reporoot]/devenv/sync.py`
161
223
  ```py
162
224
  from devenv.lib import config, venv
@@ -185,13 +247,13 @@ editable =
185
247
  .
186
248
 
187
249
  [python3.12.3]
188
- darwin_x86_64 = https://github.com/indygreg/python-build-standalone/releases/download/20240415/cpython-3.12.3+20240415-x86_64-apple-darwin-install_only.tar.gz
250
+ darwin_x86_64 = https://github.com/astral-sh/python-build-standalone/releases/download/20240415/cpython-3.12.3+20240415-x86_64-apple-darwin-install_only.tar.gz
189
251
  darwin_x86_64_sha256 = c37a22fca8f57d4471e3708de6d13097668c5f160067f264bb2b18f524c890c8
190
- darwin_arm64 = https://github.com/indygreg/python-build-standalone/releases/download/20240415/cpython-3.12.3+20240415-aarch64-apple-darwin-install_only.tar.gz
252
+ darwin_arm64 = https://github.com/astral-sh/python-build-standalone/releases/download/20240415/cpython-3.12.3+20240415-aarch64-apple-darwin-install_only.tar.gz
191
253
  darwin_arm64_sha256 = ccc40e5af329ef2af81350db2a88bbd6c17b56676e82d62048c15d548401519e
192
- linux_x86_64 = https://github.com/indygreg/python-build-standalone/releases/download/20240415/cpython-3.12.3+20240415-x86_64-unknown-linux-gnu-install_only.tar.gz
254
+ linux_x86_64 = https://github.com/astral-sh/python-build-standalone/releases/download/20240415/cpython-3.12.3+20240415-x86_64-unknown-linux-gnu-install_only.tar.gz
193
255
  linux_x86_64_sha256 = a73ba777b5d55ca89edef709e6b8521e3f3d4289581f174c8699adfb608d09d6
194
- linux_arm64 = https://github.com/indygreg/python-build-standalone/releases/download/20240415/cpython-3.12.3+20240415-aarch64-unknown-linux-gnu-install_only.tar.gz
256
+ linux_arm64 = https://github.com/astral-sh/python-build-standalone/releases/download/20240415/cpython-3.12.3+20240415-aarch64-unknown-linux-gnu-install_only.tar.gz
195
257
  linux_arm64_sha256 = ec8126de97945e629cca9aedc80a29c4ae2992c9d69f2655e27ae73906ba187d
196
258
  ```
197
259
 
@@ -238,13 +300,13 @@ python = 3.12.3
238
300
  requirements = inhouse-tool/requirements-dev.txt
239
301
 
240
302
  [python3.12.3]
241
- darwin_x86_64 = https://github.com/indygreg/python-build-standalone/releases/download/20240415/cpython-3.12.3+20240415-x86_64-apple-darwin-install_only.tar.gz
303
+ darwin_x86_64 = https://github.com/astral-sh/python-build-standalone/releases/download/20240415/cpython-3.12.3+20240415-x86_64-apple-darwin-install_only.tar.gz
242
304
  darwin_x86_64_sha256 = c37a22fca8f57d4471e3708de6d13097668c5f160067f264bb2b18f524c890c8
243
- darwin_arm64 = https://github.com/indygreg/python-build-standalone/releases/download/20240415/cpython-3.12.3+20240415-aarch64-apple-darwin-install_only.tar.gz
305
+ darwin_arm64 = https://github.com/astral-sh/python-build-standalone/releases/download/20240415/cpython-3.12.3+20240415-aarch64-apple-darwin-install_only.tar.gz
244
306
  darwin_arm64_sha256 = ccc40e5af329ef2af81350db2a88bbd6c17b56676e82d62048c15d548401519e
245
- linux_x86_64 = https://github.com/indygreg/python-build-standalone/releases/download/20240415/cpython-3.12.3+20240415-x86_64-unknown-linux-gnu-install_only.tar.gz
307
+ linux_x86_64 = https://github.com/astral-sh/python-build-standalone/releases/download/20240415/cpython-3.12.3+20240415-x86_64-unknown-linux-gnu-install_only.tar.gz
246
308
  linux_x86_64_sha256 = a73ba777b5d55ca89edef709e6b8521e3f3d4289581f174c8699adfb608d09d6
247
- linux_arm64 = https://github.com/indygreg/python-build-standalone/releases/download/20240415/cpython-3.12.3+20240415-aarch64-unknown-linux-gnu-install_only.tar.gz
309
+ linux_arm64 = https://github.com/astral-sh/python-build-standalone/releases/download/20240415/cpython-3.12.3+20240415-aarch64-unknown-linux-gnu-install_only.tar.gz
248
310
  linux_arm64_sha256 = ec8126de97945e629cca9aedc80a29c4ae2992c9d69f2655e27ae73906ba187d
249
311
  ```
250
312
 
@@ -38,6 +38,7 @@ devenv/lib/proc.py
38
38
  devenv/lib/repository.py
39
39
  devenv/lib/rosetta.py
40
40
  devenv/lib/tenv.py
41
+ devenv/lib/uv.py
41
42
  devenv/lib/venv.py
42
43
  devenv/lib_check/__init__.py
43
44
  devenv/lib_check/brew.py
@@ -23,13 +23,13 @@ bins =
23
23
  sentry-kube-pop
24
24
 
25
25
  [python3.11.6]
26
- darwin_x86_64 = https://github.com/indygreg/python-build-standalone/releases/download/20231002/cpython-3.11.6+20231002-x86_64-apple-darwin-install_only.tar.gz
26
+ darwin_x86_64 = https://github.com/astral-sh/python-build-standalone/releases/download/20231002/cpython-3.11.6+20231002-x86_64-apple-darwin-install_only.tar.gz
27
27
  darwin_x86_64_sha256 = 178cb1716c2abc25cb56ae915096c1a083e60abeba57af001996e8bc6ce1a371
28
- darwin_arm64 = https://github.com/indygreg/python-build-standalone/releases/download/20231002/cpython-3.11.6+20231002-aarch64-apple-darwin-install_only.tar.gz
28
+ darwin_arm64 = https://github.com/astral-sh/python-build-standalone/releases/download/20231002/cpython-3.11.6+20231002-aarch64-apple-darwin-install_only.tar.gz
29
29
  darwin_arm64_sha256 = 916c35125b5d8323a21526d7a9154ca626453f63d0878e95b9f613a95006c990
30
- linux_x86_64 = https://github.com/indygreg/python-build-standalone/releases/download/20231002/cpython-3.11.6+20231002-x86_64-unknown-linux-gnu-install_only.tar.gz
30
+ linux_x86_64 = https://github.com/astral-sh/python-build-standalone/releases/download/20231002/cpython-3.11.6+20231002-x86_64-unknown-linux-gnu-install_only.tar.gz
31
31
  linux_x86_64_sha256 = ee37a7eae6e80148c7e3abc56e48a397c1664f044920463ad0df0fc706eacea8
32
- linux_arm64 = https://github.com/indygreg/python-build-standalone/releases/download/20231002/cpython-3.11.6+20231002-aarch64-unknown-linux-gnu-install_only.tar.gz
32
+ linux_arm64 = https://github.com/astral-sh/python-build-standalone/releases/download/20231002/cpython-3.11.6+20231002-aarch64-unknown-linux-gnu-install_only.tar.gz
33
33
  linux_arm64_sha256 = 3e26a672df17708c4dc928475a5974c3fb3a34a9b45c65fb4bd1e50504cc84ec
34
34
  """
35
35
 
File without changes