pystand 2.33__tar.gz → 2.34__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.
- {pystand-2.33/pystand.egg-info → pystand-2.34}/PKG-INFO +11 -11
- {pystand-2.33 → pystand-2.34}/README.md +9 -9
- {pystand-2.33 → pystand-2.34}/check-dist.py +1 -2
- {pystand-2.33 → pystand-2.34}/pyproject.toml +3 -8
- {pystand-2.33 → pystand-2.34/pystand.egg-info}/PKG-INFO +11 -11
- {pystand-2.33 → pystand-2.34}/pystand.egg-info/SOURCES.txt +2 -0
- {pystand-2.33 → pystand-2.34}/pystand.egg-info/requires.txt +1 -1
- pystand-2.34/pystand.egg-info/scm_file_list.json +10 -0
- pystand-2.34/pystand.egg-info/scm_version.json +8 -0
- {pystand-2.33 → pystand-2.34}/pystand.py +38 -52
- {pystand-2.33 → pystand-2.34}/.gitignore +0 -0
- {pystand-2.33 → pystand-2.34}/justfile +0 -0
- {pystand-2.33 → pystand-2.34}/pystand.egg-info/dependency_links.txt +0 -0
- {pystand-2.33 → pystand-2.34}/pystand.egg-info/entry_points.txt +0 -0
- {pystand-2.33 → pystand-2.34}/pystand.egg-info/top_level.txt +0 -0
- {pystand-2.33 → pystand-2.34}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pystand
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.34
|
|
4
4
|
Summary: Install Python versions from python-build-standalone project
|
|
5
5
|
Author-email: Mark Blakeney <mark.blakeney@bullet-systems.net>
|
|
6
6
|
License-Expression: GPL-3.0-or-later
|
|
@@ -15,7 +15,7 @@ Requires-Dist: argparse-from-file
|
|
|
15
15
|
Requires-Dist: pygithub
|
|
16
16
|
Requires-Dist: certifi
|
|
17
17
|
Requires-Dist: filelock
|
|
18
|
-
Requires-Dist:
|
|
18
|
+
Requires-Dist: backports.zstd; python_version < "3.14"
|
|
19
19
|
|
|
20
20
|
## PYSTAND - Install Python Versions From The Python-Build-Standalone Project
|
|
21
21
|
[](https://pypi.org/project/pystand/)
|
|
@@ -172,7 +172,7 @@ options:
|
|
|
172
172
|
--purge-days PURGE_DAYS
|
|
173
173
|
cache YYYYMMDD release file lists and downloads for
|
|
174
174
|
this number of days after last version referencing
|
|
175
|
-
that release is removed. Default is
|
|
175
|
+
that release is removed. Default is 30 days.
|
|
176
176
|
--github-access-token GITHUB_ACCESS_TOKEN
|
|
177
177
|
optional Github access token. Can specify to reduce
|
|
178
178
|
rate limiting.
|
|
@@ -215,13 +215,13 @@ usage: pystand install [-h] [-r RELEASE] [-a] [-A] [--skip] [-f] [-s]
|
|
|
215
215
|
Install one, more, or all versions from a python-build-standalone release.
|
|
216
216
|
|
|
217
217
|
positional arguments:
|
|
218
|
-
version version to install. E.g. 3.
|
|
218
|
+
version version to install. E.g. 3.14 or 3.14.1
|
|
219
219
|
|
|
220
220
|
options:
|
|
221
221
|
-h, --help show this help message and exit
|
|
222
222
|
-r, --release RELEASE
|
|
223
223
|
install from specified python-build-standalone
|
|
224
|
-
YYYYMMDD release (e.g.
|
|
224
|
+
YYYYMMDD release (e.g. 20260807), default is latest
|
|
225
225
|
release
|
|
226
226
|
-a, --all install ALL versions from release
|
|
227
227
|
-A, --all-prerelease install ALL versions from release, including pre-
|
|
@@ -249,7 +249,7 @@ positional arguments:
|
|
|
249
249
|
options:
|
|
250
250
|
-h, --help show this help message and exit
|
|
251
251
|
-r, --release RELEASE
|
|
252
|
-
update to specified YYYMMDD release (e.g.
|
|
252
|
+
update to specified YYYMMDD release (e.g. 20260807),
|
|
253
253
|
default is latest release
|
|
254
254
|
-a, --all update ALL versions
|
|
255
255
|
--pre-release update release version to a later superceding pre-
|
|
@@ -279,7 +279,7 @@ options:
|
|
|
279
279
|
can be specified with --all)
|
|
280
280
|
-r, --release RELEASE
|
|
281
281
|
only remove versions if from specified YYYMMDD release
|
|
282
|
-
(e.g.
|
|
282
|
+
(e.g. 20260807)
|
|
283
283
|
|
|
284
284
|
aliases: r, rm
|
|
285
285
|
```
|
|
@@ -299,7 +299,7 @@ options:
|
|
|
299
299
|
-v, --verbose explicitly report why a version is not eligible for
|
|
300
300
|
update
|
|
301
301
|
-r, --release RELEASE
|
|
302
|
-
use specified YYYYMMDD release (e.g.
|
|
302
|
+
use specified YYYYMMDD release (e.g. 20260807) for
|
|
303
303
|
verbose compare, default is latest release
|
|
304
304
|
|
|
305
305
|
aliases: l
|
|
@@ -323,7 +323,7 @@ options:
|
|
|
323
323
|
-l, --list just list recent releases
|
|
324
324
|
-r, --release RELEASE
|
|
325
325
|
python-build-standalone YYYYMMDD release to show (e.g.
|
|
326
|
-
|
|
326
|
+
20260807), default is latest release
|
|
327
327
|
-a, --all show all available distributions for each version from
|
|
328
328
|
the release
|
|
329
329
|
|
|
@@ -390,7 +390,7 @@ positional arguments:
|
|
|
390
390
|
|
|
391
391
|
options:
|
|
392
392
|
-h, --help show this help message and exit
|
|
393
|
-
-p, --python PYTHON version of python to use, e.g. "3.
|
|
393
|
+
-p, --python PYTHON version of python to use, e.g. "3.14", default is
|
|
394
394
|
latest release version
|
|
395
395
|
```
|
|
396
396
|
|
|
@@ -408,7 +408,7 @@ positional arguments:
|
|
|
408
408
|
|
|
409
409
|
options:
|
|
410
410
|
-h, --help show this help message and exit
|
|
411
|
-
-p, --python PYTHON version of python to use, e.g. "3.
|
|
411
|
+
-p, --python PYTHON version of python to use, e.g. "3.14", default is
|
|
412
412
|
latest release version
|
|
413
413
|
```
|
|
414
414
|
|
|
@@ -153,7 +153,7 @@ options:
|
|
|
153
153
|
--purge-days PURGE_DAYS
|
|
154
154
|
cache YYYYMMDD release file lists and downloads for
|
|
155
155
|
this number of days after last version referencing
|
|
156
|
-
that release is removed. Default is
|
|
156
|
+
that release is removed. Default is 30 days.
|
|
157
157
|
--github-access-token GITHUB_ACCESS_TOKEN
|
|
158
158
|
optional Github access token. Can specify to reduce
|
|
159
159
|
rate limiting.
|
|
@@ -196,13 +196,13 @@ usage: pystand install [-h] [-r RELEASE] [-a] [-A] [--skip] [-f] [-s]
|
|
|
196
196
|
Install one, more, or all versions from a python-build-standalone release.
|
|
197
197
|
|
|
198
198
|
positional arguments:
|
|
199
|
-
version version to install. E.g. 3.
|
|
199
|
+
version version to install. E.g. 3.14 or 3.14.1
|
|
200
200
|
|
|
201
201
|
options:
|
|
202
202
|
-h, --help show this help message and exit
|
|
203
203
|
-r, --release RELEASE
|
|
204
204
|
install from specified python-build-standalone
|
|
205
|
-
YYYYMMDD release (e.g.
|
|
205
|
+
YYYYMMDD release (e.g. 20260807), default is latest
|
|
206
206
|
release
|
|
207
207
|
-a, --all install ALL versions from release
|
|
208
208
|
-A, --all-prerelease install ALL versions from release, including pre-
|
|
@@ -230,7 +230,7 @@ positional arguments:
|
|
|
230
230
|
options:
|
|
231
231
|
-h, --help show this help message and exit
|
|
232
232
|
-r, --release RELEASE
|
|
233
|
-
update to specified YYYMMDD release (e.g.
|
|
233
|
+
update to specified YYYMMDD release (e.g. 20260807),
|
|
234
234
|
default is latest release
|
|
235
235
|
-a, --all update ALL versions
|
|
236
236
|
--pre-release update release version to a later superceding pre-
|
|
@@ -260,7 +260,7 @@ options:
|
|
|
260
260
|
can be specified with --all)
|
|
261
261
|
-r, --release RELEASE
|
|
262
262
|
only remove versions if from specified YYYMMDD release
|
|
263
|
-
(e.g.
|
|
263
|
+
(e.g. 20260807)
|
|
264
264
|
|
|
265
265
|
aliases: r, rm
|
|
266
266
|
```
|
|
@@ -280,7 +280,7 @@ options:
|
|
|
280
280
|
-v, --verbose explicitly report why a version is not eligible for
|
|
281
281
|
update
|
|
282
282
|
-r, --release RELEASE
|
|
283
|
-
use specified YYYYMMDD release (e.g.
|
|
283
|
+
use specified YYYYMMDD release (e.g. 20260807) for
|
|
284
284
|
verbose compare, default is latest release
|
|
285
285
|
|
|
286
286
|
aliases: l
|
|
@@ -304,7 +304,7 @@ options:
|
|
|
304
304
|
-l, --list just list recent releases
|
|
305
305
|
-r, --release RELEASE
|
|
306
306
|
python-build-standalone YYYYMMDD release to show (e.g.
|
|
307
|
-
|
|
307
|
+
20260807), default is latest release
|
|
308
308
|
-a, --all show all available distributions for each version from
|
|
309
309
|
the release
|
|
310
310
|
|
|
@@ -371,7 +371,7 @@ positional arguments:
|
|
|
371
371
|
|
|
372
372
|
options:
|
|
373
373
|
-h, --help show this help message and exit
|
|
374
|
-
-p, --python PYTHON version of python to use, e.g. "3.
|
|
374
|
+
-p, --python PYTHON version of python to use, e.g. "3.14", default is
|
|
375
375
|
latest release version
|
|
376
376
|
```
|
|
377
377
|
|
|
@@ -389,7 +389,7 @@ positional arguments:
|
|
|
389
389
|
|
|
390
390
|
options:
|
|
391
391
|
-h, --help show this help message and exit
|
|
392
|
-
-p, --python PYTHON version of python to use, e.g. "3.
|
|
392
|
+
-p, --python PYTHON version of python to use, e.g. "3.14", default is
|
|
393
393
|
latest release version
|
|
394
394
|
```
|
|
395
395
|
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
#!/usr/bin/python
|
|
2
1
|
import re
|
|
3
2
|
import subprocess
|
|
4
3
|
import sys
|
|
@@ -7,7 +6,7 @@ import pystand
|
|
|
7
6
|
|
|
8
7
|
cmd = 'pystand show --all'.split()
|
|
9
8
|
out = subprocess.run(cmd, capture_output=True, text=True).stdout
|
|
10
|
-
alldists =
|
|
9
|
+
alldists = {re.sub(r'.+"(.+)".*', r'\1', ln) for ln in out.splitlines()}
|
|
11
10
|
|
|
12
11
|
error = 0
|
|
13
12
|
for mach, dist in pystand.DISTRIBUTIONS.items():
|
|
@@ -20,7 +20,7 @@ dependencies = [
|
|
|
20
20
|
"pygithub",
|
|
21
21
|
"certifi",
|
|
22
22
|
"filelock",
|
|
23
|
-
"
|
|
23
|
+
"backports.zstd; python_version < '3.14'",
|
|
24
24
|
]
|
|
25
25
|
|
|
26
26
|
[[project.authors]]
|
|
@@ -45,13 +45,8 @@ ignore_missing_imports = true
|
|
|
45
45
|
|
|
46
46
|
[tool.ruff.format]
|
|
47
47
|
quote-style = "single"
|
|
48
|
-
skip-magic-trailing-comma = true
|
|
49
48
|
|
|
50
|
-
[tool.
|
|
51
|
-
|
|
52
|
-
"ruff check",
|
|
53
|
-
"mypy",
|
|
54
|
-
"pyright",
|
|
55
|
-
]
|
|
49
|
+
[tool.ruff.lint]
|
|
50
|
+
ignore = ["SIM115", "SIM905", "BLE001", "PLW1510", "S110"]
|
|
56
51
|
|
|
57
52
|
# vim:se sw=2:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pystand
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.34
|
|
4
4
|
Summary: Install Python versions from python-build-standalone project
|
|
5
5
|
Author-email: Mark Blakeney <mark.blakeney@bullet-systems.net>
|
|
6
6
|
License-Expression: GPL-3.0-or-later
|
|
@@ -15,7 +15,7 @@ Requires-Dist: argparse-from-file
|
|
|
15
15
|
Requires-Dist: pygithub
|
|
16
16
|
Requires-Dist: certifi
|
|
17
17
|
Requires-Dist: filelock
|
|
18
|
-
Requires-Dist:
|
|
18
|
+
Requires-Dist: backports.zstd; python_version < "3.14"
|
|
19
19
|
|
|
20
20
|
## PYSTAND - Install Python Versions From The Python-Build-Standalone Project
|
|
21
21
|
[](https://pypi.org/project/pystand/)
|
|
@@ -172,7 +172,7 @@ options:
|
|
|
172
172
|
--purge-days PURGE_DAYS
|
|
173
173
|
cache YYYYMMDD release file lists and downloads for
|
|
174
174
|
this number of days after last version referencing
|
|
175
|
-
that release is removed. Default is
|
|
175
|
+
that release is removed. Default is 30 days.
|
|
176
176
|
--github-access-token GITHUB_ACCESS_TOKEN
|
|
177
177
|
optional Github access token. Can specify to reduce
|
|
178
178
|
rate limiting.
|
|
@@ -215,13 +215,13 @@ usage: pystand install [-h] [-r RELEASE] [-a] [-A] [--skip] [-f] [-s]
|
|
|
215
215
|
Install one, more, or all versions from a python-build-standalone release.
|
|
216
216
|
|
|
217
217
|
positional arguments:
|
|
218
|
-
version version to install. E.g. 3.
|
|
218
|
+
version version to install. E.g. 3.14 or 3.14.1
|
|
219
219
|
|
|
220
220
|
options:
|
|
221
221
|
-h, --help show this help message and exit
|
|
222
222
|
-r, --release RELEASE
|
|
223
223
|
install from specified python-build-standalone
|
|
224
|
-
YYYYMMDD release (e.g.
|
|
224
|
+
YYYYMMDD release (e.g. 20260807), default is latest
|
|
225
225
|
release
|
|
226
226
|
-a, --all install ALL versions from release
|
|
227
227
|
-A, --all-prerelease install ALL versions from release, including pre-
|
|
@@ -249,7 +249,7 @@ positional arguments:
|
|
|
249
249
|
options:
|
|
250
250
|
-h, --help show this help message and exit
|
|
251
251
|
-r, --release RELEASE
|
|
252
|
-
update to specified YYYMMDD release (e.g.
|
|
252
|
+
update to specified YYYMMDD release (e.g. 20260807),
|
|
253
253
|
default is latest release
|
|
254
254
|
-a, --all update ALL versions
|
|
255
255
|
--pre-release update release version to a later superceding pre-
|
|
@@ -279,7 +279,7 @@ options:
|
|
|
279
279
|
can be specified with --all)
|
|
280
280
|
-r, --release RELEASE
|
|
281
281
|
only remove versions if from specified YYYMMDD release
|
|
282
|
-
(e.g.
|
|
282
|
+
(e.g. 20260807)
|
|
283
283
|
|
|
284
284
|
aliases: r, rm
|
|
285
285
|
```
|
|
@@ -299,7 +299,7 @@ options:
|
|
|
299
299
|
-v, --verbose explicitly report why a version is not eligible for
|
|
300
300
|
update
|
|
301
301
|
-r, --release RELEASE
|
|
302
|
-
use specified YYYYMMDD release (e.g.
|
|
302
|
+
use specified YYYYMMDD release (e.g. 20260807) for
|
|
303
303
|
verbose compare, default is latest release
|
|
304
304
|
|
|
305
305
|
aliases: l
|
|
@@ -323,7 +323,7 @@ options:
|
|
|
323
323
|
-l, --list just list recent releases
|
|
324
324
|
-r, --release RELEASE
|
|
325
325
|
python-build-standalone YYYYMMDD release to show (e.g.
|
|
326
|
-
|
|
326
|
+
20260807), default is latest release
|
|
327
327
|
-a, --all show all available distributions for each version from
|
|
328
328
|
the release
|
|
329
329
|
|
|
@@ -390,7 +390,7 @@ positional arguments:
|
|
|
390
390
|
|
|
391
391
|
options:
|
|
392
392
|
-h, --help show this help message and exit
|
|
393
|
-
-p, --python PYTHON version of python to use, e.g. "3.
|
|
393
|
+
-p, --python PYTHON version of python to use, e.g. "3.14", default is
|
|
394
394
|
latest release version
|
|
395
395
|
```
|
|
396
396
|
|
|
@@ -408,7 +408,7 @@ positional arguments:
|
|
|
408
408
|
|
|
409
409
|
options:
|
|
410
410
|
-h, --help show this help message and exit
|
|
411
|
-
-p, --python PYTHON version of python to use, e.g. "3.
|
|
411
|
+
-p, --python PYTHON version of python to use, e.g. "3.14", default is
|
|
412
412
|
latest release version
|
|
413
413
|
```
|
|
414
414
|
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
#!/usr/bin/python3
|
|
2
1
|
"""
|
|
3
2
|
Command line tool to download, install, and update pre-built Python
|
|
4
3
|
versions from the python-build-standalone project at
|
|
@@ -35,11 +34,13 @@ GITHUB_SITE = f'https://github.com/{GITHUB_REPO}'
|
|
|
35
34
|
LATEST_RELEASES = f'{GITHUB_SITE}/releases.atom'
|
|
36
35
|
LATEST_RELEASE_TAG = f'{GITHUB_SITE}/releases/latest'
|
|
37
36
|
DOC = 'https://gregoryszorc.com/docs/python-build-standalone/main/'
|
|
37
|
+
VER = f'{sys.version_info.major}.{sys.version_info.minor}'
|
|
38
38
|
|
|
39
39
|
# Sample release tag for documentation/usage examples
|
|
40
|
-
SAMPL_RELEASE = '
|
|
40
|
+
SAMPL_RELEASE = '20260807'
|
|
41
41
|
|
|
42
42
|
PROG = Path(__file__).stem
|
|
43
|
+
HOME = Path.home()
|
|
43
44
|
|
|
44
45
|
# Default distributions for various platforms
|
|
45
46
|
DISTRIBUTIONS = {
|
|
@@ -114,10 +115,10 @@ class ColorDist(ColorTable):
|
|
|
114
115
|
return text.split('-', 1)[0]
|
|
115
116
|
|
|
116
117
|
|
|
117
|
-
def unexpanduser(path: Path
|
|
118
|
+
def unexpanduser(path: Path) -> Path:
|
|
118
119
|
"Return path name, with $HOME replaced by ~ (opposite of Path.expanduser())"
|
|
119
|
-
if path.parts[: len(
|
|
120
|
-
return Path('~', *path.parts[len(
|
|
120
|
+
if path.parts[: len(HOME.parts)] == HOME.parts:
|
|
121
|
+
return Path('~', *path.parts[len(HOME.parts) :])
|
|
121
122
|
|
|
122
123
|
return path
|
|
123
124
|
|
|
@@ -215,23 +216,6 @@ def rm_path(path: Path) -> bool:
|
|
|
215
216
|
return True
|
|
216
217
|
|
|
217
218
|
|
|
218
|
-
def register_zst() -> None:
|
|
219
|
-
"Register custom zstandard unpacker"
|
|
220
|
-
import tarfile
|
|
221
|
-
|
|
222
|
-
from zstandard import ZstdDecompressor
|
|
223
|
-
|
|
224
|
-
def unpack_zst(filename: str, extract_dir: str) -> None:
|
|
225
|
-
"Unpack a zstandard compressed tar"
|
|
226
|
-
with open(filename, 'rb') as compressed:
|
|
227
|
-
dctx = ZstdDecompressor()
|
|
228
|
-
with dctx.stream_reader(compressed) as reader:
|
|
229
|
-
with tarfile.open(fileobj=reader, mode='r|') as tar:
|
|
230
|
-
tar.extractall(path=extract_dir)
|
|
231
|
-
|
|
232
|
-
shutil.register_unpack_format('zst', ['.zst'], unpack_zst)
|
|
233
|
-
|
|
234
|
-
|
|
235
219
|
def fetch(args: Namespace, release: str, url: str, tdir: Path) -> str | None:
|
|
236
220
|
"Fetch and unpack a release file"
|
|
237
221
|
from urllib.parse import unquote, urlparse
|
|
@@ -256,9 +240,12 @@ def fetch(args: Namespace, release: str, url: str, tdir: Path) -> str | None:
|
|
|
256
240
|
if error:
|
|
257
241
|
rm_path(cache_file)
|
|
258
242
|
else:
|
|
259
|
-
# Register
|
|
260
|
-
|
|
261
|
-
|
|
243
|
+
# Register external zstd handler (only if Python < 3.14 which has
|
|
244
|
+
# built-in support)
|
|
245
|
+
if filename.lower().endswith('.zst') and sys.version_info < (3, 14):
|
|
246
|
+
from backports.zstd import register_shutil # type: ignore
|
|
247
|
+
|
|
248
|
+
register_shutil()
|
|
262
249
|
|
|
263
250
|
try:
|
|
264
251
|
shutil.unpack_archive(cache_file, tmpdir)
|
|
@@ -307,9 +294,9 @@ class VersionMatcher:
|
|
|
307
294
|
|
|
308
295
|
# If no version specified, return the latest release version
|
|
309
296
|
if not version:
|
|
310
|
-
for
|
|
311
|
-
if is_release_version(
|
|
312
|
-
return
|
|
297
|
+
for ver in self.seq:
|
|
298
|
+
if is_release_version(ver):
|
|
299
|
+
return ver
|
|
313
300
|
return None
|
|
314
301
|
|
|
315
302
|
if version in self.seq:
|
|
@@ -329,9 +316,10 @@ class VersionMatcher:
|
|
|
329
316
|
# Only allow upgrade of formal release to another formal
|
|
330
317
|
# release.
|
|
331
318
|
for full_version in self.seq:
|
|
332
|
-
if full_version.startswith(version)
|
|
333
|
-
|
|
334
|
-
|
|
319
|
+
if full_version.startswith(version) and (
|
|
320
|
+
not upgrade or not is_release or is_release_version(full_version)
|
|
321
|
+
):
|
|
322
|
+
return full_version
|
|
335
323
|
|
|
336
324
|
return None
|
|
337
325
|
|
|
@@ -362,7 +350,7 @@ def get_version_names(args: Namespace) -> list[str]:
|
|
|
362
350
|
if not args.version:
|
|
363
351
|
args.parser.error('Must specify at least one version, or --all.')
|
|
364
352
|
|
|
365
|
-
all_names =
|
|
353
|
+
all_names = {f.name for f in iter_versions(args)}
|
|
366
354
|
|
|
367
355
|
# Upconvert all user specified partial version names to full version names
|
|
368
356
|
matcher = VersionMatcher(all_names)
|
|
@@ -492,7 +480,7 @@ def get_release_files(args, tag) -> dict[str, Any]:
|
|
|
492
480
|
try:
|
|
493
481
|
release = gh.get_repo(GITHUB_REPO).get_release(tag)
|
|
494
482
|
except Exception as e:
|
|
495
|
-
print(f'Error: {
|
|
483
|
+
print(f'Error: {e}', file=sys.stderr)
|
|
496
484
|
return {}
|
|
497
485
|
|
|
498
486
|
# Iterate over the release assets and store pertinent files in a
|
|
@@ -527,7 +515,7 @@ def update_version_symlinks(args: Namespace) -> None:
|
|
|
527
515
|
|
|
528
516
|
# Create a map of all the new major version links
|
|
529
517
|
newlinks_all = defaultdict(set)
|
|
530
|
-
pre_releases =
|
|
518
|
+
pre_releases = {v for v in vers if not is_release_version(v)}
|
|
531
519
|
for namevers in vers:
|
|
532
520
|
while '.' in namevers[:-1]:
|
|
533
521
|
namevers_major = namevers.rsplit('.', maxsplit=1)[0]
|
|
@@ -546,7 +534,7 @@ def update_version_symlinks(args: Namespace) -> None:
|
|
|
546
534
|
if ver in pre_releases and (rels := (cands - pre_releases)):
|
|
547
535
|
cands = rels
|
|
548
536
|
|
|
549
|
-
newlinks[ver] =
|
|
537
|
+
newlinks[ver] = max(cands, key=parse_version)
|
|
550
538
|
|
|
551
539
|
# Remove all old or invalid existing links
|
|
552
540
|
for name, tgt in oldlinks.items():
|
|
@@ -601,7 +589,7 @@ def show_list(args: Namespace) -> None:
|
|
|
601
589
|
"Show a list of available releases"
|
|
602
590
|
latest = parse_version(args._release)
|
|
603
591
|
releases = fetch_tags(args)
|
|
604
|
-
cached =
|
|
592
|
+
cached = {p.name for p in args._releases.iterdir()}
|
|
605
593
|
for release in sorted(cached.union(releases)):
|
|
606
594
|
if args.re_match and not re.search(args.re_match, release):
|
|
607
595
|
continue
|
|
@@ -826,7 +814,7 @@ def main() -> str | None:
|
|
|
826
814
|
)
|
|
827
815
|
opt.add_argument(
|
|
828
816
|
'--purge-days',
|
|
829
|
-
default=
|
|
817
|
+
default=30,
|
|
830
818
|
type=int,
|
|
831
819
|
help='cache YYYYMMDD release file lists and downloads for '
|
|
832
820
|
'this number of days after last version referencing that '
|
|
@@ -867,7 +855,7 @@ def main() -> str | None:
|
|
|
867
855
|
else:
|
|
868
856
|
return f'Must define a docstring for command class "{name}".'
|
|
869
857
|
|
|
870
|
-
aliases = cls.aliases if hasattr(cls, 'aliases') else
|
|
858
|
+
aliases = cls.aliases if hasattr(cls, 'aliases') else ()
|
|
871
859
|
title = get_title(desc)
|
|
872
860
|
cmdopt = cmd.add_parser(name, description=desc, help=title, aliases=aliases)
|
|
873
861
|
|
|
@@ -933,7 +921,7 @@ def main() -> str | None:
|
|
|
933
921
|
# COMMAND
|
|
934
922
|
class install_:
|
|
935
923
|
doc = f'Install one, more, or all versions from a {REPO} release.'
|
|
936
|
-
aliases =
|
|
924
|
+
aliases = ('i',)
|
|
937
925
|
|
|
938
926
|
@staticmethod
|
|
939
927
|
def init(parser: ArgumentParser) -> None:
|
|
@@ -972,7 +960,7 @@ class install_:
|
|
|
972
960
|
help='also install source files if available in distribution download',
|
|
973
961
|
)
|
|
974
962
|
parser.add_argument(
|
|
975
|
-
'version', nargs='*', help='version to install. E.g.
|
|
963
|
+
'version', nargs='*', help=f'version to install. E.g. {VER} or {VER}.1'
|
|
976
964
|
)
|
|
977
965
|
|
|
978
966
|
@staticmethod
|
|
@@ -993,7 +981,7 @@ class install_:
|
|
|
993
981
|
'Can not specify versions with --all unless also specifying --skip.'
|
|
994
982
|
)
|
|
995
983
|
|
|
996
|
-
skips =
|
|
984
|
+
skips = {v for ver in args.version if (v := matcher.match(ver))}
|
|
997
985
|
|
|
998
986
|
args.version = [
|
|
999
987
|
v
|
|
@@ -1033,7 +1021,7 @@ class install_:
|
|
|
1033
1021
|
class update_:
|
|
1034
1022
|
"Update one, more, or all versions to another release."
|
|
1035
1023
|
|
|
1036
|
-
aliases =
|
|
1024
|
+
aliases = ('u', 'up')
|
|
1037
1025
|
|
|
1038
1026
|
@staticmethod
|
|
1039
1027
|
def init(parser: ArgumentParser) -> None:
|
|
@@ -1129,7 +1117,7 @@ class update_:
|
|
|
1129
1117
|
class remove_:
|
|
1130
1118
|
"Remove/uninstall one, more, or all versions."
|
|
1131
1119
|
|
|
1132
|
-
aliases =
|
|
1120
|
+
aliases = ('r', 'rm')
|
|
1133
1121
|
|
|
1134
1122
|
@staticmethod
|
|
1135
1123
|
def init(parser: ArgumentParser) -> None:
|
|
@@ -1170,7 +1158,7 @@ class remove_:
|
|
|
1170
1158
|
class list_:
|
|
1171
1159
|
"List installed versions and show which have an update available."
|
|
1172
1160
|
|
|
1173
|
-
aliases =
|
|
1161
|
+
aliases = ('l',)
|
|
1174
1162
|
|
|
1175
1163
|
@staticmethod
|
|
1176
1164
|
def init(parser: ArgumentParser) -> None:
|
|
@@ -1260,7 +1248,7 @@ class show_:
|
|
|
1260
1248
|
View available releases and their distributions at
|
|
1261
1249
|
{GITHUB_SITE}/releases.
|
|
1262
1250
|
"""
|
|
1263
|
-
aliases =
|
|
1251
|
+
aliases = ('s',)
|
|
1264
1252
|
|
|
1265
1253
|
@staticmethod
|
|
1266
1254
|
def init(parser: ArgumentParser) -> None:
|
|
@@ -1335,7 +1323,7 @@ class show_:
|
|
|
1335
1323
|
class path_:
|
|
1336
1324
|
"Show path prefix to installed version base directory."
|
|
1337
1325
|
|
|
1338
|
-
aliases =
|
|
1326
|
+
aliases = ('p',)
|
|
1339
1327
|
|
|
1340
1328
|
@staticmethod
|
|
1341
1329
|
def init(parser: ArgumentParser) -> None:
|
|
@@ -1388,7 +1376,7 @@ class path_:
|
|
|
1388
1376
|
class cache_:
|
|
1389
1377
|
"Show size of release download caches."
|
|
1390
1378
|
|
|
1391
|
-
aliases =
|
|
1379
|
+
aliases = ('c',)
|
|
1392
1380
|
|
|
1393
1381
|
@staticmethod
|
|
1394
1382
|
def init(parser: ArgumentParser) -> None:
|
|
@@ -1436,9 +1424,7 @@ class cache_:
|
|
|
1436
1424
|
)
|
|
1437
1425
|
|
|
1438
1426
|
keep = keeplist(args)
|
|
1439
|
-
releases =
|
|
1440
|
-
p.name for p in args._downloads.iterdir() if p.name.isdigit()
|
|
1441
|
-
)
|
|
1427
|
+
releases = {p.name for p in args._downloads.iterdir() if p.name.isdigit()}
|
|
1442
1428
|
releases.update(
|
|
1443
1429
|
p.name for p in args._releases.iterdir() if p.name.isdigit()
|
|
1444
1430
|
)
|
|
@@ -1492,7 +1478,7 @@ class uv_:
|
|
|
1492
1478
|
parser.add_argument(
|
|
1493
1479
|
'-p',
|
|
1494
1480
|
'--python',
|
|
1495
|
-
help='version of python to use, e.g. "
|
|
1481
|
+
help=f'version of python to use, e.g. "{VER}", default is latest release version',
|
|
1496
1482
|
)
|
|
1497
1483
|
|
|
1498
1484
|
parser.add_argument('command', help='uv command to run')
|
|
@@ -1522,7 +1508,7 @@ class uvx_:
|
|
|
1522
1508
|
parser.add_argument(
|
|
1523
1509
|
'-p',
|
|
1524
1510
|
'--python',
|
|
1525
|
-
help='version of python to use, e.g. "
|
|
1511
|
+
help=f'version of python to use, e.g. "{VER}", default is latest release version',
|
|
1526
1512
|
)
|
|
1527
1513
|
|
|
1528
1514
|
parser.add_argument('program', help='uvx program to run')
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|