pystand 2.4__py3-none-any.whl → 2.5__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-2.4.dist-info → pystand-2.5.dist-info}/METADATA +14 -8
- pystand-2.5.dist-info/RECORD +6 -0
- {pystand-2.4.dist-info → pystand-2.5.dist-info}/WHEEL +1 -1
- pystand.py +32 -7
- pystand-2.4.dist-info/RECORD +0 -6
- {pystand-2.4.dist-info → pystand-2.5.dist-info}/entry_points.txt +0 -0
- {pystand-2.4.dist-info → pystand-2.5.dist-info}/top_level.txt +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: pystand
|
3
|
-
Version: 2.
|
3
|
+
Version: 2.5
|
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
|
@@ -131,7 +131,7 @@ usage: pystand [-h] [-D DISTRIBUTION] [-P PREFIX_DIR] [-C CACHE_DIR]
|
|
131
131
|
[-M CACHE_MINUTES] [--purge-days PURGE_DAYS]
|
132
132
|
[--github-access-token GITHUB_ACCESS_TOKEN] [--no-strip]
|
133
133
|
[-V]
|
134
|
-
{install,update,remove,list,show,path} ...
|
134
|
+
{install,update,upgrade,remove,uninstall,list,show,path} ...
|
135
135
|
|
136
136
|
Command line tool to download, install, and update pre-built Python versions
|
137
137
|
from the python-build-standalone project at
|
@@ -164,18 +164,18 @@ options:
|
|
164
164
|
-V, --version just show pystand version
|
165
165
|
|
166
166
|
Commands:
|
167
|
-
{install,update,remove,list,show,path}
|
167
|
+
{install,update,upgrade,remove,uninstall,list,show,path}
|
168
168
|
install Install one or more versions from a python-build-
|
169
169
|
standalone release.
|
170
|
-
update
|
171
|
-
remove
|
170
|
+
update (upgrade) Update one, more, or all versions to another release.
|
171
|
+
remove (uninstall) Remove/uninstall one, more, or all versions.
|
172
172
|
list List installed versions and show which have an update
|
173
173
|
available.
|
174
174
|
show Show versions available from a release.
|
175
175
|
path Show path prefix to installed version base directory.
|
176
176
|
|
177
|
-
|
178
|
-
$HOME/.config/pystand-flags.conf.
|
177
|
+
Some commands offer aliases as shown in brackets above. Note you can set
|
178
|
+
default starting global options in $HOME/.config/pystand-flags.conf.
|
179
179
|
```
|
180
180
|
|
181
181
|
Type `pystand <command> -h` to see specific help/usage for any
|
@@ -184,7 +184,7 @@ individual command:
|
|
184
184
|
### Command `install`
|
185
185
|
|
186
186
|
```
|
187
|
-
usage: pystand install [-h] [-r RELEASE] [-f] version [version ...]
|
187
|
+
usage: pystand install [-h] [-r RELEASE] [-f] [-s] version [version ...]
|
188
188
|
|
189
189
|
Install one or more versions from a python-build-standalone release.
|
190
190
|
|
@@ -198,6 +198,8 @@ options:
|
|
198
198
|
YYYYMMDD release (e.g. 20240415), default is latest
|
199
199
|
release
|
200
200
|
-f, --force force install even if already installed
|
201
|
+
-s, --include-source also install source files if available in distribution
|
202
|
+
download
|
201
203
|
```
|
202
204
|
|
203
205
|
### Command `update`
|
@@ -220,6 +222,8 @@ options:
|
|
220
222
|
can be specified with --all)
|
221
223
|
-k, --keep keep old version after updating (but only if different
|
222
224
|
version number)
|
225
|
+
|
226
|
+
aliases: upgrade
|
223
227
|
```
|
224
228
|
|
225
229
|
### Command `remove`
|
@@ -240,6 +244,8 @@ options:
|
|
240
244
|
-r RELEASE, --release RELEASE
|
241
245
|
only remove versions if from specified YYYMMDD release
|
242
246
|
(e.g. 20240415)
|
247
|
+
|
248
|
+
aliases: uninstall
|
243
249
|
```
|
244
250
|
|
245
251
|
### Command `list`
|
@@ -0,0 +1,6 @@
|
|
1
|
+
pystand.py,sha256=sCo975wSImj3Pjlof0N_y5U8QkSsCmwvxlm0c_nhLUE,34395
|
2
|
+
pystand-2.5.dist-info/METADATA,sha256=P6vRwztzgexP_2B_kYG_YQ7lsAHZH1n2klDXNaz6JBs,24600
|
3
|
+
pystand-2.5.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
|
4
|
+
pystand-2.5.dist-info/entry_points.txt,sha256=DG4ps3I3nni1bubV1tXs6u8FARgkdbAYaEAzZD4RAo8,41
|
5
|
+
pystand-2.5.dist-info/top_level.txt,sha256=NoWUh19UQymAJLHTCdxMnVwV6Teftef5fzyF3OWLyNY,8
|
6
|
+
pystand-2.5.dist-info/RECORD,,
|
pystand.py
CHANGED
@@ -163,9 +163,19 @@ def fetch(args: Namespace, release: str, url: str, tdir: Path) -> str | None:
|
|
163
163
|
except Exception as e:
|
164
164
|
error = f'Failed to unpack "{url}": {e}'
|
165
165
|
else:
|
166
|
-
pdir = tmpdir / 'python'
|
167
|
-
|
168
|
-
|
166
|
+
pdir = tmpdir / 'python'
|
167
|
+
idir = pdir / 'install'
|
168
|
+
if idir.exists():
|
169
|
+
# This is a source distribution, copy the source if
|
170
|
+
# requested
|
171
|
+
if args.include_source:
|
172
|
+
srcdir = idir / 'src'
|
173
|
+
for subpath in pdir.iterdir():
|
174
|
+
if subpath.name != idir.name:
|
175
|
+
srcdir.mkdir(parents=True, exist_ok=True)
|
176
|
+
subpath.replace(srcdir / subpath.name)
|
177
|
+
|
178
|
+
pdir = idir
|
169
179
|
|
170
180
|
pdir.replace(tdir)
|
171
181
|
|
@@ -523,8 +533,9 @@ def main() -> str | None:
|
|
523
533
|
|
524
534
|
# Parse arguments
|
525
535
|
opt = ArgumentParser(description=__doc__,
|
526
|
-
|
527
|
-
|
536
|
+
epilog='Some commands offer aliases as shown in brackets above. '
|
537
|
+
'Note you can set default starting global options in '
|
538
|
+
f'{CNFFILE}.')
|
528
539
|
|
529
540
|
# Set up main/global arguments
|
530
541
|
opt.add_argument('-D', '--distribution',
|
@@ -565,8 +576,10 @@ def main() -> str | None:
|
|
565
576
|
else:
|
566
577
|
return f'Must define a docstring for command class "{name}".'
|
567
578
|
|
579
|
+
aliases = cls.aliases if hasattr(cls, 'aliases') else []
|
568
580
|
title = get_title(desc)
|
569
|
-
cmdopt = cmd.add_parser(name, description=desc, help=title
|
581
|
+
cmdopt = cmd.add_parser(name, description=desc, help=title,
|
582
|
+
aliases=aliases)
|
570
583
|
|
571
584
|
# Set up this commands own arguments, if it has any
|
572
585
|
if hasattr(cls, 'init'):
|
@@ -636,6 +649,9 @@ class _install(COMMAND):
|
|
636
649
|
'default is latest release')
|
637
650
|
parser.add_argument('-f', '--force', action='store_true',
|
638
651
|
help='force install even if already installed')
|
652
|
+
parser.add_argument('-s', '--include-source', action='store_true',
|
653
|
+
help='also install source files if available in '
|
654
|
+
'distribution download')
|
639
655
|
parser.add_argument('version', nargs='+',
|
640
656
|
help='version to install. E.g. 3.12 or 3.12.3')
|
641
657
|
|
@@ -666,6 +682,8 @@ class _install(COMMAND):
|
|
666
682
|
@COMMAND.add
|
667
683
|
class _update(COMMAND):
|
668
684
|
'Update one, more, or all versions to another release.'
|
685
|
+
aliases = ['upgrade']
|
686
|
+
|
669
687
|
@staticmethod
|
670
688
|
def init(parser: ArgumentParser) -> None:
|
671
689
|
parser.add_argument('-r', '--release',
|
@@ -692,7 +710,8 @@ class _update(COMMAND):
|
|
692
710
|
|
693
711
|
matcher = VersionMatcher(files)
|
694
712
|
for version in get_version_names(args):
|
695
|
-
|
713
|
+
vdir = args._versions / version
|
714
|
+
if not (data := get_json(vdir / args._data)):
|
696
715
|
continue
|
697
716
|
|
698
717
|
if (release := data.get('release')) == release_target:
|
@@ -719,6 +738,10 @@ class _update(COMMAND):
|
|
719
738
|
f'{fmt(nextver, release_target)} '
|
720
739
|
f'distribution="{distribution}" ..')
|
721
740
|
|
741
|
+
# If the source was originally included, then include it in
|
742
|
+
# the update.
|
743
|
+
args.include_source = (vdir / 'src').is_dir()
|
744
|
+
|
722
745
|
if error := install(args, new_vdir, release_target, distribution,
|
723
746
|
files):
|
724
747
|
return error
|
@@ -729,6 +752,8 @@ class _update(COMMAND):
|
|
729
752
|
@COMMAND.add
|
730
753
|
class _remove(COMMAND):
|
731
754
|
'Remove/uninstall one, more, or all versions.'
|
755
|
+
aliases = ['uninstall']
|
756
|
+
|
732
757
|
@staticmethod
|
733
758
|
def init(parser: ArgumentParser) -> None:
|
734
759
|
parser.add_argument('-a', '--all', action='store_true',
|
pystand-2.4.dist-info/RECORD
DELETED
@@ -1,6 +0,0 @@
|
|
1
|
-
pystand.py,sha256=DGbYpdOu54cMuasq0hpcSfhn8vNhT-dDll4Xx6Xx628,33340
|
2
|
-
pystand-2.4.dist-info/METADATA,sha256=GdWm913Z7KD50Wq7gsHPR5COHU1fZhSuONSYFBf_H5c,24353
|
3
|
-
pystand-2.4.dist-info/WHEEL,sha256=R06PA3UVYHThwHvxuRWMqaGcr-PuniXahwjmQRFMEkY,91
|
4
|
-
pystand-2.4.dist-info/entry_points.txt,sha256=DG4ps3I3nni1bubV1tXs6u8FARgkdbAYaEAzZD4RAo8,41
|
5
|
-
pystand-2.4.dist-info/top_level.txt,sha256=NoWUh19UQymAJLHTCdxMnVwV6Teftef5fzyF3OWLyNY,8
|
6
|
-
pystand-2.4.dist-info/RECORD,,
|
File without changes
|
File without changes
|