pystand 1.9__py3-none-any.whl → 1.11__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.9.dist-info → pystand-1.11.dist-info}/METADATA +26 -10
- pystand-1.11.dist-info/RECORD +6 -0
- {pystand-1.9.dist-info → pystand-1.11.dist-info}/WHEEL +1 -1
- pystand.py +22 -9
- pystand-1.9.dist-info/RECORD +0 -6
- {pystand-1.9.dist-info → pystand-1.11.dist-info}/entry_points.txt +0 -0
- {pystand-1.9.dist-info → pystand-1.11.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.11
|
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
|
@@ -86,14 +86,17 @@ $ pystand list
|
|
86
86
|
Here are some examples showing how to use an installed version ..
|
87
87
|
|
88
88
|
```sh
|
89
|
-
# Use uv to create a virtual environment to be run with pystand
|
90
|
-
|
89
|
+
# Use uv to create a virtual environment to be run with latest pystand
|
90
|
+
# installed python:
|
91
|
+
$ uv venv -p $(pystand path) myenv
|
91
92
|
|
92
|
-
# Create a regular virtual environment to be run with pystand
|
93
|
-
|
93
|
+
# Create a regular virtual environment to be run with latest pystand
|
94
|
+
# installed python:
|
95
|
+
$ $(pystand path -p) -m venv myenv
|
94
96
|
|
95
|
-
# Use pipx to install a package to be run with pystand installed python
|
96
|
-
|
97
|
+
# Use pipx to install a package to be run with pystand installed python
|
98
|
+
# specific version:
|
99
|
+
$ pipx install --python $(pystand path -p 3.11) cowsay
|
97
100
|
```
|
98
101
|
|
99
102
|
See detailed usage information in the [Usage](#usage) section that
|
@@ -152,7 +155,7 @@ options:
|
|
152
155
|
rate limiting.
|
153
156
|
--no-strip do not use or create stripped binaries
|
154
157
|
--no-extra-strip do not restrip already stripped source binaries
|
155
|
-
-V
|
158
|
+
-V, --version just show pystand version
|
156
159
|
|
157
160
|
Commands:
|
158
161
|
{install,update,remove,list,show,path}
|
@@ -272,12 +275,13 @@ options:
|
|
272
275
|
### Command `path`
|
273
276
|
|
274
277
|
```
|
275
|
-
usage: pystand path [-h] [-p] version
|
278
|
+
usage: pystand path [-h] [-p] [version]
|
276
279
|
|
277
280
|
Show path prefix to installed version base directory.
|
278
281
|
|
279
282
|
positional arguments:
|
280
|
-
version version to return path for
|
283
|
+
version version to return path for, or latest installed version
|
284
|
+
if not specified
|
281
285
|
|
282
286
|
options:
|
283
287
|
-h, --help show this help message and exit
|
@@ -349,6 +353,18 @@ The global options: `--distribution`, `--base-dir`, `--cache-minutes`,
|
|
349
353
|
`--no-extra-strip` are the only sensible candidates to consider setting
|
350
354
|
as defaults.
|
351
355
|
|
356
|
+
## Github API Rate Limiting
|
357
|
+
|
358
|
+
This tool minimises and caches Github API responses from the
|
359
|
+
[`python-build-standalone`][pbs] repository. However, if you install
|
360
|
+
many different versions particularly across various releases, you may
|
361
|
+
get rate limited by Github so the command will block and you will see
|
362
|
+
"backoff" messages reported. You can create a Github access token to
|
363
|
+
gain increased rate limits. Create a token in your Github account under
|
364
|
+
`Settings -> Developer settings -> Personal access tokens`. Specify the
|
365
|
+
token on the command line with `--github-access-token`, or set that as a
|
366
|
+
[default option](#command-default-options).
|
367
|
+
|
352
368
|
## Command Line Tab Completion
|
353
369
|
|
354
370
|
Command line shell [tab
|
@@ -0,0 +1,6 @@
|
|
1
|
+
pystand.py,sha256=HuCNuIYwXUcVCpAzqtEEj9hdMn-S4j4F7t8yYfNuYeU,32048
|
2
|
+
pystand-1.11.dist-info/METADATA,sha256=6NYVL_gVjjOT0kvk66KNUFfXlRU-KuGo5HBzuO16w0g,15923
|
3
|
+
pystand-1.11.dist-info/WHEEL,sha256=GV9aMThwP_4oNCtvEC2ec3qUYutgWeAzklro_0m4WJQ,91
|
4
|
+
pystand-1.11.dist-info/entry_points.txt,sha256=DG4ps3I3nni1bubV1tXs6u8FARgkdbAYaEAzZD4RAo8,41
|
5
|
+
pystand-1.11.dist-info/top_level.txt,sha256=NoWUh19UQymAJLHTCdxMnVwV6Teftef5fzyF3OWLyNY,8
|
6
|
+
pystand-1.11.dist-info/RECORD,,
|
pystand.py
CHANGED
@@ -141,8 +141,17 @@ class VersionMatcher:
|
|
141
141
|
def __init__(self, seq: Iterable[str]) -> None:
|
142
142
|
self.seq = sorted(seq, key=parse_version, reverse=True)
|
143
143
|
|
144
|
-
def match(self, version: str
|
144
|
+
def match(self, version: str | None, *,
|
145
|
+
upgrade: bool = False) -> str | None:
|
145
146
|
'Return full version string given a [possibly] part version prefix'
|
147
|
+
|
148
|
+
# If no version specified, return the latest release version
|
149
|
+
if not version:
|
150
|
+
for version in self.seq:
|
151
|
+
if is_release_version(version):
|
152
|
+
return version
|
153
|
+
return None
|
154
|
+
|
146
155
|
if version in self.seq:
|
147
156
|
return version
|
148
157
|
|
@@ -520,8 +529,8 @@ def main() -> str | None:
|
|
520
529
|
help='do not use or create stripped binaries')
|
521
530
|
opt.add_argument('--no-extra-strip', action='store_true',
|
522
531
|
help='do not restrip already stripped source binaries')
|
523
|
-
opt.add_argument('-V', action='store_true',
|
524
|
-
help=f'show {PROG} version')
|
532
|
+
opt.add_argument('-V', '--version', action='store_true',
|
533
|
+
help=f'just show {PROG} version')
|
525
534
|
cmd = opt.add_subparsers(title='Commands', dest='cmdname')
|
526
535
|
|
527
536
|
# Add each command ..
|
@@ -560,12 +569,12 @@ def main() -> str | None:
|
|
560
569
|
|
561
570
|
args = opt.parse_args(shlex.split(cnflines) + sys.argv[1:])
|
562
571
|
|
563
|
-
if args.V:
|
564
|
-
print(get_version())
|
565
|
-
|
566
572
|
if 'func' not in args:
|
567
|
-
if
|
568
|
-
|
573
|
+
if args.version:
|
574
|
+
print(get_version())
|
575
|
+
return None
|
576
|
+
|
577
|
+
opt.print_help()
|
569
578
|
return None
|
570
579
|
|
571
580
|
distribution = args.distribution or distro_default
|
@@ -830,12 +839,16 @@ class _path(COMMAND):
|
|
830
839
|
def init(parser: ArgumentParser) -> None:
|
831
840
|
parser.add_argument('-p', '--python-path', action='store_true',
|
832
841
|
help='return full path to python executable')
|
833
|
-
parser.add_argument('version',
|
842
|
+
parser.add_argument('version', nargs='?',
|
843
|
+
help='version to return path for, or latest '
|
844
|
+
'installed version if not specified')
|
834
845
|
|
835
846
|
@staticmethod
|
836
847
|
def run(args: Namespace) -> str | None:
|
837
848
|
matcher = VersionMatcher([f.name for f in iter_versions(args)])
|
838
849
|
version = matcher.match(args.version) or args.version
|
850
|
+
if not version:
|
851
|
+
return f'No Python version installed.'
|
839
852
|
path = args._versions / version
|
840
853
|
if not path.is_dir():
|
841
854
|
return f'Version "{version}" is not installed.'
|
pystand-1.9.dist-info/RECORD
DELETED
@@ -1,6 +0,0 @@
|
|
1
|
-
pystand.py,sha256=MtVQfHakq71D_-O_56508AJAvS67LsouV7JDR4no86E,31568
|
2
|
-
pystand-1.9.dist-info/METADATA,sha256=KnR67QfaY5HxJ2t5ddCWHGXs0hz-rm9YzVvPQ0oTLZw,15191
|
3
|
-
pystand-1.9.dist-info/WHEEL,sha256=cVxcB9AmuTcXqmwrtPhNK88dr7IR_b6qagTj0UvIEbY,91
|
4
|
-
pystand-1.9.dist-info/entry_points.txt,sha256=DG4ps3I3nni1bubV1tXs6u8FARgkdbAYaEAzZD4RAo8,41
|
5
|
-
pystand-1.9.dist-info/top_level.txt,sha256=NoWUh19UQymAJLHTCdxMnVwV6Teftef5fzyF3OWLyNY,8
|
6
|
-
pystand-1.9.dist-info/RECORD,,
|
File without changes
|
File without changes
|