ducktools-pythonfinder 0.6.6__tar.gz → 0.6.7__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.
- {ducktools_pythonfinder-0.6.6/src/ducktools_pythonfinder.egg-info → ducktools_pythonfinder-0.6.7}/PKG-INFO +1 -1
- {ducktools_pythonfinder-0.6.6 → ducktools_pythonfinder-0.6.7}/src/ducktools/pythonfinder/__main__.py +39 -6
- ducktools_pythonfinder-0.6.7/src/ducktools/pythonfinder/_version.py +2 -0
- {ducktools_pythonfinder-0.6.6 → ducktools_pythonfinder-0.6.7/src/ducktools_pythonfinder.egg-info}/PKG-INFO +1 -1
- ducktools_pythonfinder-0.6.6/src/ducktools/pythonfinder/_version.py +0 -2
- {ducktools_pythonfinder-0.6.6 → ducktools_pythonfinder-0.6.7}/.gitignore +0 -0
- {ducktools_pythonfinder-0.6.6 → ducktools_pythonfinder-0.6.7}/LICENSE +0 -0
- {ducktools_pythonfinder-0.6.6 → ducktools_pythonfinder-0.6.7}/MANIFEST.in +0 -0
- {ducktools_pythonfinder-0.6.6 → ducktools_pythonfinder-0.6.7}/README.md +0 -0
- {ducktools_pythonfinder-0.6.6 → ducktools_pythonfinder-0.6.7}/pyproject.toml +0 -0
- {ducktools_pythonfinder-0.6.6 → ducktools_pythonfinder-0.6.7}/scripts/build_zipapp.py +0 -0
- {ducktools_pythonfinder-0.6.6 → ducktools_pythonfinder-0.6.7}/scripts/detail_this_python.py +0 -0
- {ducktools_pythonfinder-0.6.6 → ducktools_pythonfinder-0.6.7}/scripts/print_python_versions.py +0 -0
- {ducktools_pythonfinder-0.6.6 → ducktools_pythonfinder-0.6.7}/setup.cfg +0 -0
- {ducktools_pythonfinder-0.6.6 → ducktools_pythonfinder-0.6.7}/src/ducktools/pythonfinder/__init__.py +0 -0
- {ducktools_pythonfinder-0.6.6 → ducktools_pythonfinder-0.6.7}/src/ducktools/pythonfinder/darwin/__init__.py +0 -0
- {ducktools_pythonfinder-0.6.6 → ducktools_pythonfinder-0.6.7}/src/ducktools/pythonfinder/details_script.py +0 -0
- {ducktools_pythonfinder-0.6.6 → ducktools_pythonfinder-0.6.7}/src/ducktools/pythonfinder/linux/__init__.py +0 -0
- {ducktools_pythonfinder-0.6.6 → ducktools_pythonfinder-0.6.7}/src/ducktools/pythonfinder/linux/pyenv_search.py +0 -0
- {ducktools_pythonfinder-0.6.6 → ducktools_pythonfinder-0.6.7}/src/ducktools/pythonfinder/pythonorg_search.py +0 -0
- {ducktools_pythonfinder-0.6.6 → ducktools_pythonfinder-0.6.7}/src/ducktools/pythonfinder/shared.py +0 -0
- {ducktools_pythonfinder-0.6.6 → ducktools_pythonfinder-0.6.7}/src/ducktools/pythonfinder/win32/__init__.py +0 -0
- {ducktools_pythonfinder-0.6.6 → ducktools_pythonfinder-0.6.7}/src/ducktools/pythonfinder/win32/pyenv_search.py +0 -0
- {ducktools_pythonfinder-0.6.6 → ducktools_pythonfinder-0.6.7}/src/ducktools/pythonfinder/win32/registry_search.py +0 -0
- {ducktools_pythonfinder-0.6.6 → ducktools_pythonfinder-0.6.7}/src/ducktools_pythonfinder.egg-info/SOURCES.txt +0 -0
- {ducktools_pythonfinder-0.6.6 → ducktools_pythonfinder-0.6.7}/src/ducktools_pythonfinder.egg-info/dependency_links.txt +0 -0
- {ducktools_pythonfinder-0.6.6 → ducktools_pythonfinder-0.6.7}/src/ducktools_pythonfinder.egg-info/entry_points.txt +0 -0
- {ducktools_pythonfinder-0.6.6 → ducktools_pythonfinder-0.6.7}/src/ducktools_pythonfinder.egg-info/requires.txt +0 -0
- {ducktools_pythonfinder-0.6.6 → ducktools_pythonfinder-0.6.7}/src/ducktools_pythonfinder.egg-info/top_level.txt +0 -0
- {ducktools_pythonfinder-0.6.6 → ducktools_pythonfinder-0.6.7}/tests/conftest.py +0 -0
- {ducktools_pythonfinder-0.6.6 → ducktools_pythonfinder-0.6.7}/tests/sources/python_versions.txt +0 -0
- {ducktools_pythonfinder-0.6.6 → ducktools_pythonfinder-0.6.7}/tests/sources/release.json +0 -0
- {ducktools_pythonfinder-0.6.6 → ducktools_pythonfinder-0.6.7}/tests/sources/release_file.json +0 -0
- {ducktools_pythonfinder-0.6.6 → ducktools_pythonfinder-0.6.7}/tests/test_details_script.py +0 -0
- {ducktools_pythonfinder-0.6.6 → ducktools_pythonfinder-0.6.7}/tests/test_foldersearch.py +0 -0
- {ducktools_pythonfinder-0.6.6 → ducktools_pythonfinder-0.6.7}/tests/test_orgsearch.py +0 -0
- {ducktools_pythonfinder-0.6.6 → ducktools_pythonfinder-0.6.7}/tests/test_pyenv.py +0 -0
- {ducktools_pythonfinder-0.6.6 → ducktools_pythonfinder-0.6.7}/tests/test_shared.py +0 -0
- {ducktools_pythonfinder-0.6.6 → ducktools_pythonfinder-0.6.7}/tests/test_uv_finder.py +0 -0
{ducktools_pythonfinder-0.6.6 → ducktools_pythonfinder-0.6.7}/src/ducktools/pythonfinder/__main__.py
RENAMED
|
@@ -74,8 +74,42 @@ def stop_autoclose():
|
|
|
74
74
|
_laz.subprocess.run("pause", shell=True)
|
|
75
75
|
|
|
76
76
|
|
|
77
|
-
def
|
|
78
|
-
|
|
77
|
+
def _get_parser_class():
|
|
78
|
+
# This class is deferred to avoid the argparse import
|
|
79
|
+
# if there are no arguments to parse
|
|
80
|
+
|
|
81
|
+
class FixedArgumentParser(_laz.argparse.ArgumentParser):
|
|
82
|
+
"""
|
|
83
|
+
The builtin argument parser uses shutil to figure out the terminal width
|
|
84
|
+
to display help info. This one replaces the function that calls help info
|
|
85
|
+
and plugs in a value for width.
|
|
86
|
+
|
|
87
|
+
This prevents the unnecessary import.
|
|
88
|
+
"""
|
|
89
|
+
|
|
90
|
+
def _get_formatter(self):
|
|
91
|
+
# Calculate width
|
|
92
|
+
try:
|
|
93
|
+
columns = int(os.environ['COLUMNS'])
|
|
94
|
+
except (KeyError, ValueError):
|
|
95
|
+
try:
|
|
96
|
+
size = os.get_terminal_size()
|
|
97
|
+
except (AttributeError, ValueError, OSError):
|
|
98
|
+
# get_terminal_size unsupported
|
|
99
|
+
columns = 80
|
|
100
|
+
else:
|
|
101
|
+
columns = size.columns
|
|
102
|
+
|
|
103
|
+
# noinspection PyArgumentList
|
|
104
|
+
return self.formatter_class(prog=self.prog, width=columns - 2)
|
|
105
|
+
|
|
106
|
+
return FixedArgumentParser
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
def get_parser():
|
|
110
|
+
FixedArgumentParser = _get_parser_class() # noqa
|
|
111
|
+
|
|
112
|
+
parser = FixedArgumentParser(
|
|
79
113
|
prog="ducktools-pythonfinder",
|
|
80
114
|
description="Discover base Python installs",
|
|
81
115
|
)
|
|
@@ -122,9 +156,7 @@ def parse_args(args):
|
|
|
122
156
|
help="Include prerelease versions"
|
|
123
157
|
)
|
|
124
158
|
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
return vals
|
|
159
|
+
return parser
|
|
128
160
|
|
|
129
161
|
|
|
130
162
|
def display_local_installs(
|
|
@@ -270,7 +302,8 @@ def main():
|
|
|
270
302
|
)
|
|
271
303
|
|
|
272
304
|
if sys.argv[1:]:
|
|
273
|
-
|
|
305
|
+
parser = get_parser()
|
|
306
|
+
vals = parser.parse_args(sys.argv[1:])
|
|
274
307
|
|
|
275
308
|
if vals.command == "online":
|
|
276
309
|
system = vals.system if vals.system else _laz.platform.system()
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{ducktools_pythonfinder-0.6.6 → ducktools_pythonfinder-0.6.7}/scripts/print_python_versions.py
RENAMED
|
File without changes
|
|
File without changes
|
{ducktools_pythonfinder-0.6.6 → ducktools_pythonfinder-0.6.7}/src/ducktools/pythonfinder/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{ducktools_pythonfinder-0.6.6 → ducktools_pythonfinder-0.6.7}/src/ducktools/pythonfinder/shared.py
RENAMED
|
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
|
{ducktools_pythonfinder-0.6.6 → ducktools_pythonfinder-0.6.7}/tests/sources/python_versions.txt
RENAMED
|
File without changes
|
|
File without changes
|
{ducktools_pythonfinder-0.6.6 → ducktools_pythonfinder-0.6.7}/tests/sources/release_file.json
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|