sentry-devenv 1.21.0__py3-none-any.whl → 1.22.0__py3-none-any.whl
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.
- devenv/lib/colima.py +3 -0
- devenv/lib/uv.py +56 -0
- {sentry_devenv-1.21.0.dist-info → sentry_devenv-1.22.0.dist-info}/METADATA +62 -9
- {sentry_devenv-1.21.0.dist-info → sentry_devenv-1.22.0.dist-info}/RECORD +8 -7
- {sentry_devenv-1.21.0.dist-info → sentry_devenv-1.22.0.dist-info}/WHEEL +1 -1
- tests/lib/test_venv.py +4 -4
- {sentry_devenv-1.21.0.dist-info → sentry_devenv-1.22.0.dist-info}/entry_points.txt +0 -0
- {sentry_devenv-1.21.0.dist-info → sentry_devenv-1.22.0.dist-info}/top_level.txt +0 -0
devenv/lib/colima.py
CHANGED
|
@@ -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
|
devenv/lib/uv.py
ADDED
|
@@ -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}!")
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: sentry_devenv
|
|
3
|
-
Version: 1.
|
|
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
|
|
@@ -166,6 +166,59 @@ export VIRTUAL_ENV="${PWD}/.venv"
|
|
|
166
166
|
PATH_add "${PWD}/.venv/bin"
|
|
167
167
|
```
|
|
168
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
|
+
|
|
169
222
|
`[reporoot]/devenv/sync.py`
|
|
170
223
|
```py
|
|
171
224
|
from devenv.lib import config, venv
|
|
@@ -194,13 +247,13 @@ editable =
|
|
|
194
247
|
.
|
|
195
248
|
|
|
196
249
|
[python3.12.3]
|
|
197
|
-
darwin_x86_64 = https://github.com/
|
|
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
|
|
198
251
|
darwin_x86_64_sha256 = c37a22fca8f57d4471e3708de6d13097668c5f160067f264bb2b18f524c890c8
|
|
199
|
-
darwin_arm64 = https://github.com/
|
|
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
|
|
200
253
|
darwin_arm64_sha256 = ccc40e5af329ef2af81350db2a88bbd6c17b56676e82d62048c15d548401519e
|
|
201
|
-
linux_x86_64 = https://github.com/
|
|
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
|
|
202
255
|
linux_x86_64_sha256 = a73ba777b5d55ca89edef709e6b8521e3f3d4289581f174c8699adfb608d09d6
|
|
203
|
-
linux_arm64 = https://github.com/
|
|
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
|
|
204
257
|
linux_arm64_sha256 = ec8126de97945e629cca9aedc80a29c4ae2992c9d69f2655e27ae73906ba187d
|
|
205
258
|
```
|
|
206
259
|
|
|
@@ -247,13 +300,13 @@ python = 3.12.3
|
|
|
247
300
|
requirements = inhouse-tool/requirements-dev.txt
|
|
248
301
|
|
|
249
302
|
[python3.12.3]
|
|
250
|
-
darwin_x86_64 = https://github.com/
|
|
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
|
|
251
304
|
darwin_x86_64_sha256 = c37a22fca8f57d4471e3708de6d13097668c5f160067f264bb2b18f524c890c8
|
|
252
|
-
darwin_arm64 = https://github.com/
|
|
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
|
|
253
306
|
darwin_arm64_sha256 = ccc40e5af329ef2af81350db2a88bbd6c17b56676e82d62048c15d548401519e
|
|
254
|
-
linux_x86_64 = https://github.com/
|
|
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
|
|
255
308
|
linux_x86_64_sha256 = a73ba777b5d55ca89edef709e6b8521e3f3d4289581f174c8699adfb608d09d6
|
|
256
|
-
linux_arm64 = https://github.com/
|
|
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
|
|
257
310
|
linux_arm64_sha256 = ec8126de97945e629cca9aedc80a29c4ae2992c9d69f2655e27ae73906ba187d
|
|
258
311
|
```
|
|
259
312
|
|
|
@@ -20,7 +20,7 @@ devenv/checks/test.py,sha256=AvxoA2W5qTO2ZpoXmjScLiJxXD3Y_limYp5yTjGSZ9U,701
|
|
|
20
20
|
devenv/lib/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
21
21
|
devenv/lib/archive.py,sha256=75MjlDuwHVaazbNUr8vJmqTyl4Jz6KRd_fUcpwvPwec,4710
|
|
22
22
|
devenv/lib/brew.py,sha256=_7recvYh-LnUJC0eKnYK7F8AzGRL5bi_Khv0f_mgrlM,1795
|
|
23
|
-
devenv/lib/colima.py,sha256=
|
|
23
|
+
devenv/lib/colima.py,sha256=eyGtE5EmkKESwe1dENh5vp8LuuRTJNzP5ikkLv6wk3w,7526
|
|
24
24
|
devenv/lib/config.py,sha256=5eXYwM44AJ3w2VfVbCDqchYOL1zAjazNcirtM6kxxGw,3344
|
|
25
25
|
devenv/lib/context.py,sha256=4EDImK9pvTp3FqeNigevC9lbJsgdDO9D1t2_Y4NyPlc,207
|
|
26
26
|
devenv/lib/direnv.py,sha256=HDRUaIR0PMAQYiiTaw3gEQuh6Tdb7BUJmV7dBZdPztM,1325
|
|
@@ -35,6 +35,7 @@ devenv/lib/proc.py,sha256=eU7DHIk_66wgkHRmdtKbBKZTa6q4tl9QJbrlnQOQCls,2743
|
|
|
35
35
|
devenv/lib/repository.py,sha256=cDCgcZ6lw0bcWC6DrcDp3tz_MWObmgAyFq39TeU7YHY,1966
|
|
36
36
|
devenv/lib/rosetta.py,sha256=Lm-tDFut86o6l-Y55d5kTacRHTwrv5MFEymQpy7Qihc,1170
|
|
37
37
|
devenv/lib/tenv.py,sha256=EulO1xYh8wu6-QoDvQd3TVbaLvmztXqCV6ya5sBWZiw,3030
|
|
38
|
+
devenv/lib/uv.py,sha256=Kkc9CaMCZzm6cskFey7yZgDjzm-8jLqF-bgr7SpcyhM,1769
|
|
38
39
|
devenv/lib/venv.py,sha256=1HWY1uFXLP1YCGVX7Ik5R3tNilRCKrVXOZN42-k_5eQ,3188
|
|
39
40
|
devenv/lib_check/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
40
41
|
devenv/lib_check/brew.py,sha256=tId1IgItju-fulbmTXmmI2Oo_-q332rd1tUN5RSkTrs,544
|
|
@@ -70,9 +71,9 @@ tests/lib/test_fs.py,sha256=qhX9CQTTSht1f6ZJfmpsSFICTwPs--h_mLlS_1jnZQg,1670
|
|
|
70
71
|
tests/lib/test_github.py,sha256=IMEG2cmRaK_PMJprFE_ZMqPnZ0StwWqgznhhT_zVk3U,4526
|
|
71
72
|
tests/lib/test_proc.py,sha256=XH6OnxKPSSm3HvDjYHApputMKwgOE8lYqDuK2vK0Z0U,2626
|
|
72
73
|
tests/lib/test_repository.py,sha256=gUi1lkY7bha5WwZ5xcnENOlFYboVV8TFW1lCESvS0VA,787
|
|
73
|
-
tests/lib/test_venv.py,sha256=
|
|
74
|
-
sentry_devenv-1.
|
|
75
|
-
sentry_devenv-1.
|
|
76
|
-
sentry_devenv-1.
|
|
77
|
-
sentry_devenv-1.
|
|
78
|
-
sentry_devenv-1.
|
|
74
|
+
tests/lib/test_venv.py,sha256=3XGpINFBkn6Yq4OycsF-Ki4xMWAINt2g69uOHtkDU6k,3266
|
|
75
|
+
sentry_devenv-1.22.0.dist-info/METADATA,sha256=j0ITXXvRbq05d2FHittffCUP_oWLzs23yJmHTT9fnec,15457
|
|
76
|
+
sentry_devenv-1.22.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
77
|
+
sentry_devenv-1.22.0.dist-info/entry_points.txt,sha256=StsIuNugcoEU8jsPy6H9ECjzoDzOVKXl1vUaYTIGbzM,44
|
|
78
|
+
sentry_devenv-1.22.0.dist-info/top_level.txt,sha256=dOQExvIA0fj_EQjCrMTS7CCHNH7WZFHxEU0M7LlNcKQ,16
|
|
79
|
+
sentry_devenv-1.22.0.dist-info/RECORD,,
|
tests/lib/test_venv.py
CHANGED
|
@@ -23,13 +23,13 @@ bins =
|
|
|
23
23
|
sentry-kube-pop
|
|
24
24
|
|
|
25
25
|
[python3.11.6]
|
|
26
|
-
darwin_x86_64 = https://github.com/
|
|
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/
|
|
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/
|
|
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/
|
|
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
|
|
File without changes
|