ducktools-pythonfinder 0.6.0__tar.gz → 0.6.2__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.0/src/ducktools_pythonfinder.egg-info → ducktools_pythonfinder-0.6.2}/PKG-INFO +1 -1
- {ducktools_pythonfinder-0.6.0 → ducktools_pythonfinder-0.6.2}/src/ducktools/pythonfinder/__main__.py +4 -1
- ducktools_pythonfinder-0.6.2/src/ducktools/pythonfinder/_version.py +2 -0
- {ducktools_pythonfinder-0.6.0 → ducktools_pythonfinder-0.6.2}/src/ducktools/pythonfinder/shared.py +23 -14
- {ducktools_pythonfinder-0.6.0 → ducktools_pythonfinder-0.6.2/src/ducktools_pythonfinder.egg-info}/PKG-INFO +1 -1
- ducktools_pythonfinder-0.6.0/src/ducktools/pythonfinder/_version.py +0 -2
- {ducktools_pythonfinder-0.6.0 → ducktools_pythonfinder-0.6.2}/.gitignore +0 -0
- {ducktools_pythonfinder-0.6.0 → ducktools_pythonfinder-0.6.2}/LICENSE +0 -0
- {ducktools_pythonfinder-0.6.0 → ducktools_pythonfinder-0.6.2}/MANIFEST.in +0 -0
- {ducktools_pythonfinder-0.6.0 → ducktools_pythonfinder-0.6.2}/README.md +0 -0
- {ducktools_pythonfinder-0.6.0 → ducktools_pythonfinder-0.6.2}/pyproject.toml +0 -0
- {ducktools_pythonfinder-0.6.0 → ducktools_pythonfinder-0.6.2}/scripts/build_zipapp.py +0 -0
- {ducktools_pythonfinder-0.6.0 → ducktools_pythonfinder-0.6.2}/scripts/detail_this_python.py +0 -0
- {ducktools_pythonfinder-0.6.0 → ducktools_pythonfinder-0.6.2}/scripts/print_python_versions.py +0 -0
- {ducktools_pythonfinder-0.6.0 → ducktools_pythonfinder-0.6.2}/setup.cfg +0 -0
- {ducktools_pythonfinder-0.6.0 → ducktools_pythonfinder-0.6.2}/src/ducktools/pythonfinder/__init__.py +0 -0
- {ducktools_pythonfinder-0.6.0 → ducktools_pythonfinder-0.6.2}/src/ducktools/pythonfinder/darwin/__init__.py +0 -0
- {ducktools_pythonfinder-0.6.0 → ducktools_pythonfinder-0.6.2}/src/ducktools/pythonfinder/details_script.py +0 -0
- {ducktools_pythonfinder-0.6.0 → ducktools_pythonfinder-0.6.2}/src/ducktools/pythonfinder/linux/__init__.py +0 -0
- {ducktools_pythonfinder-0.6.0 → ducktools_pythonfinder-0.6.2}/src/ducktools/pythonfinder/linux/pyenv_search.py +0 -0
- {ducktools_pythonfinder-0.6.0 → ducktools_pythonfinder-0.6.2}/src/ducktools/pythonfinder/pythonorg_search.py +0 -0
- {ducktools_pythonfinder-0.6.0 → ducktools_pythonfinder-0.6.2}/src/ducktools/pythonfinder/win32/__init__.py +0 -0
- {ducktools_pythonfinder-0.6.0 → ducktools_pythonfinder-0.6.2}/src/ducktools/pythonfinder/win32/pyenv_search.py +0 -0
- {ducktools_pythonfinder-0.6.0 → ducktools_pythonfinder-0.6.2}/src/ducktools/pythonfinder/win32/registry_search.py +0 -0
- {ducktools_pythonfinder-0.6.0 → ducktools_pythonfinder-0.6.2}/src/ducktools_pythonfinder.egg-info/SOURCES.txt +0 -0
- {ducktools_pythonfinder-0.6.0 → ducktools_pythonfinder-0.6.2}/src/ducktools_pythonfinder.egg-info/dependency_links.txt +0 -0
- {ducktools_pythonfinder-0.6.0 → ducktools_pythonfinder-0.6.2}/src/ducktools_pythonfinder.egg-info/entry_points.txt +0 -0
- {ducktools_pythonfinder-0.6.0 → ducktools_pythonfinder-0.6.2}/src/ducktools_pythonfinder.egg-info/requires.txt +0 -0
- {ducktools_pythonfinder-0.6.0 → ducktools_pythonfinder-0.6.2}/src/ducktools_pythonfinder.egg-info/top_level.txt +0 -0
- {ducktools_pythonfinder-0.6.0 → ducktools_pythonfinder-0.6.2}/tests/conftest.py +0 -0
- {ducktools_pythonfinder-0.6.0 → ducktools_pythonfinder-0.6.2}/tests/sources/python_versions.txt +0 -0
- {ducktools_pythonfinder-0.6.0 → ducktools_pythonfinder-0.6.2}/tests/sources/release.json +0 -0
- {ducktools_pythonfinder-0.6.0 → ducktools_pythonfinder-0.6.2}/tests/sources/release_file.json +0 -0
- {ducktools_pythonfinder-0.6.0 → ducktools_pythonfinder-0.6.2}/tests/test_details_script.py +0 -0
- {ducktools_pythonfinder-0.6.0 → ducktools_pythonfinder-0.6.2}/tests/test_foldersearch.py +0 -0
- {ducktools_pythonfinder-0.6.0 → ducktools_pythonfinder-0.6.2}/tests/test_orgsearch.py +0 -0
- {ducktools_pythonfinder-0.6.0 → ducktools_pythonfinder-0.6.2}/tests/test_pyenv.py +0 -0
- {ducktools_pythonfinder-0.6.0 → ducktools_pythonfinder-0.6.2}/tests/test_shared.py +0 -0
- {ducktools_pythonfinder-0.6.0 → ducktools_pythonfinder-0.6.2}/tests/test_uv_finder.py +0 -0
{ducktools_pythonfinder-0.6.0 → ducktools_pythonfinder-0.6.2}/src/ducktools/pythonfinder/__main__.py
RENAMED
|
@@ -184,7 +184,10 @@ def display_local_installs(
|
|
|
184
184
|
if install.shadowed:
|
|
185
185
|
version_str = f"[{version_str}]"
|
|
186
186
|
|
|
187
|
-
if
|
|
187
|
+
if (
|
|
188
|
+
install.implementation != "cpython"
|
|
189
|
+
and install.implementation_version != install.version
|
|
190
|
+
):
|
|
188
191
|
alternate_implementations = True
|
|
189
192
|
version_str = f"({install.implementation_version_str}) {version_str}"
|
|
190
193
|
|
{ducktools_pythonfinder-0.6.0 → ducktools_pythonfinder-0.6.2}/src/ducktools/pythonfinder/shared.py
RENAMED
|
@@ -88,7 +88,7 @@ def version_tuple_to_str(version_tuple):
|
|
|
88
88
|
else:
|
|
89
89
|
releaselevel = ""
|
|
90
90
|
|
|
91
|
-
if serial == 0:
|
|
91
|
+
if serial == 0 or not releaselevel:
|
|
92
92
|
serial = ""
|
|
93
93
|
else:
|
|
94
94
|
serial = f"{serial}"
|
|
@@ -151,13 +151,14 @@ class PythonInstall(Prefab):
|
|
|
151
151
|
@property
|
|
152
152
|
def implementation_version(self) -> tuple[int, int, int, str, int] | None:
|
|
153
153
|
if self._implementation_version is None:
|
|
154
|
-
if self.implementation
|
|
155
|
-
self._implementation_version = self.version
|
|
156
|
-
elif implementation_ver := self.metadata.get(f"{self.implementation}_version"):
|
|
154
|
+
if implementation_ver := self.metadata.get(f"{self.implementation}_version"):
|
|
157
155
|
if len(implementation_ver) == 3:
|
|
158
156
|
self._implementation_version = tuple([*implementation_ver, "final", 0]) # type: ignore
|
|
159
157
|
else:
|
|
160
158
|
self._implementation_version = implementation_ver
|
|
159
|
+
else:
|
|
160
|
+
self._implementation_version = self.version
|
|
161
|
+
|
|
161
162
|
return self._implementation_version
|
|
162
163
|
|
|
163
164
|
@property
|
|
@@ -273,11 +274,18 @@ def get_folder_pythons(
|
|
|
273
274
|
with os.scandir(base_folder) as fld:
|
|
274
275
|
for file_path in fld:
|
|
275
276
|
if (
|
|
276
|
-
|
|
277
|
-
and file_path.is_file()
|
|
277
|
+
file_path.is_file()
|
|
278
278
|
and any(reg.fullmatch(file_path.name) for reg in regexes)
|
|
279
279
|
):
|
|
280
|
-
|
|
280
|
+
p = file_path.path
|
|
281
|
+
if file_path.is_symlink():
|
|
282
|
+
# Might be a venv - look for pyvenv.cfg in parent
|
|
283
|
+
fld = os.path.dirname(p)
|
|
284
|
+
if os.path.exists(os.path.join(fld, "../pyvenv.cfg")):
|
|
285
|
+
continue
|
|
286
|
+
else:
|
|
287
|
+
p = file_path.path
|
|
288
|
+
install = get_install_details(p)
|
|
281
289
|
if install:
|
|
282
290
|
yield install
|
|
283
291
|
|
|
@@ -337,10 +345,11 @@ def get_uv_pythons(query_executables=True) -> Iterator[PythonInstall]:
|
|
|
337
345
|
# This takes some shortcuts over the regular pythonfinder
|
|
338
346
|
# As the UV folders give the python version and the implementation
|
|
339
347
|
if uv_python_path := get_uv_python_path():
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
348
|
+
if os.path.exists(uv_python_path):
|
|
349
|
+
with os.scandir(uv_python_path) as fld:
|
|
350
|
+
for f in fld:
|
|
351
|
+
if (
|
|
352
|
+
f.is_dir()
|
|
353
|
+
and (install := _implementation_from_uv_dir(f, query_executables))
|
|
354
|
+
):
|
|
355
|
+
yield install
|
|
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.0 → ducktools_pythonfinder-0.6.2}/scripts/print_python_versions.py
RENAMED
|
File without changes
|
|
File without changes
|
{ducktools_pythonfinder-0.6.0 → ducktools_pythonfinder-0.6.2}/src/ducktools/pythonfinder/__init__.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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{ducktools_pythonfinder-0.6.0 → ducktools_pythonfinder-0.6.2}/tests/sources/python_versions.txt
RENAMED
|
File without changes
|
|
File without changes
|
{ducktools_pythonfinder-0.6.0 → ducktools_pythonfinder-0.6.2}/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
|