pystand 2.3__tar.gz → 2.4__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pystand
3
- Version: 2.3
3
+ Version: 2.4
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
@@ -140,9 +140,9 @@ https://github.com/indygreg/python-build-standalone.
140
140
  options:
141
141
  -h, --help show this help message and exit
142
142
  -D DISTRIBUTION, --distribution DISTRIBUTION
143
- python-build-standalone distribution. Default is auto-
144
- detected (detected as "x86_64-unknown-linux-gnu-
145
- install_only_stripped" for this current host).
143
+ python-build-standalone distribution. Default is
144
+ "x86_64-unknown-linux-gnu-install_only_stripped" for
145
+ this host.
146
146
  -P PREFIX_DIR, --prefix-dir PREFIX_DIR
147
147
  specify prefix dir for storing versions. Default is
148
148
  "$HOME/.local/share/pystand"
@@ -264,18 +264,21 @@ options:
264
264
  ### Command `show`
265
265
 
266
266
  ```
267
- usage: pystand show [-h] [-a] [release]
267
+ usage: pystand show [-h] [-r RELEASE] [-a] [re_match]
268
268
 
269
269
  Show versions available from a release.
270
270
 
271
271
  positional arguments:
272
- release python-build-standalone YYYYMMDD release to show (e.g.
273
- 20240415), default is latest release
272
+ re_match show only versions+distributions matching this regular
273
+ expression pattern
274
274
 
275
275
  options:
276
- -h, --help show this help message and exit
277
- -a, --all also show all available distributions for each version from the
278
- release
276
+ -h, --help show this help message and exit
277
+ -r RELEASE, --release RELEASE
278
+ python-build-standalone YYYYMMDD release to show (e.g.
279
+ 20240415), default is latest release
280
+ -a, --all show all available distributions for each version from
281
+ the release
279
282
  ```
280
283
 
281
284
  ### Command `path`
@@ -320,35 +323,6 @@ To uninstall:
320
323
  $ pipx uninstall pystand
321
324
  ```
322
325
 
323
- ## Installing Other Builds/Distributions
324
-
325
- The _`install_only_stripped`_ build of each distribution is installed by
326
- default. See description of distributions/builds
327
- [here](https://gregoryszorc.com/docs/python-build-standalone/main/running.html#obtaining-distributions).
328
- However, you can choose to install other distributions/builds. E.g. If
329
- we use a standard modern Linux x86_64 machine as an example, the default
330
- distribution is _`x86_64-unknown-linux-gnu-install_only_stripped`_ and
331
- the versions for these are installed by default at
332
- `~/.local/share/pystand/<version>`.
333
-
334
- However, let's say you want to experiment with the new free-threaded
335
- 3.13 build, installed to a different directory. E.g.:
336
-
337
- ```sh
338
- $ mkdir ./3.13-freethreaded
339
- $ cd ./3.13-freethreaded
340
-
341
- $ pystand -P. -D x86_64-unknown-linux-gnu-freethreaded+lto-full install 3.13
342
- $ ./3.13/bin/python -V
343
- Python 3.13.0
344
-
345
- $ pystand -P . list
346
- 3.13.0 @ 20241016 distribution="x86_64_v4-unknown-linux-gnu-freethreaded+lto-full"
347
- ```
348
-
349
- Note you can set a different default distribution by specifying
350
- `--distribution` as a [default option](#command-default-options).
351
-
352
326
  ## Extrapolation of Python Versions
353
327
 
354
328
  For all commands except the `path` command, `pystand` extrapolates
@@ -407,6 +381,150 @@ $ uv venv -p $(pystand path 3.12.2)
407
381
  $ uv venv -p $(pystand path -r 3.12)
408
382
  ```
409
383
 
384
+ ## Installing Other Builds/Distributions
385
+
386
+ The _`install_only_stripped`_ distribution build is installed by default
387
+ for your running machine architecture. See description of
388
+ distributions/builds
389
+ [here](https://gregoryszorc.com/docs/python-build-standalone/main/running.html#obtaining-distributions).
390
+ However, you can choose to install other distributions/builds (even for
391
+ other architectures). E.g. If we use a standard modern Linux x86_64
392
+ machine as an example, the default distribution is
393
+ _`x86_64-unknown-linux-gnu-install_only_stripped`_ and the versions for
394
+ these are installed by default at `~/.local/share/pystand/<version>`.
395
+
396
+ However, let's say you want to experiment with the new free-threaded
397
+ 3.13 build, installed to a different directory. E.g.:
398
+
399
+ ```sh
400
+ $ mkdir ./3.13-freethreaded
401
+ $ cd ./3.13-freethreaded
402
+
403
+ $ pystand -P. -D x86_64-unknown-linux-gnu-freethreaded+lto-full install 3.13
404
+ $ ./3.13/bin/python -V
405
+ Python 3.13.0
406
+
407
+ $ pystand -P . list
408
+ 3.13.0 @ 20241016 distribution="x86_64_v4-unknown-linux-gnu-freethreaded+lto-full"
409
+ ```
410
+
411
+ Note you can set a different default distribution by specifying
412
+ `--distribution` as a [default option](#command-default-options).
413
+
414
+ ### Searching for Available Versions and Distributions
415
+
416
+ The `show` command can be used to search for distributions as seen in the
417
+ following examples.
418
+
419
+ ```sh
420
+
421
+ List all the versions installed on this system (at the default location):
422
+
423
+ ```sh
424
+ $ pystand list
425
+ 3.8.20 @ 20241002 distribution="x86_64-unknown-linux-gnu-install_only_stripped"
426
+ 3.9.20 @ 20241016 distribution="x86_64-unknown-linux-gnu-install_only_stripped"
427
+ 3.12.7 @ 20241016 distribution="x86_64-unknown-linux-gnu-install_only_stripped"
428
+ 3.13.0 @ 20241016 distribution="x86_64-unknown-linux-gnu-install_only_stripped"
429
+ ```
430
+
431
+ The above shows versions 3.9, 3.12, and 3.13 are installed from the latest
432
+ release 20241016. Version 3.8 is installed from the previous release
433
+ 20241002 (and is not available in the latest release otherwise it would
434
+ be shown with an update message).
435
+
436
+ Now show all available versions from the latest release:
437
+
438
+ ```sh
439
+ $ pystand show
440
+ 3.9.20 @ 20241016 distribution="x86_64-unknown-linux-gnu-install_only_stripped" (installed)
441
+ 3.10.15 @ 20241016 distribution="x86_64-unknown-linux-gnu-install_only_stripped"
442
+ 3.11.10 @ 20241016 distribution="x86_64-unknown-linux-gnu-install_only_stripped"
443
+ 3.12.7 @ 20241016 distribution="x86_64-unknown-linux-gnu-install_only_stripped" (installed)
444
+ 3.13.0 @ 20241016 distribution="x86_64-unknown-linux-gnu-install_only_stripped" (installed)
445
+ ```
446
+
447
+ We can see that versions 3.9, 3.12, and 3.13 are already installed (as
448
+ we also knew from list output), and that 3.10 and 3.11 are also available.
449
+
450
+ What is available from the previous release 20241002?
451
+
452
+ ```sh
453
+ $ pystand show -r 20241002
454
+ 3.8.20 @ 20241002 distribution="x86_64-unknown-linux-gnu-install_only_stripped" (installed)
455
+ 3.9.20 @ 20241002 distribution="x86_64-unknown-linux-gnu-install_only_stripped"
456
+ 3.10.15 @ 20241002 distribution="x86_64-unknown-linux-gnu-install_only_stripped"
457
+ 3.11.10 @ 20241002 distribution="x86_64-unknown-linux-gnu-install_only_stripped"
458
+ 3.12.7 @ 20241002 distribution="x86_64-unknown-linux-gnu-install_only_stripped"
459
+ 3.13.0rc3 @ 20241002 distribution="x86_64-unknown-linux-gnu-install_only_stripped"
460
+ ```
461
+
462
+ Let's install one of the threaded builds of Python 3.13. We can use the
463
+ `-a/-all` option to show all available distributions and then give the
464
+ `show` command a [regular
465
+ expression](https://en.wikipedia.org/wiki/Regular_expression) to filter
466
+ the output (this is really just a shorthand for piping the output of
467
+ `show -a` to grep). E.g.:
468
+
469
+ ```sh
470
+ $ pystand show -a 3.13.*x86_64.*unknown-linux-gnu.*thread
471
+ 3.13.0 @ 20241016 distribution="x86_64-unknown-linux-gnu-freethreaded+debug-full"
472
+ 3.13.0 @ 20241016 distribution="x86_64-unknown-linux-gnu-freethreaded+pgo+lto-full"
473
+ 3.13.0 @ 20241016 distribution="x86_64-unknown-linux-gnu-freethreaded+pgo-full"
474
+ 3.13.0 @ 20241016 distribution="x86_64_v2-unknown-linux-gnu-freethreaded+debug-full"
475
+ 3.13.0 @ 20241016 distribution="x86_64_v2-unknown-linux-gnu-freethreaded+pgo+lto-full"
476
+ 3.13.0 @ 20241016 distribution="x86_64_v2-unknown-linux-gnu-freethreaded+pgo-full"
477
+ 3.13.0 @ 20241016 distribution="x86_64_v3-unknown-linux-gnu-freethreaded+debug-full"
478
+ 3.13.0 @ 20241016 distribution="x86_64_v3-unknown-linux-gnu-freethreaded+pgo+lto-full"
479
+ 3.13.0 @ 20241016 distribution="x86_64_v3-unknown-linux-gnu-freethreaded+pgo-full"
480
+ 3.13.0 @ 20241016 distribution="x86_64_v4-unknown-linux-gnu-freethreaded+debug-full"
481
+ 3.13.0 @ 20241016 distribution="x86_64_v4-unknown-linux-gnu-freethreaded+lto-full"
482
+ 3.13.0 @ 20241016 distribution="x86_64_v4-unknown-linux-gnu-freethreaded+noopt-full"
483
+ ```
484
+
485
+ So let's install the
486
+ `x86_64_v3-unknown-linux-gnu-freethreaded+pgo+lto-full` build of Python
487
+ 3.13 (to the default location):
488
+
489
+ ```sh
490
+ $ pystand -D x86_64_v3-unknown-linux-gnu-freethreaded+pgo+lto-full install 3.13
491
+ Version "3.13.0" is already installed.
492
+ ```
493
+
494
+ An error is given because the version is already installed. We can
495
+ overwrite that with the `-f/--force` option:
496
+
497
+ ```sh
498
+ $ pystand -D x86_64_v3-unknown-linux-gnu-freethreaded+pgo+lto-full install -f 3.13
499
+ Version 3.13.0 @ 20241016 installed.
500
+ ```
501
+
502
+ Now we can see the new version distribution is installed:
503
+
504
+ ```sh
505
+
506
+ $ pystand list
507
+ 3.8.20 @ 20241002 distribution="x86_64-unknown-linux-gnu-install_only_stripped"
508
+ 3.9.20 @ 20241016 distribution="x86_64-unknown-linux-gnu-install_only_stripped"
509
+ 3.12.7 @ 20241016 distribution="x86_64-unknown-linux-gnu-install_only_stripped"
510
+ 3.13.0 @ 20241016 distribution="x86_64_v3-unknown-linux-gnu-freethreaded+pgo+lto-full"
511
+
512
+ $ pystand show
513
+ 3.9.20 @ 20241016 distribution="x86_64-unknown-linux-gnu-install_only_stripped" (installed)
514
+ 3.10.15 @ 20241016 distribution="x86_64-unknown-linux-gnu-install_only_stripped"
515
+ 3.11.10 @ 20241016 distribution="x86_64-unknown-linux-gnu-install_only_stripped"
516
+ 3.12.7 @ 20241016 distribution="x86_64-unknown-linux-gnu-install_only_stripped" (installed)
517
+ 3.13.0 @ 20241016 distribution="x86_64-unknown-linux-gnu-install_only_stripped"
518
+ 3.13.0 @ 20241016 distribution="x86_64_v3-unknown-linux-gnu-freethreaded+pgo+lto-full" (installed)
519
+ ```
520
+
521
+ Note that `pystand` caches all downloaded files (at least for a period
522
+ specified by `--purge-days`) so you can easily switch between different
523
+ versions/distributions quite quickly. You can also choose to install any
524
+ distribution/build in a specific directory using the `-P/--prefix-dir`
525
+ global option if you want to keep different distributions separate and
526
+ available in parallel.
527
+
410
528
  ## Command Default Options
411
529
 
412
530
  You can add default global options to a personal configuration file
@@ -423,11 +541,11 @@ as defaults.
423
541
 
424
542
  ## Github API Rate Limiting
425
543
 
426
- This tool minimises and caches Github API responses from the
427
- [`python-build-standalone`][pbs] repository. However, if you install
428
- many different versions particularly across various releases, you may
429
- get rate limited by Github so the command will block and you will see
430
- "backoff" messages reported. You can create a Github access token to
544
+ This tool minimises and caches Github API responses and file downloads
545
+ from the [`python-build-standalone`][pbs] repository. However, if you
546
+ install many different versions particularly across various releases,
547
+ you may get rate limited by Github so the command can block and you will
548
+ see "backoff" messages reported. You can create a Github access token to
431
549
  gain increased rate limits. Create a token in your Github account under
432
550
  `Settings -> Developer settings -> Personal access tokens`. Specify the
433
551
  token on the command line with `--github-access-token`, or set that as a
@@ -123,9 +123,9 @@ https://github.com/indygreg/python-build-standalone.
123
123
  options:
124
124
  -h, --help show this help message and exit
125
125
  -D DISTRIBUTION, --distribution DISTRIBUTION
126
- python-build-standalone distribution. Default is auto-
127
- detected (detected as "x86_64-unknown-linux-gnu-
128
- install_only_stripped" for this current host).
126
+ python-build-standalone distribution. Default is
127
+ "x86_64-unknown-linux-gnu-install_only_stripped" for
128
+ this host.
129
129
  -P PREFIX_DIR, --prefix-dir PREFIX_DIR
130
130
  specify prefix dir for storing versions. Default is
131
131
  "$HOME/.local/share/pystand"
@@ -247,18 +247,21 @@ options:
247
247
  ### Command `show`
248
248
 
249
249
  ```
250
- usage: pystand show [-h] [-a] [release]
250
+ usage: pystand show [-h] [-r RELEASE] [-a] [re_match]
251
251
 
252
252
  Show versions available from a release.
253
253
 
254
254
  positional arguments:
255
- release python-build-standalone YYYYMMDD release to show (e.g.
256
- 20240415), default is latest release
255
+ re_match show only versions+distributions matching this regular
256
+ expression pattern
257
257
 
258
258
  options:
259
- -h, --help show this help message and exit
260
- -a, --all also show all available distributions for each version from the
261
- release
259
+ -h, --help show this help message and exit
260
+ -r RELEASE, --release RELEASE
261
+ python-build-standalone YYYYMMDD release to show (e.g.
262
+ 20240415), default is latest release
263
+ -a, --all show all available distributions for each version from
264
+ the release
262
265
  ```
263
266
 
264
267
  ### Command `path`
@@ -303,35 +306,6 @@ To uninstall:
303
306
  $ pipx uninstall pystand
304
307
  ```
305
308
 
306
- ## Installing Other Builds/Distributions
307
-
308
- The _`install_only_stripped`_ build of each distribution is installed by
309
- default. See description of distributions/builds
310
- [here](https://gregoryszorc.com/docs/python-build-standalone/main/running.html#obtaining-distributions).
311
- However, you can choose to install other distributions/builds. E.g. If
312
- we use a standard modern Linux x86_64 machine as an example, the default
313
- distribution is _`x86_64-unknown-linux-gnu-install_only_stripped`_ and
314
- the versions for these are installed by default at
315
- `~/.local/share/pystand/<version>`.
316
-
317
- However, let's say you want to experiment with the new free-threaded
318
- 3.13 build, installed to a different directory. E.g.:
319
-
320
- ```sh
321
- $ mkdir ./3.13-freethreaded
322
- $ cd ./3.13-freethreaded
323
-
324
- $ pystand -P. -D x86_64-unknown-linux-gnu-freethreaded+lto-full install 3.13
325
- $ ./3.13/bin/python -V
326
- Python 3.13.0
327
-
328
- $ pystand -P . list
329
- 3.13.0 @ 20241016 distribution="x86_64_v4-unknown-linux-gnu-freethreaded+lto-full"
330
- ```
331
-
332
- Note you can set a different default distribution by specifying
333
- `--distribution` as a [default option](#command-default-options).
334
-
335
309
  ## Extrapolation of Python Versions
336
310
 
337
311
  For all commands except the `path` command, `pystand` extrapolates
@@ -390,6 +364,150 @@ $ uv venv -p $(pystand path 3.12.2)
390
364
  $ uv venv -p $(pystand path -r 3.12)
391
365
  ```
392
366
 
367
+ ## Installing Other Builds/Distributions
368
+
369
+ The _`install_only_stripped`_ distribution build is installed by default
370
+ for your running machine architecture. See description of
371
+ distributions/builds
372
+ [here](https://gregoryszorc.com/docs/python-build-standalone/main/running.html#obtaining-distributions).
373
+ However, you can choose to install other distributions/builds (even for
374
+ other architectures). E.g. If we use a standard modern Linux x86_64
375
+ machine as an example, the default distribution is
376
+ _`x86_64-unknown-linux-gnu-install_only_stripped`_ and the versions for
377
+ these are installed by default at `~/.local/share/pystand/<version>`.
378
+
379
+ However, let's say you want to experiment with the new free-threaded
380
+ 3.13 build, installed to a different directory. E.g.:
381
+
382
+ ```sh
383
+ $ mkdir ./3.13-freethreaded
384
+ $ cd ./3.13-freethreaded
385
+
386
+ $ pystand -P. -D x86_64-unknown-linux-gnu-freethreaded+lto-full install 3.13
387
+ $ ./3.13/bin/python -V
388
+ Python 3.13.0
389
+
390
+ $ pystand -P . list
391
+ 3.13.0 @ 20241016 distribution="x86_64_v4-unknown-linux-gnu-freethreaded+lto-full"
392
+ ```
393
+
394
+ Note you can set a different default distribution by specifying
395
+ `--distribution` as a [default option](#command-default-options).
396
+
397
+ ### Searching for Available Versions and Distributions
398
+
399
+ The `show` command can be used to search for distributions as seen in the
400
+ following examples.
401
+
402
+ ```sh
403
+
404
+ List all the versions installed on this system (at the default location):
405
+
406
+ ```sh
407
+ $ pystand list
408
+ 3.8.20 @ 20241002 distribution="x86_64-unknown-linux-gnu-install_only_stripped"
409
+ 3.9.20 @ 20241016 distribution="x86_64-unknown-linux-gnu-install_only_stripped"
410
+ 3.12.7 @ 20241016 distribution="x86_64-unknown-linux-gnu-install_only_stripped"
411
+ 3.13.0 @ 20241016 distribution="x86_64-unknown-linux-gnu-install_only_stripped"
412
+ ```
413
+
414
+ The above shows versions 3.9, 3.12, and 3.13 are installed from the latest
415
+ release 20241016. Version 3.8 is installed from the previous release
416
+ 20241002 (and is not available in the latest release otherwise it would
417
+ be shown with an update message).
418
+
419
+ Now show all available versions from the latest release:
420
+
421
+ ```sh
422
+ $ pystand show
423
+ 3.9.20 @ 20241016 distribution="x86_64-unknown-linux-gnu-install_only_stripped" (installed)
424
+ 3.10.15 @ 20241016 distribution="x86_64-unknown-linux-gnu-install_only_stripped"
425
+ 3.11.10 @ 20241016 distribution="x86_64-unknown-linux-gnu-install_only_stripped"
426
+ 3.12.7 @ 20241016 distribution="x86_64-unknown-linux-gnu-install_only_stripped" (installed)
427
+ 3.13.0 @ 20241016 distribution="x86_64-unknown-linux-gnu-install_only_stripped" (installed)
428
+ ```
429
+
430
+ We can see that versions 3.9, 3.12, and 3.13 are already installed (as
431
+ we also knew from list output), and that 3.10 and 3.11 are also available.
432
+
433
+ What is available from the previous release 20241002?
434
+
435
+ ```sh
436
+ $ pystand show -r 20241002
437
+ 3.8.20 @ 20241002 distribution="x86_64-unknown-linux-gnu-install_only_stripped" (installed)
438
+ 3.9.20 @ 20241002 distribution="x86_64-unknown-linux-gnu-install_only_stripped"
439
+ 3.10.15 @ 20241002 distribution="x86_64-unknown-linux-gnu-install_only_stripped"
440
+ 3.11.10 @ 20241002 distribution="x86_64-unknown-linux-gnu-install_only_stripped"
441
+ 3.12.7 @ 20241002 distribution="x86_64-unknown-linux-gnu-install_only_stripped"
442
+ 3.13.0rc3 @ 20241002 distribution="x86_64-unknown-linux-gnu-install_only_stripped"
443
+ ```
444
+
445
+ Let's install one of the threaded builds of Python 3.13. We can use the
446
+ `-a/-all` option to show all available distributions and then give the
447
+ `show` command a [regular
448
+ expression](https://en.wikipedia.org/wiki/Regular_expression) to filter
449
+ the output (this is really just a shorthand for piping the output of
450
+ `show -a` to grep). E.g.:
451
+
452
+ ```sh
453
+ $ pystand show -a 3.13.*x86_64.*unknown-linux-gnu.*thread
454
+ 3.13.0 @ 20241016 distribution="x86_64-unknown-linux-gnu-freethreaded+debug-full"
455
+ 3.13.0 @ 20241016 distribution="x86_64-unknown-linux-gnu-freethreaded+pgo+lto-full"
456
+ 3.13.0 @ 20241016 distribution="x86_64-unknown-linux-gnu-freethreaded+pgo-full"
457
+ 3.13.0 @ 20241016 distribution="x86_64_v2-unknown-linux-gnu-freethreaded+debug-full"
458
+ 3.13.0 @ 20241016 distribution="x86_64_v2-unknown-linux-gnu-freethreaded+pgo+lto-full"
459
+ 3.13.0 @ 20241016 distribution="x86_64_v2-unknown-linux-gnu-freethreaded+pgo-full"
460
+ 3.13.0 @ 20241016 distribution="x86_64_v3-unknown-linux-gnu-freethreaded+debug-full"
461
+ 3.13.0 @ 20241016 distribution="x86_64_v3-unknown-linux-gnu-freethreaded+pgo+lto-full"
462
+ 3.13.0 @ 20241016 distribution="x86_64_v3-unknown-linux-gnu-freethreaded+pgo-full"
463
+ 3.13.0 @ 20241016 distribution="x86_64_v4-unknown-linux-gnu-freethreaded+debug-full"
464
+ 3.13.0 @ 20241016 distribution="x86_64_v4-unknown-linux-gnu-freethreaded+lto-full"
465
+ 3.13.0 @ 20241016 distribution="x86_64_v4-unknown-linux-gnu-freethreaded+noopt-full"
466
+ ```
467
+
468
+ So let's install the
469
+ `x86_64_v3-unknown-linux-gnu-freethreaded+pgo+lto-full` build of Python
470
+ 3.13 (to the default location):
471
+
472
+ ```sh
473
+ $ pystand -D x86_64_v3-unknown-linux-gnu-freethreaded+pgo+lto-full install 3.13
474
+ Version "3.13.0" is already installed.
475
+ ```
476
+
477
+ An error is given because the version is already installed. We can
478
+ overwrite that with the `-f/--force` option:
479
+
480
+ ```sh
481
+ $ pystand -D x86_64_v3-unknown-linux-gnu-freethreaded+pgo+lto-full install -f 3.13
482
+ Version 3.13.0 @ 20241016 installed.
483
+ ```
484
+
485
+ Now we can see the new version distribution is installed:
486
+
487
+ ```sh
488
+
489
+ $ pystand list
490
+ 3.8.20 @ 20241002 distribution="x86_64-unknown-linux-gnu-install_only_stripped"
491
+ 3.9.20 @ 20241016 distribution="x86_64-unknown-linux-gnu-install_only_stripped"
492
+ 3.12.7 @ 20241016 distribution="x86_64-unknown-linux-gnu-install_only_stripped"
493
+ 3.13.0 @ 20241016 distribution="x86_64_v3-unknown-linux-gnu-freethreaded+pgo+lto-full"
494
+
495
+ $ pystand show
496
+ 3.9.20 @ 20241016 distribution="x86_64-unknown-linux-gnu-install_only_stripped" (installed)
497
+ 3.10.15 @ 20241016 distribution="x86_64-unknown-linux-gnu-install_only_stripped"
498
+ 3.11.10 @ 20241016 distribution="x86_64-unknown-linux-gnu-install_only_stripped"
499
+ 3.12.7 @ 20241016 distribution="x86_64-unknown-linux-gnu-install_only_stripped" (installed)
500
+ 3.13.0 @ 20241016 distribution="x86_64-unknown-linux-gnu-install_only_stripped"
501
+ 3.13.0 @ 20241016 distribution="x86_64_v3-unknown-linux-gnu-freethreaded+pgo+lto-full" (installed)
502
+ ```
503
+
504
+ Note that `pystand` caches all downloaded files (at least for a period
505
+ specified by `--purge-days`) so you can easily switch between different
506
+ versions/distributions quite quickly. You can also choose to install any
507
+ distribution/build in a specific directory using the `-P/--prefix-dir`
508
+ global option if you want to keep different distributions separate and
509
+ available in parallel.
510
+
393
511
  ## Command Default Options
394
512
 
395
513
  You can add default global options to a personal configuration file
@@ -406,11 +524,11 @@ as defaults.
406
524
 
407
525
  ## Github API Rate Limiting
408
526
 
409
- This tool minimises and caches Github API responses from the
410
- [`python-build-standalone`][pbs] repository. However, if you install
411
- many different versions particularly across various releases, you may
412
- get rate limited by Github so the command will block and you will see
413
- "backoff" messages reported. You can create a Github access token to
527
+ This tool minimises and caches Github API responses and file downloads
528
+ from the [`python-build-standalone`][pbs] repository. However, if you
529
+ install many different versions particularly across various releases,
530
+ you may get rate limited by Github so the command can block and you will
531
+ see "backoff" messages reported. You can create a Github access token to
414
532
  gain increased rate limits. Create a token in your Github account under
415
533
  `Settings -> Developer settings -> Personal access tokens`. Specify the
416
534
  token on the command line with `--github-access-token`, or set that as a
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pystand
3
- Version: 2.3
3
+ Version: 2.4
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
@@ -140,9 +140,9 @@ https://github.com/indygreg/python-build-standalone.
140
140
  options:
141
141
  -h, --help show this help message and exit
142
142
  -D DISTRIBUTION, --distribution DISTRIBUTION
143
- python-build-standalone distribution. Default is auto-
144
- detected (detected as "x86_64-unknown-linux-gnu-
145
- install_only_stripped" for this current host).
143
+ python-build-standalone distribution. Default is
144
+ "x86_64-unknown-linux-gnu-install_only_stripped" for
145
+ this host.
146
146
  -P PREFIX_DIR, --prefix-dir PREFIX_DIR
147
147
  specify prefix dir for storing versions. Default is
148
148
  "$HOME/.local/share/pystand"
@@ -264,18 +264,21 @@ options:
264
264
  ### Command `show`
265
265
 
266
266
  ```
267
- usage: pystand show [-h] [-a] [release]
267
+ usage: pystand show [-h] [-r RELEASE] [-a] [re_match]
268
268
 
269
269
  Show versions available from a release.
270
270
 
271
271
  positional arguments:
272
- release python-build-standalone YYYYMMDD release to show (e.g.
273
- 20240415), default is latest release
272
+ re_match show only versions+distributions matching this regular
273
+ expression pattern
274
274
 
275
275
  options:
276
- -h, --help show this help message and exit
277
- -a, --all also show all available distributions for each version from the
278
- release
276
+ -h, --help show this help message and exit
277
+ -r RELEASE, --release RELEASE
278
+ python-build-standalone YYYYMMDD release to show (e.g.
279
+ 20240415), default is latest release
280
+ -a, --all show all available distributions for each version from
281
+ the release
279
282
  ```
280
283
 
281
284
  ### Command `path`
@@ -320,35 +323,6 @@ To uninstall:
320
323
  $ pipx uninstall pystand
321
324
  ```
322
325
 
323
- ## Installing Other Builds/Distributions
324
-
325
- The _`install_only_stripped`_ build of each distribution is installed by
326
- default. See description of distributions/builds
327
- [here](https://gregoryszorc.com/docs/python-build-standalone/main/running.html#obtaining-distributions).
328
- However, you can choose to install other distributions/builds. E.g. If
329
- we use a standard modern Linux x86_64 machine as an example, the default
330
- distribution is _`x86_64-unknown-linux-gnu-install_only_stripped`_ and
331
- the versions for these are installed by default at
332
- `~/.local/share/pystand/<version>`.
333
-
334
- However, let's say you want to experiment with the new free-threaded
335
- 3.13 build, installed to a different directory. E.g.:
336
-
337
- ```sh
338
- $ mkdir ./3.13-freethreaded
339
- $ cd ./3.13-freethreaded
340
-
341
- $ pystand -P. -D x86_64-unknown-linux-gnu-freethreaded+lto-full install 3.13
342
- $ ./3.13/bin/python -V
343
- Python 3.13.0
344
-
345
- $ pystand -P . list
346
- 3.13.0 @ 20241016 distribution="x86_64_v4-unknown-linux-gnu-freethreaded+lto-full"
347
- ```
348
-
349
- Note you can set a different default distribution by specifying
350
- `--distribution` as a [default option](#command-default-options).
351
-
352
326
  ## Extrapolation of Python Versions
353
327
 
354
328
  For all commands except the `path` command, `pystand` extrapolates
@@ -407,6 +381,150 @@ $ uv venv -p $(pystand path 3.12.2)
407
381
  $ uv venv -p $(pystand path -r 3.12)
408
382
  ```
409
383
 
384
+ ## Installing Other Builds/Distributions
385
+
386
+ The _`install_only_stripped`_ distribution build is installed by default
387
+ for your running machine architecture. See description of
388
+ distributions/builds
389
+ [here](https://gregoryszorc.com/docs/python-build-standalone/main/running.html#obtaining-distributions).
390
+ However, you can choose to install other distributions/builds (even for
391
+ other architectures). E.g. If we use a standard modern Linux x86_64
392
+ machine as an example, the default distribution is
393
+ _`x86_64-unknown-linux-gnu-install_only_stripped`_ and the versions for
394
+ these are installed by default at `~/.local/share/pystand/<version>`.
395
+
396
+ However, let's say you want to experiment with the new free-threaded
397
+ 3.13 build, installed to a different directory. E.g.:
398
+
399
+ ```sh
400
+ $ mkdir ./3.13-freethreaded
401
+ $ cd ./3.13-freethreaded
402
+
403
+ $ pystand -P. -D x86_64-unknown-linux-gnu-freethreaded+lto-full install 3.13
404
+ $ ./3.13/bin/python -V
405
+ Python 3.13.0
406
+
407
+ $ pystand -P . list
408
+ 3.13.0 @ 20241016 distribution="x86_64_v4-unknown-linux-gnu-freethreaded+lto-full"
409
+ ```
410
+
411
+ Note you can set a different default distribution by specifying
412
+ `--distribution` as a [default option](#command-default-options).
413
+
414
+ ### Searching for Available Versions and Distributions
415
+
416
+ The `show` command can be used to search for distributions as seen in the
417
+ following examples.
418
+
419
+ ```sh
420
+
421
+ List all the versions installed on this system (at the default location):
422
+
423
+ ```sh
424
+ $ pystand list
425
+ 3.8.20 @ 20241002 distribution="x86_64-unknown-linux-gnu-install_only_stripped"
426
+ 3.9.20 @ 20241016 distribution="x86_64-unknown-linux-gnu-install_only_stripped"
427
+ 3.12.7 @ 20241016 distribution="x86_64-unknown-linux-gnu-install_only_stripped"
428
+ 3.13.0 @ 20241016 distribution="x86_64-unknown-linux-gnu-install_only_stripped"
429
+ ```
430
+
431
+ The above shows versions 3.9, 3.12, and 3.13 are installed from the latest
432
+ release 20241016. Version 3.8 is installed from the previous release
433
+ 20241002 (and is not available in the latest release otherwise it would
434
+ be shown with an update message).
435
+
436
+ Now show all available versions from the latest release:
437
+
438
+ ```sh
439
+ $ pystand show
440
+ 3.9.20 @ 20241016 distribution="x86_64-unknown-linux-gnu-install_only_stripped" (installed)
441
+ 3.10.15 @ 20241016 distribution="x86_64-unknown-linux-gnu-install_only_stripped"
442
+ 3.11.10 @ 20241016 distribution="x86_64-unknown-linux-gnu-install_only_stripped"
443
+ 3.12.7 @ 20241016 distribution="x86_64-unknown-linux-gnu-install_only_stripped" (installed)
444
+ 3.13.0 @ 20241016 distribution="x86_64-unknown-linux-gnu-install_only_stripped" (installed)
445
+ ```
446
+
447
+ We can see that versions 3.9, 3.12, and 3.13 are already installed (as
448
+ we also knew from list output), and that 3.10 and 3.11 are also available.
449
+
450
+ What is available from the previous release 20241002?
451
+
452
+ ```sh
453
+ $ pystand show -r 20241002
454
+ 3.8.20 @ 20241002 distribution="x86_64-unknown-linux-gnu-install_only_stripped" (installed)
455
+ 3.9.20 @ 20241002 distribution="x86_64-unknown-linux-gnu-install_only_stripped"
456
+ 3.10.15 @ 20241002 distribution="x86_64-unknown-linux-gnu-install_only_stripped"
457
+ 3.11.10 @ 20241002 distribution="x86_64-unknown-linux-gnu-install_only_stripped"
458
+ 3.12.7 @ 20241002 distribution="x86_64-unknown-linux-gnu-install_only_stripped"
459
+ 3.13.0rc3 @ 20241002 distribution="x86_64-unknown-linux-gnu-install_only_stripped"
460
+ ```
461
+
462
+ Let's install one of the threaded builds of Python 3.13. We can use the
463
+ `-a/-all` option to show all available distributions and then give the
464
+ `show` command a [regular
465
+ expression](https://en.wikipedia.org/wiki/Regular_expression) to filter
466
+ the output (this is really just a shorthand for piping the output of
467
+ `show -a` to grep). E.g.:
468
+
469
+ ```sh
470
+ $ pystand show -a 3.13.*x86_64.*unknown-linux-gnu.*thread
471
+ 3.13.0 @ 20241016 distribution="x86_64-unknown-linux-gnu-freethreaded+debug-full"
472
+ 3.13.0 @ 20241016 distribution="x86_64-unknown-linux-gnu-freethreaded+pgo+lto-full"
473
+ 3.13.0 @ 20241016 distribution="x86_64-unknown-linux-gnu-freethreaded+pgo-full"
474
+ 3.13.0 @ 20241016 distribution="x86_64_v2-unknown-linux-gnu-freethreaded+debug-full"
475
+ 3.13.0 @ 20241016 distribution="x86_64_v2-unknown-linux-gnu-freethreaded+pgo+lto-full"
476
+ 3.13.0 @ 20241016 distribution="x86_64_v2-unknown-linux-gnu-freethreaded+pgo-full"
477
+ 3.13.0 @ 20241016 distribution="x86_64_v3-unknown-linux-gnu-freethreaded+debug-full"
478
+ 3.13.0 @ 20241016 distribution="x86_64_v3-unknown-linux-gnu-freethreaded+pgo+lto-full"
479
+ 3.13.0 @ 20241016 distribution="x86_64_v3-unknown-linux-gnu-freethreaded+pgo-full"
480
+ 3.13.0 @ 20241016 distribution="x86_64_v4-unknown-linux-gnu-freethreaded+debug-full"
481
+ 3.13.0 @ 20241016 distribution="x86_64_v4-unknown-linux-gnu-freethreaded+lto-full"
482
+ 3.13.0 @ 20241016 distribution="x86_64_v4-unknown-linux-gnu-freethreaded+noopt-full"
483
+ ```
484
+
485
+ So let's install the
486
+ `x86_64_v3-unknown-linux-gnu-freethreaded+pgo+lto-full` build of Python
487
+ 3.13 (to the default location):
488
+
489
+ ```sh
490
+ $ pystand -D x86_64_v3-unknown-linux-gnu-freethreaded+pgo+lto-full install 3.13
491
+ Version "3.13.0" is already installed.
492
+ ```
493
+
494
+ An error is given because the version is already installed. We can
495
+ overwrite that with the `-f/--force` option:
496
+
497
+ ```sh
498
+ $ pystand -D x86_64_v3-unknown-linux-gnu-freethreaded+pgo+lto-full install -f 3.13
499
+ Version 3.13.0 @ 20241016 installed.
500
+ ```
501
+
502
+ Now we can see the new version distribution is installed:
503
+
504
+ ```sh
505
+
506
+ $ pystand list
507
+ 3.8.20 @ 20241002 distribution="x86_64-unknown-linux-gnu-install_only_stripped"
508
+ 3.9.20 @ 20241016 distribution="x86_64-unknown-linux-gnu-install_only_stripped"
509
+ 3.12.7 @ 20241016 distribution="x86_64-unknown-linux-gnu-install_only_stripped"
510
+ 3.13.0 @ 20241016 distribution="x86_64_v3-unknown-linux-gnu-freethreaded+pgo+lto-full"
511
+
512
+ $ pystand show
513
+ 3.9.20 @ 20241016 distribution="x86_64-unknown-linux-gnu-install_only_stripped" (installed)
514
+ 3.10.15 @ 20241016 distribution="x86_64-unknown-linux-gnu-install_only_stripped"
515
+ 3.11.10 @ 20241016 distribution="x86_64-unknown-linux-gnu-install_only_stripped"
516
+ 3.12.7 @ 20241016 distribution="x86_64-unknown-linux-gnu-install_only_stripped" (installed)
517
+ 3.13.0 @ 20241016 distribution="x86_64-unknown-linux-gnu-install_only_stripped"
518
+ 3.13.0 @ 20241016 distribution="x86_64_v3-unknown-linux-gnu-freethreaded+pgo+lto-full" (installed)
519
+ ```
520
+
521
+ Note that `pystand` caches all downloaded files (at least for a period
522
+ specified by `--purge-days`) so you can easily switch between different
523
+ versions/distributions quite quickly. You can also choose to install any
524
+ distribution/build in a specific directory using the `-P/--prefix-dir`
525
+ global option if you want to keep different distributions separate and
526
+ available in parallel.
527
+
410
528
  ## Command Default Options
411
529
 
412
530
  You can add default global options to a personal configuration file
@@ -423,11 +541,11 @@ as defaults.
423
541
 
424
542
  ## Github API Rate Limiting
425
543
 
426
- This tool minimises and caches Github API responses from the
427
- [`python-build-standalone`][pbs] repository. However, if you install
428
- many different versions particularly across various releases, you may
429
- get rate limited by Github so the command will block and you will see
430
- "backoff" messages reported. You can create a Github access token to
544
+ This tool minimises and caches Github API responses and file downloads
545
+ from the [`python-build-standalone`][pbs] repository. However, if you
546
+ install many different versions particularly across various releases,
547
+ you may get rate limited by Github so the command can block and you will
548
+ see "backoff" messages reported. You can create a Github access token to
431
549
  gain increased rate limits. Create a token in your Github account under
432
550
  `Settings -> Developer settings -> Personal access tokens`. Specify the
433
551
  token on the command line with `--github-access-token`, or set that as a
@@ -529,8 +529,8 @@ def main() -> str | None:
529
529
  # Set up main/global arguments
530
530
  opt.add_argument('-D', '--distribution',
531
531
  help=f'{REPO} distribution. '
532
- f'Default is auto-detected (detected as "{distro_help}" '
533
- 'for this current host).')
532
+ f'Default is "{distro_help}" '
533
+ 'for this host.')
534
534
  opt.add_argument('-P', '--prefix-dir', default=prefix_dir,
535
535
  help='specify prefix dir for storing '
536
536
  'versions. Default is "%(default)s"')
@@ -827,12 +827,15 @@ class _show(COMMAND):
827
827
  'Show versions available from a release.'
828
828
  @staticmethod
829
829
  def init(parser: ArgumentParser) -> None:
830
- parser.add_argument('-a', '--all', action='store_true',
831
- help='also show all available distributions for '
832
- 'each version from the release')
833
- parser.add_argument('release', nargs='?',
830
+ parser.add_argument('-r', '--release',
834
831
  help=f'{REPO} YYYYMMDD release to show (e.g. '
835
832
  f'{SAMPL_RELEASE}), default is latest release')
833
+ parser.add_argument('-a', '--all', action='store_true',
834
+ help='show all available distributions for '
835
+ 'each version from the release')
836
+ parser.add_argument('re_match', nargs='?',
837
+ help='show only versions+distributions '
838
+ 'matching this regular expression pattern')
836
839
 
837
840
  @staticmethod
838
841
  def run(args: Namespace) -> None:
@@ -859,8 +862,11 @@ class _show(COMMAND):
859
862
  if distribution == args._distribution:
860
863
  installable = True
861
864
 
862
- print(f'{fmt(version, release)} '
863
- f'distribution="{distribution}"{app}')
865
+ if not args.re_match or \
866
+ re.search(args.re_match,
867
+ f'{version}+{distribution}'):
868
+ print(f'{fmt(version, release)} '
869
+ f'distribution="{distribution}"{app}')
864
870
  if not installable:
865
871
  print(f'Warning: no distribution="{args._distribution}" '
866
872
  'versions found in ' f'release "{release}".')
File without changes
File without changes
File without changes
File without changes
File without changes