pystand 1.1__py3-none-any.whl → 1.2__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.
- {pystand-1.1.dist-info → pystand-1.2.dist-info}/METADATA +9 -6
- pystand-1.2.dist-info/RECORD +6 -0
- pystand.py +23 -7
- pystand-1.1.dist-info/RECORD +0 -6
- {pystand-1.1.dist-info → pystand-1.2.dist-info}/WHEEL +0 -0
- {pystand-1.1.dist-info → pystand-1.2.dist-info}/entry_points.txt +0 -0
- {pystand-1.1.dist-info → pystand-1.2.dist-info}/top_level.txt +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: pystand
|
3
|
-
Version: 1.
|
3
|
+
Version: 1.2
|
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: GPLv3
|
@@ -18,8 +18,8 @@ Requires-Dist: pygithub
|
|
18
18
|
[](https://pypi.org/project/pystand/)
|
19
19
|
[](https://aur.archlinux.org/packages/pystand/)
|
20
20
|
|
21
|
-
[`pystand`][pystand] is a command line tool to facilitate the
|
22
|
-
installation and update of pre-built Python versions from the
|
21
|
+
[`pystand`][pystand] is a command line tool to facilitate the download,
|
22
|
+
installation, and update of pre-built Python versions from the
|
23
23
|
[`python-build-standalone`][pbs] project. The following commands are
|
24
24
|
provided:
|
25
25
|
|
@@ -120,8 +120,9 @@ usage: pystand [-h] [-D DISTRIBUTION] [-B BASE_DIR] [-C CACHE_MINUTES]
|
|
120
120
|
[--purge-days PURGE_DAYS] [-V]
|
121
121
|
{install,update,remove,list,show,path} ...
|
122
122
|
|
123
|
-
Command line tool to install pre-built Python versions
|
124
|
-
standalone project
|
123
|
+
Command line tool to download, install, and update pre-built Python versions
|
124
|
+
from the python-build-standalone project at
|
125
|
+
https://github.com/indygreg/python-build-standalone.
|
125
126
|
|
126
127
|
options:
|
127
128
|
-h, --help show this help message and exit
|
@@ -181,7 +182,7 @@ options:
|
|
181
182
|
### Command `update`
|
182
183
|
|
183
184
|
```
|
184
|
-
usage: pystand update [-h] [-r RELEASE] [-a] [--skip] [version ...]
|
185
|
+
usage: pystand update [-h] [-r RELEASE] [-a] [--skip] [-k] [version ...]
|
185
186
|
|
186
187
|
Update one, more, or all versions to another release.
|
187
188
|
|
@@ -196,6 +197,8 @@ options:
|
|
196
197
|
-a, --all update ALL versions
|
197
198
|
--skip skip the specified versions when updating all (only
|
198
199
|
can be specified with --all)
|
200
|
+
-k, --keep keep old version after updating (but only if different
|
201
|
+
version number)
|
199
202
|
```
|
200
203
|
|
201
204
|
### Command `remove`
|
@@ -0,0 +1,6 @@
|
|
1
|
+
pystand.py,sha256=5X--S1zNpaEauP4FkubSe9J5FM3qQ1OO92ZcPlk__4I,26248
|
2
|
+
pystand-1.2.dist-info/METADATA,sha256=V72dn_zsBb0W0ym4lYh3EljiaOqY0s2l9fuszbK_EFg,14304
|
3
|
+
pystand-1.2.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
4
|
+
pystand-1.2.dist-info/entry_points.txt,sha256=DG4ps3I3nni1bubV1tXs6u8FARgkdbAYaEAzZD4RAo8,41
|
5
|
+
pystand-1.2.dist-info/top_level.txt,sha256=NoWUh19UQymAJLHTCdxMnVwV6Teftef5fzyF3OWLyNY,8
|
6
|
+
pystand-1.2.dist-info/RECORD,,
|
pystand.py
CHANGED
@@ -1,8 +1,9 @@
|
|
1
1
|
#!/usr/bin/python3
|
2
2
|
# PYTHON_ARGCOMPLETE_OK
|
3
3
|
'''
|
4
|
-
Command line tool to install pre-built Python
|
5
|
-
python-build-standalone project
|
4
|
+
Command line tool to download, install, and update pre-built Python
|
5
|
+
versions from the python-build-standalone project at
|
6
|
+
https://github.com/indygreg/python-build-standalone.
|
6
7
|
'''
|
7
8
|
from __future__ import annotations
|
8
9
|
|
@@ -197,6 +198,11 @@ def get_release_files(args, tag, implementation: Optional[str] = None) -> dict:
|
|
197
198
|
# Look for tag data in our release cache
|
198
199
|
jfile = args._releases / tag
|
199
200
|
if not (files := get_json(jfile)):
|
201
|
+
|
202
|
+
# May have read this release before but it has no assets
|
203
|
+
if jfile.exists():
|
204
|
+
return {}
|
205
|
+
|
200
206
|
# Not in cache so fetch it (and also store in cache)
|
201
207
|
gh = get_gh(args)
|
202
208
|
try:
|
@@ -472,7 +478,7 @@ class _install(COMMAND):
|
|
472
478
|
release = args.release or get_latest_release_tag(args)
|
473
479
|
files = get_release_files(args, release, 'cpython')
|
474
480
|
if not files:
|
475
|
-
return f'Release "{release}" not found.'
|
481
|
+
return f'Release "{release}" not found, or has no compatible files.'
|
476
482
|
|
477
483
|
matcher = VersionMatcher(files)
|
478
484
|
for version in args.version:
|
@@ -504,6 +510,9 @@ class _update(COMMAND):
|
|
504
510
|
parser.add_argument('--skip', action='store_true',
|
505
511
|
help='skip the specified versions when '
|
506
512
|
'updating all (only can be specified with --all)')
|
513
|
+
parser.add_argument('-k', '--keep', action='store_true',
|
514
|
+
help='keep old version after updating (but only '
|
515
|
+
'if different version number)')
|
507
516
|
parser.add_argument('version', nargs='*',
|
508
517
|
help='version to update (or to skip for '
|
509
518
|
'--all --skip)')
|
@@ -525,14 +534,21 @@ class _update(COMMAND):
|
|
525
534
|
continue
|
526
535
|
|
527
536
|
nextver = matcher.match(version, upconvert_minor=True)
|
528
|
-
new_vdir = args._versions / nextver
|
529
|
-
if nextver != version and new_vdir.exists():
|
530
|
-
continue
|
531
537
|
|
532
538
|
distribution = data.get('distribution')
|
533
539
|
if not distribution or distribution not in files.get(nextver, {}):
|
534
540
|
continue
|
535
541
|
|
542
|
+
if nextver == version and args.keep:
|
543
|
+
print(f'Error: {fmt(version, release)} would not be kept '
|
544
|
+
f'if update to {fmt(nextver, release_target)} '
|
545
|
+
f'distribution="{distribution}"', file=sys.stderr)
|
546
|
+
continue
|
547
|
+
|
548
|
+
new_vdir = args._versions / nextver
|
549
|
+
if nextver != version and new_vdir.exists():
|
550
|
+
continue
|
551
|
+
|
536
552
|
print(f'{fmt(version, release)} updating to '
|
537
553
|
f'{fmt(nextver, release_target)} '
|
538
554
|
f'distribution="{distribution}" ..')
|
@@ -541,7 +557,7 @@ class _update(COMMAND):
|
|
541
557
|
files):
|
542
558
|
return error
|
543
559
|
|
544
|
-
if nextver != version:
|
560
|
+
if nextver != version and not args.keep:
|
545
561
|
remove(args, version)
|
546
562
|
|
547
563
|
@COMMAND.add
|
pystand-1.1.dist-info/RECORD
DELETED
@@ -1,6 +0,0 @@
|
|
1
|
-
pystand.py,sha256=mZmfP9CHLmj2rtwqQuteY7dwpkqtsLsU6d8oPxGgeUI,25512
|
2
|
-
pystand-1.1.dist-info/METADATA,sha256=CtnNqg_-4iv49ZXU_gyMVPCZUqiKgKcOyQ3l1kEZ9Pw,14093
|
3
|
-
pystand-1.1.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
4
|
-
pystand-1.1.dist-info/entry_points.txt,sha256=DG4ps3I3nni1bubV1tXs6u8FARgkdbAYaEAzZD4RAo8,41
|
5
|
-
pystand-1.1.dist-info/top_level.txt,sha256=NoWUh19UQymAJLHTCdxMnVwV6Teftef5fzyF3OWLyNY,8
|
6
|
-
pystand-1.1.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|