pystand 2.17__tar.gz → 2.18__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.17 → pystand-2.18}/Makefile +1 -0
- {pystand-2.17 → pystand-2.18}/PKG-INFO +37 -18
- pystand-2.17/pystand.egg-info/PKG-INFO → pystand-2.18/README.md +35 -35
- {pystand-2.17 → pystand-2.18}/pyproject.toml +1 -0
- pystand-2.17/README.md → pystand-2.18/pystand.egg-info/PKG-INFO +54 -17
- {pystand-2.17 → pystand-2.18}/pystand.egg-info/requires.txt +1 -0
- {pystand-2.17 → pystand-2.18}/pystand.py +10 -23
- {pystand-2.17 → pystand-2.18}/.gitignore +0 -0
- {pystand-2.17 → pystand-2.18}/pystand.egg-info/SOURCES.txt +0 -0
- {pystand-2.17 → pystand-2.18}/pystand.egg-info/dependency_links.txt +0 -0
- {pystand-2.17 → pystand-2.18}/pystand.egg-info/entry_points.txt +0 -0
- {pystand-2.17 → pystand-2.18}/pystand.egg-info/top_level.txt +0 -0
- {pystand-2.17 → pystand-2.18}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: pystand
|
3
|
-
Version: 2.
|
3
|
+
Version: 2.18
|
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
|
@@ -12,6 +12,7 @@ Description-Content-Type: text/markdown
|
|
12
12
|
Requires-Dist: argcomplete
|
13
13
|
Requires-Dist: packaging
|
14
14
|
Requires-Dist: platformdirs
|
15
|
+
Requires-Dist: argparse-from-file
|
15
16
|
Requires-Dist: pygithub
|
16
17
|
Requires-Dist: certifi
|
17
18
|
Requires-Dist: zstandard; python_version < "3.14"
|
@@ -25,14 +26,14 @@ installation, and update of pre-built Python versions from the
|
|
25
26
|
[`python-build-standalone`][pbs] project. The following commands are
|
26
27
|
provided:
|
27
28
|
|
28
|
-
|Command |Description
|
29
|
-
|
30
|
-
|`install`|Install one or more versions from a python-build-standalone release
|
31
|
-
|`update` (or `upgrade`) |Update one, more, or all versions to another release
|
32
|
-
|`remove` (or `uninstall`) |Remove/uninstall one, more, or all versions
|
33
|
-
|`list` |List installed versions and show which have an update available
|
34
|
-
|`show` |Show versions available from a release
|
35
|
-
|`path` |Show path prefix to installed version base directory
|
29
|
+
|Command |Description |
|
30
|
+
|---------|--------------------------------------------------------------------|
|
31
|
+
|`install`|Install one or more versions from a python-build-standalone release.|
|
32
|
+
|`update` (or `upgrade`) |Update one, more, or all versions to another release.|
|
33
|
+
|`remove` (or `uninstall`) |Remove/uninstall one, more, or all versions.|
|
34
|
+
|`list` |List installed versions and show which have an update available.|
|
35
|
+
|`show` |Show versions available from a release.|
|
36
|
+
|`path` |Show path prefix to installed version base directory.|
|
36
37
|
|
37
38
|
By default, Python versions are sourced from the latest
|
38
39
|
`python-build-standalone` [release][pbs-rel] available (e.g.
|
@@ -147,25 +148,25 @@ options:
|
|
147
148
|
distributions.
|
148
149
|
-P, --prefix-dir PREFIX_DIR
|
149
150
|
specify prefix dir for storing versions. Default is
|
150
|
-
"$HOME/.local/share/pystand"
|
151
|
+
"$HOME/.local/share/pystand".
|
151
152
|
-C, --cache-dir CACHE_DIR
|
152
153
|
specify cache dir for downloads. Default is
|
153
|
-
"$HOME/.cache/pystand"
|
154
|
+
"$HOME/.cache/pystand".
|
154
155
|
-M, --cache-minutes CACHE_MINUTES
|
155
156
|
cache latest YYYYMMDD release tag fetch for this many
|
156
157
|
minutes, before rechecking for latest. Default is 60
|
157
|
-
minutes
|
158
|
+
minutes.
|
158
159
|
--purge-days PURGE_DAYS
|
159
160
|
cache YYYYMMDD release file lists and downloads for
|
160
161
|
this number of days after last version referencing
|
161
|
-
that release is removed. Default is 90 days
|
162
|
+
that release is removed. Default is 90 days.
|
162
163
|
--github-access-token GITHUB_ACCESS_TOKEN
|
163
164
|
optional Github access token. Can specify to reduce
|
164
165
|
rate limiting.
|
165
166
|
--no-strip do not strip downloaded binaries
|
166
167
|
--cert {system,certifi,none}
|
167
168
|
specify which SSL certificates to use for HTTPS
|
168
|
-
requests. Default="system"
|
169
|
+
requests. Default="system".
|
169
170
|
-V, --version just show pystand version
|
170
171
|
|
171
172
|
Commands:
|
@@ -566,9 +567,8 @@ anything after on a line) are ignored. Type `pystand` to see all
|
|
566
567
|
supported options.
|
567
568
|
|
568
569
|
The global options: `--distribution`, `--prefix-dir`, `--cache-dir`,
|
569
|
-
`--cache-minutes`, `--purge-days`, `--github-access-token`,
|
570
|
-
`--
|
571
|
-
as defaults.
|
570
|
+
`--cache-minutes`, `--purge-days`, `--github-access-token`, `--no-strip`,
|
571
|
+
`--cert` are the only sensible candidates to consider setting as defaults.
|
572
572
|
|
573
573
|
## Github API Rate Limiting
|
574
574
|
|
@@ -583,6 +583,24 @@ either a Github "fine-grained" or "classic" token. Specify the token on
|
|
583
583
|
the command line with `--github-access-token`, or set that as a [default
|
584
584
|
option](#command-default-options).
|
585
585
|
|
586
|
+
## HTTPS Certificate Verification
|
587
|
+
|
588
|
+
A global option `--cert` is provided to specify which SSL certificates to use
|
589
|
+
for HTTPS requests. This is useful if you are running `pystand` in an
|
590
|
+
environment where the system certificates are not available, or you want to use
|
591
|
+
the bundled [`certifi`][certifi] certificates instead.
|
592
|
+
|
593
|
+
The available options are:
|
594
|
+
|
595
|
+
|Option |Description
|
596
|
+
|-------- |------------
|
597
|
+
|`system` |Use system certificates (as used normally by Python). This is the default.|
|
598
|
+
|`certifi`|Use the [`certifi`][certifi] package, i.e. use the certificates bundled within the application.|
|
599
|
+
|`none` |Perform unverified https requests (best to avoid using this).|
|
600
|
+
|
601
|
+
Specify the option on the command line with `--cert`, or set that as a [default
|
602
|
+
option](#command-default-options).
|
603
|
+
|
586
604
|
## Command Line Tab Completion
|
587
605
|
|
588
606
|
Command line shell [tab
|
@@ -602,7 +620,7 @@ either version 3 of the License, or any later version. This program is
|
|
602
620
|
distributed in the hope that it will be useful, but WITHOUT ANY
|
603
621
|
WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
604
622
|
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License at
|
605
|
-
<https://
|
623
|
+
<https://opensource.org/license/gpl-3-0> for more details.
|
606
624
|
|
607
625
|
[pystand]: https://github.com/bulletmark/pystand
|
608
626
|
[pbs]: https://github.com/astral-sh/python-build-standalone
|
@@ -616,5 +634,6 @@ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License at
|
|
616
634
|
[hatch]: https://hatch.pypa.io/
|
617
635
|
[hatchpy]: https://hatch.pypa.io/latest/tutorials/python/manage/
|
618
636
|
[ryepy]: https://rye.astral.sh/guide/toolchains/#fetching-toolchains
|
637
|
+
[certifi]: https://pypi.org/project/certifi/
|
619
638
|
|
620
639
|
<!-- vim: se ai syn=markdown: -->
|
@@ -1,21 +1,3 @@
|
|
1
|
-
Metadata-Version: 2.4
|
2
|
-
Name: pystand
|
3
|
-
Version: 2.17
|
4
|
-
Summary: Install Python versions from python-build-standalone project
|
5
|
-
Author-email: Mark Blakeney <mark.blakeney@bullet-systems.net>
|
6
|
-
License-Expression: GPL-3.0-or-later
|
7
|
-
Project-URL: Homepage, https://github.com/bulletmark/pystand
|
8
|
-
Keywords: python-build-standalone,pyenv,hatch,pdm
|
9
|
-
Classifier: Programming Language :: Python :: 3
|
10
|
-
Requires-Python: >=3.8
|
11
|
-
Description-Content-Type: text/markdown
|
12
|
-
Requires-Dist: argcomplete
|
13
|
-
Requires-Dist: packaging
|
14
|
-
Requires-Dist: platformdirs
|
15
|
-
Requires-Dist: pygithub
|
16
|
-
Requires-Dist: certifi
|
17
|
-
Requires-Dist: zstandard; python_version < "3.14"
|
18
|
-
|
19
1
|
## PYSTAND - Install Python Versions From The Python-Build-Standalone Project
|
20
2
|
[](https://pypi.org/project/pystand/)
|
21
3
|
[](https://aur.archlinux.org/packages/pystand/)
|
@@ -25,14 +7,14 @@ installation, and update of pre-built Python versions from the
|
|
25
7
|
[`python-build-standalone`][pbs] project. The following commands are
|
26
8
|
provided:
|
27
9
|
|
28
|
-
|Command |Description
|
29
|
-
|
30
|
-
|`install`|Install one or more versions from a python-build-standalone release
|
31
|
-
|`update` (or `upgrade`) |Update one, more, or all versions to another release
|
32
|
-
|`remove` (or `uninstall`) |Remove/uninstall one, more, or all versions
|
33
|
-
|`list` |List installed versions and show which have an update available
|
34
|
-
|`show` |Show versions available from a release
|
35
|
-
|`path` |Show path prefix to installed version base directory
|
10
|
+
|Command |Description |
|
11
|
+
|---------|--------------------------------------------------------------------|
|
12
|
+
|`install`|Install one or more versions from a python-build-standalone release.|
|
13
|
+
|`update` (or `upgrade`) |Update one, more, or all versions to another release.|
|
14
|
+
|`remove` (or `uninstall`) |Remove/uninstall one, more, or all versions.|
|
15
|
+
|`list` |List installed versions and show which have an update available.|
|
16
|
+
|`show` |Show versions available from a release.|
|
17
|
+
|`path` |Show path prefix to installed version base directory.|
|
36
18
|
|
37
19
|
By default, Python versions are sourced from the latest
|
38
20
|
`python-build-standalone` [release][pbs-rel] available (e.g.
|
@@ -147,25 +129,25 @@ options:
|
|
147
129
|
distributions.
|
148
130
|
-P, --prefix-dir PREFIX_DIR
|
149
131
|
specify prefix dir for storing versions. Default is
|
150
|
-
"$HOME/.local/share/pystand"
|
132
|
+
"$HOME/.local/share/pystand".
|
151
133
|
-C, --cache-dir CACHE_DIR
|
152
134
|
specify cache dir for downloads. Default is
|
153
|
-
"$HOME/.cache/pystand"
|
135
|
+
"$HOME/.cache/pystand".
|
154
136
|
-M, --cache-minutes CACHE_MINUTES
|
155
137
|
cache latest YYYYMMDD release tag fetch for this many
|
156
138
|
minutes, before rechecking for latest. Default is 60
|
157
|
-
minutes
|
139
|
+
minutes.
|
158
140
|
--purge-days PURGE_DAYS
|
159
141
|
cache YYYYMMDD release file lists and downloads for
|
160
142
|
this number of days after last version referencing
|
161
|
-
that release is removed. Default is 90 days
|
143
|
+
that release is removed. Default is 90 days.
|
162
144
|
--github-access-token GITHUB_ACCESS_TOKEN
|
163
145
|
optional Github access token. Can specify to reduce
|
164
146
|
rate limiting.
|
165
147
|
--no-strip do not strip downloaded binaries
|
166
148
|
--cert {system,certifi,none}
|
167
149
|
specify which SSL certificates to use for HTTPS
|
168
|
-
requests. Default="system"
|
150
|
+
requests. Default="system".
|
169
151
|
-V, --version just show pystand version
|
170
152
|
|
171
153
|
Commands:
|
@@ -566,9 +548,8 @@ anything after on a line) are ignored. Type `pystand` to see all
|
|
566
548
|
supported options.
|
567
549
|
|
568
550
|
The global options: `--distribution`, `--prefix-dir`, `--cache-dir`,
|
569
|
-
`--cache-minutes`, `--purge-days`, `--github-access-token`,
|
570
|
-
`--
|
571
|
-
as defaults.
|
551
|
+
`--cache-minutes`, `--purge-days`, `--github-access-token`, `--no-strip`,
|
552
|
+
`--cert` are the only sensible candidates to consider setting as defaults.
|
572
553
|
|
573
554
|
## Github API Rate Limiting
|
574
555
|
|
@@ -583,6 +564,24 @@ either a Github "fine-grained" or "classic" token. Specify the token on
|
|
583
564
|
the command line with `--github-access-token`, or set that as a [default
|
584
565
|
option](#command-default-options).
|
585
566
|
|
567
|
+
## HTTPS Certificate Verification
|
568
|
+
|
569
|
+
A global option `--cert` is provided to specify which SSL certificates to use
|
570
|
+
for HTTPS requests. This is useful if you are running `pystand` in an
|
571
|
+
environment where the system certificates are not available, or you want to use
|
572
|
+
the bundled [`certifi`][certifi] certificates instead.
|
573
|
+
|
574
|
+
The available options are:
|
575
|
+
|
576
|
+
|Option |Description
|
577
|
+
|-------- |------------
|
578
|
+
|`system` |Use system certificates (as used normally by Python). This is the default.|
|
579
|
+
|`certifi`|Use the [`certifi`][certifi] package, i.e. use the certificates bundled within the application.|
|
580
|
+
|`none` |Perform unverified https requests (best to avoid using this).|
|
581
|
+
|
582
|
+
Specify the option on the command line with `--cert`, or set that as a [default
|
583
|
+
option](#command-default-options).
|
584
|
+
|
586
585
|
## Command Line Tab Completion
|
587
586
|
|
588
587
|
Command line shell [tab
|
@@ -602,7 +601,7 @@ either version 3 of the License, or any later version. This program is
|
|
602
601
|
distributed in the hope that it will be useful, but WITHOUT ANY
|
603
602
|
WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
604
603
|
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License at
|
605
|
-
<https://
|
604
|
+
<https://opensource.org/license/gpl-3-0> for more details.
|
606
605
|
|
607
606
|
[pystand]: https://github.com/bulletmark/pystand
|
608
607
|
[pbs]: https://github.com/astral-sh/python-build-standalone
|
@@ -616,5 +615,6 @@ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License at
|
|
616
615
|
[hatch]: https://hatch.pypa.io/
|
617
616
|
[hatchpy]: https://hatch.pypa.io/latest/tutorials/python/manage/
|
618
617
|
[ryepy]: https://rye.astral.sh/guide/toolchains/#fetching-toolchains
|
618
|
+
[certifi]: https://pypi.org/project/certifi/
|
619
619
|
|
620
620
|
<!-- vim: se ai syn=markdown: -->
|
@@ -1,3 +1,22 @@
|
|
1
|
+
Metadata-Version: 2.4
|
2
|
+
Name: pystand
|
3
|
+
Version: 2.18
|
4
|
+
Summary: Install Python versions from python-build-standalone project
|
5
|
+
Author-email: Mark Blakeney <mark.blakeney@bullet-systems.net>
|
6
|
+
License-Expression: GPL-3.0-or-later
|
7
|
+
Project-URL: Homepage, https://github.com/bulletmark/pystand
|
8
|
+
Keywords: python-build-standalone,pyenv,hatch,pdm
|
9
|
+
Classifier: Programming Language :: Python :: 3
|
10
|
+
Requires-Python: >=3.8
|
11
|
+
Description-Content-Type: text/markdown
|
12
|
+
Requires-Dist: argcomplete
|
13
|
+
Requires-Dist: packaging
|
14
|
+
Requires-Dist: platformdirs
|
15
|
+
Requires-Dist: argparse-from-file
|
16
|
+
Requires-Dist: pygithub
|
17
|
+
Requires-Dist: certifi
|
18
|
+
Requires-Dist: zstandard; python_version < "3.14"
|
19
|
+
|
1
20
|
## PYSTAND - Install Python Versions From The Python-Build-Standalone Project
|
2
21
|
[](https://pypi.org/project/pystand/)
|
3
22
|
[](https://aur.archlinux.org/packages/pystand/)
|
@@ -7,14 +26,14 @@ installation, and update of pre-built Python versions from the
|
|
7
26
|
[`python-build-standalone`][pbs] project. The following commands are
|
8
27
|
provided:
|
9
28
|
|
10
|
-
|Command |Description
|
11
|
-
|
12
|
-
|`install`|Install one or more versions from a python-build-standalone release
|
13
|
-
|`update` (or `upgrade`) |Update one, more, or all versions to another release
|
14
|
-
|`remove` (or `uninstall`) |Remove/uninstall one, more, or all versions
|
15
|
-
|`list` |List installed versions and show which have an update available
|
16
|
-
|`show` |Show versions available from a release
|
17
|
-
|`path` |Show path prefix to installed version base directory
|
29
|
+
|Command |Description |
|
30
|
+
|---------|--------------------------------------------------------------------|
|
31
|
+
|`install`|Install one or more versions from a python-build-standalone release.|
|
32
|
+
|`update` (or `upgrade`) |Update one, more, or all versions to another release.|
|
33
|
+
|`remove` (or `uninstall`) |Remove/uninstall one, more, or all versions.|
|
34
|
+
|`list` |List installed versions and show which have an update available.|
|
35
|
+
|`show` |Show versions available from a release.|
|
36
|
+
|`path` |Show path prefix to installed version base directory.|
|
18
37
|
|
19
38
|
By default, Python versions are sourced from the latest
|
20
39
|
`python-build-standalone` [release][pbs-rel] available (e.g.
|
@@ -129,25 +148,25 @@ options:
|
|
129
148
|
distributions.
|
130
149
|
-P, --prefix-dir PREFIX_DIR
|
131
150
|
specify prefix dir for storing versions. Default is
|
132
|
-
"$HOME/.local/share/pystand"
|
151
|
+
"$HOME/.local/share/pystand".
|
133
152
|
-C, --cache-dir CACHE_DIR
|
134
153
|
specify cache dir for downloads. Default is
|
135
|
-
"$HOME/.cache/pystand"
|
154
|
+
"$HOME/.cache/pystand".
|
136
155
|
-M, --cache-minutes CACHE_MINUTES
|
137
156
|
cache latest YYYYMMDD release tag fetch for this many
|
138
157
|
minutes, before rechecking for latest. Default is 60
|
139
|
-
minutes
|
158
|
+
minutes.
|
140
159
|
--purge-days PURGE_DAYS
|
141
160
|
cache YYYYMMDD release file lists and downloads for
|
142
161
|
this number of days after last version referencing
|
143
|
-
that release is removed. Default is 90 days
|
162
|
+
that release is removed. Default is 90 days.
|
144
163
|
--github-access-token GITHUB_ACCESS_TOKEN
|
145
164
|
optional Github access token. Can specify to reduce
|
146
165
|
rate limiting.
|
147
166
|
--no-strip do not strip downloaded binaries
|
148
167
|
--cert {system,certifi,none}
|
149
168
|
specify which SSL certificates to use for HTTPS
|
150
|
-
requests. Default="system"
|
169
|
+
requests. Default="system".
|
151
170
|
-V, --version just show pystand version
|
152
171
|
|
153
172
|
Commands:
|
@@ -548,9 +567,8 @@ anything after on a line) are ignored. Type `pystand` to see all
|
|
548
567
|
supported options.
|
549
568
|
|
550
569
|
The global options: `--distribution`, `--prefix-dir`, `--cache-dir`,
|
551
|
-
`--cache-minutes`, `--purge-days`, `--github-access-token`,
|
552
|
-
`--
|
553
|
-
as defaults.
|
570
|
+
`--cache-minutes`, `--purge-days`, `--github-access-token`, `--no-strip`,
|
571
|
+
`--cert` are the only sensible candidates to consider setting as defaults.
|
554
572
|
|
555
573
|
## Github API Rate Limiting
|
556
574
|
|
@@ -565,6 +583,24 @@ either a Github "fine-grained" or "classic" token. Specify the token on
|
|
565
583
|
the command line with `--github-access-token`, or set that as a [default
|
566
584
|
option](#command-default-options).
|
567
585
|
|
586
|
+
## HTTPS Certificate Verification
|
587
|
+
|
588
|
+
A global option `--cert` is provided to specify which SSL certificates to use
|
589
|
+
for HTTPS requests. This is useful if you are running `pystand` in an
|
590
|
+
environment where the system certificates are not available, or you want to use
|
591
|
+
the bundled [`certifi`][certifi] certificates instead.
|
592
|
+
|
593
|
+
The available options are:
|
594
|
+
|
595
|
+
|Option |Description
|
596
|
+
|-------- |------------
|
597
|
+
|`system` |Use system certificates (as used normally by Python). This is the default.|
|
598
|
+
|`certifi`|Use the [`certifi`][certifi] package, i.e. use the certificates bundled within the application.|
|
599
|
+
|`none` |Perform unverified https requests (best to avoid using this).|
|
600
|
+
|
601
|
+
Specify the option on the command line with `--cert`, or set that as a [default
|
602
|
+
option](#command-default-options).
|
603
|
+
|
568
604
|
## Command Line Tab Completion
|
569
605
|
|
570
606
|
Command line shell [tab
|
@@ -584,7 +620,7 @@ either version 3 of the License, or any later version. This program is
|
|
584
620
|
distributed in the hope that it will be useful, but WITHOUT ANY
|
585
621
|
WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
586
622
|
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License at
|
587
|
-
<https://
|
623
|
+
<https://opensource.org/license/gpl-3-0> for more details.
|
588
624
|
|
589
625
|
[pystand]: https://github.com/bulletmark/pystand
|
590
626
|
[pbs]: https://github.com/astral-sh/python-build-standalone
|
@@ -598,5 +634,6 @@ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License at
|
|
598
634
|
[hatch]: https://hatch.pypa.io/
|
599
635
|
[hatchpy]: https://hatch.pypa.io/latest/tutorials/python/manage/
|
600
636
|
[ryepy]: https://rye.astral.sh/guide/toolchains/#fetching-toolchains
|
637
|
+
[certifi]: https://pypi.org/project/certifi/
|
601
638
|
|
602
639
|
<!-- vim: se ai syn=markdown: -->
|
@@ -11,20 +11,20 @@ from __future__ import annotations
|
|
11
11
|
import os
|
12
12
|
import platform
|
13
13
|
import re
|
14
|
-
import shlex
|
15
14
|
import shutil
|
16
15
|
import ssl
|
17
16
|
import sys
|
18
17
|
import time
|
19
|
-
from argparse import ArgumentParser, Namespace
|
20
18
|
from collections import defaultdict
|
19
|
+
from collections.abc import Iterable, Iterator
|
21
20
|
from datetime import date, datetime
|
22
21
|
from pathlib import Path
|
23
|
-
from typing import Any
|
22
|
+
from typing import Any
|
24
23
|
from urllib.request import urlopen
|
25
24
|
|
26
25
|
import argcomplete
|
27
26
|
import platformdirs
|
27
|
+
from argparse_from_file import ArgumentParser, Namespace # type: ignore
|
28
28
|
from packaging.version import parse as parse_version
|
29
29
|
|
30
30
|
REPO = 'python-build-standalone'
|
@@ -37,7 +37,6 @@ LATEST_RELEASE_TAG = f'{GITHUB_SITE}/releases/latest'
|
|
37
37
|
SAMPL_RELEASE = '20240415'
|
38
38
|
|
39
39
|
PROG = Path(__file__).stem
|
40
|
-
CNFFILE = platformdirs.user_config_path(f'{PROG}-flags.conf')
|
41
40
|
|
42
41
|
# Default distributions for various platforms
|
43
42
|
DISTRIBUTIONS = {
|
@@ -678,8 +677,7 @@ def main() -> str | None:
|
|
678
677
|
opt = ArgumentParser(
|
679
678
|
description=__doc__,
|
680
679
|
epilog='Some commands offer aliases as shown in parentheses above. '
|
681
|
-
'Note you can set default starting global options in '
|
682
|
-
f'{CNFFILE}.',
|
680
|
+
'Note you can set default starting global options in #FROM_FILE_PATH#',
|
683
681
|
)
|
684
682
|
|
685
683
|
# Set up main/global arguments
|
@@ -693,13 +691,13 @@ def main() -> str | None:
|
|
693
691
|
'-P',
|
694
692
|
'--prefix-dir',
|
695
693
|
default=prefix_dir,
|
696
|
-
help='specify prefix dir for storing versions. Default is "%(default)s"',
|
694
|
+
help='specify prefix dir for storing versions. Default is "%(default)s".',
|
697
695
|
)
|
698
696
|
opt.add_argument(
|
699
697
|
'-C',
|
700
698
|
'--cache-dir',
|
701
699
|
default=str(cache_dir),
|
702
|
-
help='specify cache dir for downloads. Default is "%(default)s"',
|
700
|
+
help='specify cache dir for downloads. Default is "%(default)s".',
|
703
701
|
)
|
704
702
|
opt.add_argument(
|
705
703
|
'-M',
|
@@ -708,7 +706,7 @@ def main() -> str | None:
|
|
708
706
|
type=float,
|
709
707
|
help='cache latest YYYYMMDD release tag fetch for this '
|
710
708
|
'many minutes, before rechecking for latest. '
|
711
|
-
'Default is %(default)d minutes',
|
709
|
+
'Default is %(default)d minutes.',
|
712
710
|
)
|
713
711
|
opt.add_argument(
|
714
712
|
'--purge-days',
|
@@ -716,7 +714,7 @@ def main() -> str | None:
|
|
716
714
|
type=int,
|
717
715
|
help='cache YYYYMMDD release file lists and downloads for '
|
718
716
|
'this number of days after last version referencing that '
|
719
|
-
'release is removed. Default is %(default)d days',
|
717
|
+
'release is removed. Default is %(default)d days.',
|
720
718
|
)
|
721
719
|
opt.add_argument(
|
722
720
|
'--github-access-token',
|
@@ -728,7 +726,7 @@ def main() -> str | None:
|
|
728
726
|
opt.add_argument(
|
729
727
|
'--cert',
|
730
728
|
choices=CERTS,
|
731
|
-
help=f'specify which SSL certificates to use for HTTPS requests. Default="{CERTS[0]}"',
|
729
|
+
help=f'specify which SSL certificates to use for HTTPS requests. Default="{CERTS[0]}".',
|
732
730
|
)
|
733
731
|
opt.add_argument(
|
734
732
|
'-V', '--version', action='store_true', help=f'just show {PROG} version'
|
@@ -763,18 +761,7 @@ def main() -> str | None:
|
|
763
761
|
|
764
762
|
# Command arguments are now defined, so we can set up argcomplete
|
765
763
|
argcomplete.autocomplete(opt)
|
766
|
-
|
767
|
-
# Merge in default args from user config file. Then parse the
|
768
|
-
# command line.
|
769
|
-
cnffile = CNFFILE.expanduser()
|
770
|
-
if cnffile.is_file():
|
771
|
-
with cnffile.open() as fp:
|
772
|
-
lines = [re.sub(r'#.*$', '', line).strip() for line in fp]
|
773
|
-
cnflines = ' '.join(lines).strip()
|
774
|
-
else:
|
775
|
-
cnflines = ''
|
776
|
-
|
777
|
-
args = opt.parse_args(shlex.split(cnflines) + sys.argv[1:])
|
764
|
+
args = opt.parse_args()
|
778
765
|
|
779
766
|
if 'func' not in args:
|
780
767
|
if args.version:
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|