pystand 2.39__tar.gz → 2.40__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.39/pystand.egg-info → pystand-2.40}/PKG-INFO +20 -3
- {pystand-2.39 → pystand-2.40}/README.md +19 -2
- {pystand-2.39 → pystand-2.40/pystand.egg-info}/PKG-INFO +20 -3
- pystand-2.40/pystand.egg-info/scm_version.json +8 -0
- {pystand-2.39 → pystand-2.40}/pystand.py +51 -0
- pystand-2.39/pystand.egg-info/scm_version.json +0 -8
- {pystand-2.39 → pystand-2.40}/.gitignore +0 -0
- {pystand-2.39 → pystand-2.40}/check-dist.py +0 -0
- {pystand-2.39 → pystand-2.40}/justfile +0 -0
- {pystand-2.39 → pystand-2.40}/pyproject.toml +0 -0
- {pystand-2.39 → pystand-2.40}/pystand.egg-info/SOURCES.txt +0 -0
- {pystand-2.39 → pystand-2.40}/pystand.egg-info/dependency_links.txt +0 -0
- {pystand-2.39 → pystand-2.40}/pystand.egg-info/entry_points.txt +0 -0
- {pystand-2.39 → pystand-2.40}/pystand.egg-info/requires.txt +0 -0
- {pystand-2.39 → pystand-2.40}/pystand.egg-info/scm_file_list.json +0 -0
- {pystand-2.39 → pystand-2.40}/pystand.egg-info/top_level.txt +0 -0
- {pystand-2.39 → pystand-2.40}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pystand
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.40
|
|
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
|
|
@@ -143,7 +143,7 @@ usage: pystand [-h] [-D DISTRIBUTION] [-P PREFIX_DIR] [-C CACHE_DIR]
|
|
|
143
143
|
[-M CACHE_MINUTES] [--purge-days PURGE_DAYS]
|
|
144
144
|
[--github-access-token GITHUB_ACCESS_TOKEN] [--no-strip]
|
|
145
145
|
[--no-color] [--cert {system,certifi,none}] [-V]
|
|
146
|
-
{install,i,update,u,up,remove,r,rm,list,l,show,s,path,p,cache,c,uv,uvx} ...
|
|
146
|
+
{install,i,update,u,up,remove,r,rm,list,l,show,s,path,p,cache,c,man,m,uv,uvx} ...
|
|
147
147
|
|
|
148
148
|
Command line tool to download, install, and update pre-built Python versions
|
|
149
149
|
from the python-build-standalone project at https://github.com/astral-
|
|
@@ -183,7 +183,7 @@ options:
|
|
|
183
183
|
-V, --version just show pystand version
|
|
184
184
|
|
|
185
185
|
Commands:
|
|
186
|
-
{install,i,update,u,up,remove,r,rm,list,l,show,s,path,p,cache,c,uv,uvx}
|
|
186
|
+
{install,i,update,u,up,remove,r,rm,list,l,show,s,path,p,cache,c,man,m,uv,uvx}
|
|
187
187
|
install (i) Install one, more, or all versions from a python-
|
|
188
188
|
build-standalone release.
|
|
189
189
|
update (u, up) Update one, more, or all versions to another release.
|
|
@@ -193,6 +193,7 @@ Commands:
|
|
|
193
193
|
show (s) Show versions available from a release.
|
|
194
194
|
path (p) Show path prefix to installed version base directory.
|
|
195
195
|
cache (c) Show size of release download caches.
|
|
196
|
+
man (m) Show installed man page for latest or given version.
|
|
196
197
|
uv Run a uv command using a version of python installed
|
|
197
198
|
by pystand.
|
|
198
199
|
uvx Run a program using uvx and a version of python
|
|
@@ -372,6 +373,22 @@ options:
|
|
|
372
373
|
aliases: c
|
|
373
374
|
```
|
|
374
375
|
|
|
376
|
+
### Command `man`
|
|
377
|
+
|
|
378
|
+
```
|
|
379
|
+
usage: pystand man [-h] [version]
|
|
380
|
+
|
|
381
|
+
Show installed man page for latest or given version.
|
|
382
|
+
|
|
383
|
+
positional arguments:
|
|
384
|
+
version installed version to show man page for
|
|
385
|
+
|
|
386
|
+
options:
|
|
387
|
+
-h, --help show this help message and exit
|
|
388
|
+
|
|
389
|
+
aliases: m
|
|
390
|
+
```
|
|
391
|
+
|
|
375
392
|
### Command `uv`
|
|
376
393
|
|
|
377
394
|
```
|
|
@@ -125,7 +125,7 @@ usage: pystand [-h] [-D DISTRIBUTION] [-P PREFIX_DIR] [-C CACHE_DIR]
|
|
|
125
125
|
[-M CACHE_MINUTES] [--purge-days PURGE_DAYS]
|
|
126
126
|
[--github-access-token GITHUB_ACCESS_TOKEN] [--no-strip]
|
|
127
127
|
[--no-color] [--cert {system,certifi,none}] [-V]
|
|
128
|
-
{install,i,update,u,up,remove,r,rm,list,l,show,s,path,p,cache,c,uv,uvx} ...
|
|
128
|
+
{install,i,update,u,up,remove,r,rm,list,l,show,s,path,p,cache,c,man,m,uv,uvx} ...
|
|
129
129
|
|
|
130
130
|
Command line tool to download, install, and update pre-built Python versions
|
|
131
131
|
from the python-build-standalone project at https://github.com/astral-
|
|
@@ -165,7 +165,7 @@ options:
|
|
|
165
165
|
-V, --version just show pystand version
|
|
166
166
|
|
|
167
167
|
Commands:
|
|
168
|
-
{install,i,update,u,up,remove,r,rm,list,l,show,s,path,p,cache,c,uv,uvx}
|
|
168
|
+
{install,i,update,u,up,remove,r,rm,list,l,show,s,path,p,cache,c,man,m,uv,uvx}
|
|
169
169
|
install (i) Install one, more, or all versions from a python-
|
|
170
170
|
build-standalone release.
|
|
171
171
|
update (u, up) Update one, more, or all versions to another release.
|
|
@@ -175,6 +175,7 @@ Commands:
|
|
|
175
175
|
show (s) Show versions available from a release.
|
|
176
176
|
path (p) Show path prefix to installed version base directory.
|
|
177
177
|
cache (c) Show size of release download caches.
|
|
178
|
+
man (m) Show installed man page for latest or given version.
|
|
178
179
|
uv Run a uv command using a version of python installed
|
|
179
180
|
by pystand.
|
|
180
181
|
uvx Run a program using uvx and a version of python
|
|
@@ -354,6 +355,22 @@ options:
|
|
|
354
355
|
aliases: c
|
|
355
356
|
```
|
|
356
357
|
|
|
358
|
+
### Command `man`
|
|
359
|
+
|
|
360
|
+
```
|
|
361
|
+
usage: pystand man [-h] [version]
|
|
362
|
+
|
|
363
|
+
Show installed man page for latest or given version.
|
|
364
|
+
|
|
365
|
+
positional arguments:
|
|
366
|
+
version installed version to show man page for
|
|
367
|
+
|
|
368
|
+
options:
|
|
369
|
+
-h, --help show this help message and exit
|
|
370
|
+
|
|
371
|
+
aliases: m
|
|
372
|
+
```
|
|
373
|
+
|
|
357
374
|
### Command `uv`
|
|
358
375
|
|
|
359
376
|
```
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pystand
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.40
|
|
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
|
|
@@ -143,7 +143,7 @@ usage: pystand [-h] [-D DISTRIBUTION] [-P PREFIX_DIR] [-C CACHE_DIR]
|
|
|
143
143
|
[-M CACHE_MINUTES] [--purge-days PURGE_DAYS]
|
|
144
144
|
[--github-access-token GITHUB_ACCESS_TOKEN] [--no-strip]
|
|
145
145
|
[--no-color] [--cert {system,certifi,none}] [-V]
|
|
146
|
-
{install,i,update,u,up,remove,r,rm,list,l,show,s,path,p,cache,c,uv,uvx} ...
|
|
146
|
+
{install,i,update,u,up,remove,r,rm,list,l,show,s,path,p,cache,c,man,m,uv,uvx} ...
|
|
147
147
|
|
|
148
148
|
Command line tool to download, install, and update pre-built Python versions
|
|
149
149
|
from the python-build-standalone project at https://github.com/astral-
|
|
@@ -183,7 +183,7 @@ options:
|
|
|
183
183
|
-V, --version just show pystand version
|
|
184
184
|
|
|
185
185
|
Commands:
|
|
186
|
-
{install,i,update,u,up,remove,r,rm,list,l,show,s,path,p,cache,c,uv,uvx}
|
|
186
|
+
{install,i,update,u,up,remove,r,rm,list,l,show,s,path,p,cache,c,man,m,uv,uvx}
|
|
187
187
|
install (i) Install one, more, or all versions from a python-
|
|
188
188
|
build-standalone release.
|
|
189
189
|
update (u, up) Update one, more, or all versions to another release.
|
|
@@ -193,6 +193,7 @@ Commands:
|
|
|
193
193
|
show (s) Show versions available from a release.
|
|
194
194
|
path (p) Show path prefix to installed version base directory.
|
|
195
195
|
cache (c) Show size of release download caches.
|
|
196
|
+
man (m) Show installed man page for latest or given version.
|
|
196
197
|
uv Run a uv command using a version of python installed
|
|
197
198
|
by pystand.
|
|
198
199
|
uvx Run a program using uvx and a version of python
|
|
@@ -372,6 +373,22 @@ options:
|
|
|
372
373
|
aliases: c
|
|
373
374
|
```
|
|
374
375
|
|
|
376
|
+
### Command `man`
|
|
377
|
+
|
|
378
|
+
```
|
|
379
|
+
usage: pystand man [-h] [version]
|
|
380
|
+
|
|
381
|
+
Show installed man page for latest or given version.
|
|
382
|
+
|
|
383
|
+
positional arguments:
|
|
384
|
+
version installed version to show man page for
|
|
385
|
+
|
|
386
|
+
options:
|
|
387
|
+
-h, --help show this help message and exit
|
|
388
|
+
|
|
389
|
+
aliases: m
|
|
390
|
+
```
|
|
391
|
+
|
|
375
392
|
### Command `uv`
|
|
376
393
|
|
|
377
394
|
```
|
|
@@ -45,6 +45,7 @@ SAMPL_RELEASE = '20260807'
|
|
|
45
45
|
|
|
46
46
|
PROG = Path(__file__).stem
|
|
47
47
|
HOME = Path.home()
|
|
48
|
+
MANPATH = Path('share', 'man', 'man1', 'python.1')
|
|
48
49
|
|
|
49
50
|
# Default distributions for various platforms
|
|
50
51
|
DISTRIBUTIONS = {
|
|
@@ -719,6 +720,18 @@ def compile_bytecode(srcdir: Path, tgtdir: Path) -> str | None:
|
|
|
719
720
|
return None
|
|
720
721
|
|
|
721
722
|
|
|
723
|
+
def ensure_manpage_link(vdir: Path) -> None:
|
|
724
|
+
"Ensure a symlink to the man page for this version exists"
|
|
725
|
+
manpath = vdir / MANPATH
|
|
726
|
+
if manpath.is_file():
|
|
727
|
+
return
|
|
728
|
+
|
|
729
|
+
for path in manpath.parent.iterdir():
|
|
730
|
+
if not path.is_symlink() and path.name.startswith('python'):
|
|
731
|
+
manpath.symlink_to(path.name)
|
|
732
|
+
break
|
|
733
|
+
|
|
734
|
+
|
|
722
735
|
def install_version(
|
|
723
736
|
args: Namespace, vdir: Path, release: str, distribution: str, files: dict[str, Any]
|
|
724
737
|
) -> str | None:
|
|
@@ -751,6 +764,7 @@ def install_version(
|
|
|
751
764
|
else:
|
|
752
765
|
remove_version(args, version)
|
|
753
766
|
tmpdir.replace(vdir)
|
|
767
|
+
ensure_manpage_link(vdir)
|
|
754
768
|
|
|
755
769
|
return error
|
|
756
770
|
|
|
@@ -977,6 +991,15 @@ def main() -> str | None:
|
|
|
977
991
|
except filelock.Timeout:
|
|
978
992
|
return f'ERROR: Another instance of {PROG} is already running.'
|
|
979
993
|
|
|
994
|
+
# If the command returned a tuple, treat it as a subprocess command to run
|
|
995
|
+
if isinstance(result, tuple):
|
|
996
|
+
try:
|
|
997
|
+
subprocess.run(result)
|
|
998
|
+
except Exception as e:
|
|
999
|
+
result = f'Error running command: {e}'
|
|
1000
|
+
else:
|
|
1001
|
+
result = None
|
|
1002
|
+
|
|
980
1003
|
return result
|
|
981
1004
|
|
|
982
1005
|
|
|
@@ -1548,6 +1571,34 @@ class cache:
|
|
|
1548
1571
|
show_cache_size(args._downloads, args)
|
|
1549
1572
|
|
|
1550
1573
|
|
|
1574
|
+
@Command
|
|
1575
|
+
class man:
|
|
1576
|
+
"Show installed man page for latest or given version."
|
|
1577
|
+
|
|
1578
|
+
aliases = ('m',)
|
|
1579
|
+
|
|
1580
|
+
@staticmethod
|
|
1581
|
+
def init(parser: ArgumentParser) -> None:
|
|
1582
|
+
parser.add_argument(
|
|
1583
|
+
'version', nargs='?', help='installed version to show man page for'
|
|
1584
|
+
)
|
|
1585
|
+
|
|
1586
|
+
@staticmethod
|
|
1587
|
+
def run(args: Namespace) -> str | tuple | None:
|
|
1588
|
+
if not (version := args.version):
|
|
1589
|
+
version = get_major_version(args)
|
|
1590
|
+
|
|
1591
|
+
vdir = (args._versions / version).resolve()
|
|
1592
|
+
if not vdir.exists():
|
|
1593
|
+
return f'Version {version} is not installed.'
|
|
1594
|
+
|
|
1595
|
+
man_path = (vdir / MANPATH).parent.parent
|
|
1596
|
+
if not man_path.is_dir():
|
|
1597
|
+
return f'No man page found for version {version}.'
|
|
1598
|
+
|
|
1599
|
+
return ('man', '-M', str(man_path), 'python')
|
|
1600
|
+
|
|
1601
|
+
|
|
1551
1602
|
@Command
|
|
1552
1603
|
class uv:
|
|
1553
1604
|
__doc__ = f'Run a uv command using a version of python installed by {PROG}.'
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|