pystand 2.2__py3-none-any.whl → 2.3__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.2.dist-info → pystand-2.3.dist-info}/METADATA +60 -28
- pystand-2.3.dist-info/RECORD +6 -0
- pystand.py +23 -30
- pystand-2.2.dist-info/RECORD +0 -6
- {pystand-2.2.dist-info → pystand-2.3.dist-info}/WHEEL +0 -0
- {pystand-2.2.dist-info → pystand-2.3.dist-info}/entry_points.txt +0 -0
- {pystand-2.2.dist-info → pystand-2.3.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.3
|
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
|
@@ -92,16 +92,16 @@ Here are some examples showing how to use an installed version ..
|
|
92
92
|
|
93
93
|
```sh
|
94
94
|
# Use uv to create a virtual environment to be run with latest pystand
|
95
|
-
# installed python:
|
96
|
-
$ uv venv -p $(pystand path) myenv
|
95
|
+
# installed python 3.12:
|
96
|
+
$ uv venv -p $(pystand path 3.12) myenv
|
97
97
|
|
98
98
|
# Create a regular virtual environment to be run with latest pystand
|
99
|
-
# installed python:
|
100
|
-
$ $(pystand path -p) -m venv myenv
|
99
|
+
# installed python 3.12:
|
100
|
+
$ $(pystand path -p 3.12) -m venv myenv
|
101
101
|
|
102
102
|
# Use pipx to install a package to be run with pystand installed python
|
103
|
-
# specific version:
|
104
|
-
$ pipx install --python $(pystand path -p 3.11) cowsay
|
103
|
+
# specific version 3.11.1:
|
104
|
+
$ pipx install --python $(pystand path -p 3.11.1) cowsay
|
105
105
|
```
|
106
106
|
|
107
107
|
See detailed usage information in the [Usage](#usage) section that
|
@@ -281,17 +281,18 @@ options:
|
|
281
281
|
### Command `path`
|
282
282
|
|
283
283
|
```
|
284
|
-
usage: pystand path [-h] [-p] [-c | version]
|
284
|
+
usage: pystand path [-h] [-p] [-r] [-c | version]
|
285
285
|
|
286
286
|
Show path prefix to installed version base directory.
|
287
287
|
|
288
288
|
positional arguments:
|
289
|
-
version
|
289
|
+
version version number to show path for
|
290
290
|
|
291
291
|
options:
|
292
|
-
-h, --help
|
293
|
-
-p, --python-path
|
294
|
-
-
|
292
|
+
-h, --help show this help message and exit
|
293
|
+
-p, --python-path add path to python executable
|
294
|
+
-r, --resolve fully resolve given version
|
295
|
+
-c, --cache-path just show path to cache dir
|
295
296
|
```
|
296
297
|
|
297
298
|
## Installation and Upgrade
|
@@ -331,7 +332,7 @@ the versions for these are installed by default at
|
|
331
332
|
`~/.local/share/pystand/<version>`.
|
332
333
|
|
333
334
|
However, let's say you want to experiment with the new free-threaded
|
334
|
-
3.13 build
|
335
|
+
3.13 build, installed to a different directory. E.g.:
|
335
336
|
|
336
337
|
```sh
|
337
338
|
$ mkdir ./3.13-freethreaded
|
@@ -345,24 +346,24 @@ $ pystand -P . list
|
|
345
346
|
3.13.0 @ 20241016 distribution="x86_64_v4-unknown-linux-gnu-freethreaded+lto-full"
|
346
347
|
```
|
347
348
|
|
348
|
-
Note you can set a different default distribution by
|
349
|
-
|
350
|
-
option](#command-default-options).
|
349
|
+
Note you can set a different default distribution by specifying
|
350
|
+
`--distribution` as a [default option](#command-default-options).
|
351
351
|
|
352
352
|
## Extrapolation of Python Versions
|
353
353
|
|
354
|
-
|
355
|
-
|
356
|
-
|
357
|
-
|
358
|
-
of `3.12`, e.g.
|
359
|
-
|
360
|
-
`3.12.3` but generally
|
361
|
-
|
362
|
-
|
363
|
-
`3.12.1` and `3.12.3`,
|
364
|
-
|
365
|
-
|
354
|
+
For all commands except the `path` command, `pystand` extrapolates
|
355
|
+
version text you specify on the command line to the latest available
|
356
|
+
corresponding installed or release version. For example, if you specify
|
357
|
+
`pystand install 3.12` then `pystand` will look in the release files to
|
358
|
+
find the latest (i.e. highest) available version of `3.12`, e.g.
|
359
|
+
`3.12.3` (at the time of writing), and will install that. Of course you
|
360
|
+
can specify the exact version if you wish, e.g. `3.12.3` but generally
|
361
|
+
you don't need to bother. This is true for any command that takes a
|
362
|
+
version argument so be aware that this may be confusing if there are
|
363
|
+
multiple same Python minor versions, e.g. `3.12.1` and `3.12.3`,
|
364
|
+
installed from different releases. So in that case you should specify
|
365
|
+
the exact version because e.g. `pystand remove 3.12` will remove
|
366
|
+
`3.12.3` which may not be what you want.
|
366
367
|
|
367
368
|
Note, consistent with this, you actually don't need to specify a
|
368
369
|
minor version, e.g. `pystand install 3` would also install `3.12.3`
|
@@ -375,6 +376,37 @@ to `~/.local/share/pystand/versions/3.12.3` so that you can optionally
|
|
375
376
|
hard code the symlink directory in places where it can not be set
|
376
377
|
dynamically (i.e. where using `pystand path` is not an option).
|
377
378
|
|
379
|
+
You can exploit these symlinks when you create virtual environments
|
380
|
+
using the `pystand path` command (or just hard code the actual link/path
|
381
|
+
for your environment/platform). E.g. The following creates a virtual
|
382
|
+
environment which runs with whatever the currently latest installed
|
383
|
+
Python 3.12 version is:
|
384
|
+
|
385
|
+
```sh
|
386
|
+
# Use uv to create a virtual environment to be run with a symlink to
|
387
|
+
# currently latest installed python 3.12:
|
388
|
+
$ uv venv -p $(pystand path 3.12)
|
389
|
+
```
|
390
|
+
|
391
|
+
So if you then update to a new version of Python 3.12 using `pystand`,
|
392
|
+
e.g. from 3.12.3 to 3.12.4, the virtual environment will automatically
|
393
|
+
use the new Python version. However, if you for some reason want to
|
394
|
+
create the virtual environment with a specific version of Python that is
|
395
|
+
never changed, then just specify that exact version when you create the
|
396
|
+
virtual environment, e.g.:
|
397
|
+
|
398
|
+
```sh
|
399
|
+
# Use uv to create a virtual environment to be run with specific pystand
|
400
|
+
# installed python 3.12.2:
|
401
|
+
$ uv venv -p $(pystand path 3.12.2)
|
402
|
+
|
403
|
+
# If you can't be bothered to look up the current latest version, then
|
404
|
+
# the following command will do the same thing as above because it
|
405
|
+
# resolves the symlink to the current latest 3.12 version at the time
|
406
|
+
# you run this command:
|
407
|
+
$ uv venv -p $(pystand path -r 3.12)
|
408
|
+
```
|
409
|
+
|
378
410
|
## Command Default Options
|
379
411
|
|
380
412
|
You can add default global options to a personal configuration file
|
@@ -0,0 +1,6 @@
|
|
1
|
+
pystand.py,sha256=3T4RUzfjXZUeKkgOlObw7vD4_DwZXqveouQT61y1O30,33019
|
2
|
+
pystand-2.3.dist-info/METADATA,sha256=TsiLEZYSRV9HPdFQOyPYlqoNG-mQ9kvuU8hLJ1ZwhIM,18759
|
3
|
+
pystand-2.3.dist-info/WHEEL,sha256=R06PA3UVYHThwHvxuRWMqaGcr-PuniXahwjmQRFMEkY,91
|
4
|
+
pystand-2.3.dist-info/entry_points.txt,sha256=DG4ps3I3nni1bubV1tXs6u8FARgkdbAYaEAzZD4RAo8,41
|
5
|
+
pystand-2.3.dist-info/top_level.txt,sha256=NoWUh19UQymAJLHTCdxMnVwV6Teftef5fzyF3OWLyNY,8
|
6
|
+
pystand-2.3.dist-info/RECORD,,
|
pystand.py
CHANGED
@@ -871,47 +871,40 @@ class _path(COMMAND):
|
|
871
871
|
@staticmethod
|
872
872
|
def init(parser: ArgumentParser) -> None:
|
873
873
|
parser.add_argument('-p', '--python-path', action='store_true',
|
874
|
-
help='
|
874
|
+
help='add path to python executable')
|
875
|
+
parser.add_argument('-r', '--resolve', action='store_true',
|
876
|
+
help='fully resolve given version')
|
875
877
|
group = parser.add_mutually_exclusive_group()
|
876
|
-
group.add_argument('-c', '--cache-
|
877
|
-
help='
|
878
|
+
group.add_argument('-c', '--cache-path', action='store_true',
|
879
|
+
help='just show path to cache dir')
|
878
880
|
group.add_argument('version', nargs='?',
|
879
|
-
help='
|
881
|
+
help='version number to show path for')
|
880
882
|
|
881
883
|
@staticmethod
|
882
884
|
def run(args: Namespace) -> str | None:
|
883
|
-
|
885
|
+
version = args.version
|
886
|
+
if args.cache_path or not version:
|
884
887
|
if args.python_path:
|
885
888
|
args.parser.error('Can not specify --python-path.')
|
886
|
-
print(args._downloads.parent)
|
887
|
-
return
|
888
889
|
|
889
|
-
|
890
|
-
|
891
|
-
|
892
|
-
|
893
|
-
|
890
|
+
print(args._downloads.parent if args.cache_path else args._versions)
|
891
|
+
else:
|
892
|
+
path = args._versions / version
|
893
|
+
if not path.is_symlink() or not path.exists():
|
894
|
+
return f'Version "{version}" is not installed.'
|
894
895
|
|
895
|
-
|
896
|
-
|
897
|
-
if not version:
|
898
|
-
return 'No Python version installed.'
|
896
|
+
if args.resolve:
|
897
|
+
path = path.resolve()
|
899
898
|
|
900
|
-
|
901
|
-
|
902
|
-
|
899
|
+
if args.python_path:
|
900
|
+
basepath = path
|
901
|
+
path = basepath / 'bin' / 'python'
|
902
|
+
if not path.exists():
|
903
|
+
path = basepath / 'python.exe'
|
904
|
+
if not path.exists():
|
905
|
+
return 'Error: Can not find python executable in '\
|
906
|
+
f'"{basepath}"'
|
903
907
|
|
904
|
-
if args.python_path:
|
905
|
-
subpath = path / 'bin' / 'python'
|
906
|
-
if subpath.exists():
|
907
|
-
print(subpath)
|
908
|
-
else:
|
909
|
-
subpath = path / 'python.exe'
|
910
|
-
if subpath.exists():
|
911
|
-
print(subpath)
|
912
|
-
else:
|
913
|
-
return f'Error: Can not find python executable in "{path}"'
|
914
|
-
else:
|
915
908
|
print(path)
|
916
909
|
|
917
910
|
if __name__ == '__main__':
|
pystand-2.2.dist-info/RECORD
DELETED
@@ -1,6 +0,0 @@
|
|
1
|
-
pystand.py,sha256=tOQ4SxeqAtz3Tc-kd9jt_v-Hbx_vXnatHPkT5f1pdAA,33114
|
2
|
-
pystand-2.2.dist-info/METADATA,sha256=45hYFkXnngYMEDtsQ_lciU38qxK-Jl98ZxXyjvhhd2I,17403
|
3
|
-
pystand-2.2.dist-info/WHEEL,sha256=R06PA3UVYHThwHvxuRWMqaGcr-PuniXahwjmQRFMEkY,91
|
4
|
-
pystand-2.2.dist-info/entry_points.txt,sha256=DG4ps3I3nni1bubV1tXs6u8FARgkdbAYaEAzZD4RAo8,41
|
5
|
-
pystand-2.2.dist-info/top_level.txt,sha256=NoWUh19UQymAJLHTCdxMnVwV6Teftef5fzyF3OWLyNY,8
|
6
|
-
pystand-2.2.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|