pystand 2.40__tar.gz → 2.41__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.40/pystand.egg-info → pystand-2.41}/PKG-INFO +2 -2
- {pystand-2.40 → pystand-2.41}/README.md +1 -1
- {pystand-2.40 → pystand-2.41/pystand.egg-info}/PKG-INFO +2 -2
- pystand-2.41/pystand.egg-info/scm_version.json +8 -0
- {pystand-2.40 → pystand-2.41}/pystand.py +22 -9
- pystand-2.40/pystand.egg-info/scm_version.json +0 -8
- {pystand-2.40 → pystand-2.41}/.gitignore +0 -0
- {pystand-2.40 → pystand-2.41}/check-dist.py +0 -0
- {pystand-2.40 → pystand-2.41}/justfile +0 -0
- {pystand-2.40 → pystand-2.41}/pyproject.toml +0 -0
- {pystand-2.40 → pystand-2.41}/pystand.egg-info/SOURCES.txt +0 -0
- {pystand-2.40 → pystand-2.41}/pystand.egg-info/dependency_links.txt +0 -0
- {pystand-2.40 → pystand-2.41}/pystand.egg-info/entry_points.txt +0 -0
- {pystand-2.40 → pystand-2.41}/pystand.egg-info/requires.txt +0 -0
- {pystand-2.40 → pystand-2.41}/pystand.egg-info/scm_file_list.json +0 -0
- {pystand-2.40 → pystand-2.41}/pystand.egg-info/top_level.txt +0 -0
- {pystand-2.40 → pystand-2.41}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pystand
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.41
|
|
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
|
|
@@ -381,7 +381,7 @@ usage: pystand man [-h] [version]
|
|
|
381
381
|
Show installed man page for latest or given version.
|
|
382
382
|
|
|
383
383
|
positional arguments:
|
|
384
|
-
version installed version to show man page for
|
|
384
|
+
version installed version to show man page for, default is latest
|
|
385
385
|
|
|
386
386
|
options:
|
|
387
387
|
-h, --help show this help message and exit
|
|
@@ -363,7 +363,7 @@ usage: pystand man [-h] [version]
|
|
|
363
363
|
Show installed man page for latest or given version.
|
|
364
364
|
|
|
365
365
|
positional arguments:
|
|
366
|
-
version installed version to show man page for
|
|
366
|
+
version installed version to show man page for, default is latest
|
|
367
367
|
|
|
368
368
|
options:
|
|
369
369
|
-h, --help show this help message and exit
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pystand
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.41
|
|
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
|
|
@@ -381,7 +381,7 @@ usage: pystand man [-h] [version]
|
|
|
381
381
|
Show installed man page for latest or given version.
|
|
382
382
|
|
|
383
383
|
positional arguments:
|
|
384
|
-
version installed version to show man page for
|
|
384
|
+
version installed version to show man page for, default is latest
|
|
385
385
|
|
|
386
386
|
options:
|
|
387
387
|
-h, --help show this help message and exit
|
|
@@ -6,25 +6,24 @@ https://github.com/astral-sh/python-build-standalone.
|
|
|
6
6
|
|
|
7
7
|
from __future__ import annotations
|
|
8
8
|
|
|
9
|
-
import
|
|
9
|
+
import sys
|
|
10
|
+
|
|
11
|
+
if sys.version_info >= (3, 15):
|
|
12
|
+
sys.set_lazy_imports('all')
|
|
13
|
+
|
|
10
14
|
import os
|
|
11
15
|
import platform
|
|
12
16
|
import re
|
|
13
|
-
import shlex
|
|
14
17
|
import shutil
|
|
15
18
|
import ssl
|
|
16
19
|
import subprocess
|
|
17
|
-
import sys
|
|
18
20
|
import time
|
|
19
|
-
from collections import defaultdict
|
|
20
21
|
from collections.abc import Iterable, Iterator
|
|
21
|
-
from datetime import date, datetime
|
|
22
22
|
from pathlib import Path
|
|
23
23
|
from typing import Any
|
|
24
24
|
from urllib.request import urlopen
|
|
25
25
|
|
|
26
26
|
import filelock
|
|
27
|
-
import platformdirs
|
|
28
27
|
from argparse_from_file import ArgumentParser, Namespace
|
|
29
28
|
from packaging.version import InvalidVersion
|
|
30
29
|
from packaging.version import parse as parse_version
|
|
@@ -83,6 +82,8 @@ class ColorTable:
|
|
|
83
82
|
"Base class for color tables"
|
|
84
83
|
|
|
85
84
|
def __init__(self, initval: str, no_color: bool) -> None:
|
|
85
|
+
import itertools
|
|
86
|
+
|
|
86
87
|
self.table = None if no_color else {self.parse_key(initval): COLORS[0]}
|
|
87
88
|
self.next = itertools.cycle(COLORS[1:-1])
|
|
88
89
|
|
|
@@ -378,6 +379,8 @@ def get_version_names(args: Namespace) -> list[str]:
|
|
|
378
379
|
|
|
379
380
|
def check_release_tag(release: str) -> str | None:
|
|
380
381
|
"Check the specified release tag is valid"
|
|
382
|
+
from datetime import date
|
|
383
|
+
|
|
381
384
|
if not release.isdigit() or len(release) != len(SAMPL_RELEASE):
|
|
382
385
|
return 'Release must be a YYYYMMDD string.'
|
|
383
386
|
|
|
@@ -515,6 +518,8 @@ def get_release_files(args, tag) -> dict[str, Any]:
|
|
|
515
518
|
|
|
516
519
|
def update_version_symlinks(args: Namespace) -> None:
|
|
517
520
|
"Create/update symlinks pointing to latest version"
|
|
521
|
+
from collections import defaultdict
|
|
522
|
+
|
|
518
523
|
base = args._versions
|
|
519
524
|
if not base.exists():
|
|
520
525
|
return
|
|
@@ -603,6 +608,8 @@ def purge_unused_releases(args: Namespace) -> None:
|
|
|
603
608
|
|
|
604
609
|
def show_list(args: Namespace, re_match: re.Pattern | None) -> None:
|
|
605
610
|
"Show a list of available releases"
|
|
611
|
+
from datetime import datetime
|
|
612
|
+
|
|
606
613
|
try:
|
|
607
614
|
latest = parse_version(args._release)
|
|
608
615
|
except InvalidVersion:
|
|
@@ -723,7 +730,7 @@ def compile_bytecode(srcdir: Path, tgtdir: Path) -> str | None:
|
|
|
723
730
|
def ensure_manpage_link(vdir: Path) -> None:
|
|
724
731
|
"Ensure a symlink to the man page for this version exists"
|
|
725
732
|
manpath = vdir / MANPATH
|
|
726
|
-
if manpath.
|
|
733
|
+
if manpath.is_symlink() or manpath.exists():
|
|
727
734
|
return
|
|
728
735
|
|
|
729
736
|
for path in manpath.parent.iterdir():
|
|
@@ -762,9 +769,9 @@ def install_version(
|
|
|
762
769
|
if error:
|
|
763
770
|
shutil.rmtree(tmpdir)
|
|
764
771
|
else:
|
|
772
|
+
ensure_manpage_link(tmpdir)
|
|
765
773
|
remove_version(args, version)
|
|
766
774
|
tmpdir.replace(vdir)
|
|
767
|
-
ensure_manpage_link(vdir)
|
|
768
775
|
|
|
769
776
|
return error
|
|
770
777
|
|
|
@@ -818,6 +825,8 @@ def create_cert(option: str) -> ssl.SSLContext | None:
|
|
|
818
825
|
|
|
819
826
|
def run_uv(args: Namespace, cmd: list[str], cmdopts: list[str]) -> str | None:
|
|
820
827
|
"Run a uv command with the specified or latest installed python version"
|
|
828
|
+
import shlex
|
|
829
|
+
|
|
821
830
|
if not (vers := (args.python or get_major_version(args))):
|
|
822
831
|
return 'No installed python version found.'
|
|
823
832
|
|
|
@@ -842,6 +851,8 @@ commands = []
|
|
|
842
851
|
|
|
843
852
|
def main() -> str | None:
|
|
844
853
|
"Main code"
|
|
854
|
+
import platformdirs
|
|
855
|
+
|
|
845
856
|
distro_default = DISTRIBUTIONS.get((platform.system(), platform.machine()))
|
|
846
857
|
distro_help = distro_default or '?unknown?'
|
|
847
858
|
|
|
@@ -1580,7 +1591,9 @@ class man:
|
|
|
1580
1591
|
@staticmethod
|
|
1581
1592
|
def init(parser: ArgumentParser) -> None:
|
|
1582
1593
|
parser.add_argument(
|
|
1583
|
-
'version',
|
|
1594
|
+
'version',
|
|
1595
|
+
nargs='?',
|
|
1596
|
+
help='installed version to show man page for, default is latest',
|
|
1584
1597
|
)
|
|
1585
1598
|
|
|
1586
1599
|
@staticmethod
|
|
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
|