pyappify 1.0.10__tar.gz → 1.0.13__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.
- {pyappify-1.0.10 → pyappify-1.0.13}/PKG-INFO +1 -1
- {pyappify-1.0.10 → pyappify-1.0.13}/pyappify/__init__.py +25 -21
- {pyappify-1.0.10 → pyappify-1.0.13}/pyappify.egg-info/PKG-INFO +1 -1
- {pyappify-1.0.10 → pyappify-1.0.13}/pyproject.toml +1 -1
- {pyappify-1.0.10 → pyappify-1.0.13}/pyappify/app_config.py +0 -0
- {pyappify-1.0.10 → pyappify-1.0.13}/pyappify/main.py +0 -0
- {pyappify-1.0.10 → pyappify-1.0.13}/pyappify.egg-info/SOURCES.txt +0 -0
- {pyappify-1.0.10 → pyappify-1.0.13}/pyappify.egg-info/dependency_links.txt +0 -0
- {pyappify-1.0.10 → pyappify-1.0.13}/pyappify.egg-info/entry_points.txt +0 -0
- {pyappify-1.0.10 → pyappify-1.0.13}/pyappify.egg-info/requires.txt +0 -0
- {pyappify-1.0.10 → pyappify-1.0.13}/pyappify.egg-info/top_level.txt +0 -0
- {pyappify-1.0.10 → pyappify-1.0.13}/setup.cfg +0 -0
|
@@ -93,7 +93,7 @@ def find_pyappify_executable(start_dir=None, environ=None):
|
|
|
93
93
|
return None
|
|
94
94
|
|
|
95
95
|
app_root = data_directory.parent
|
|
96
|
-
|
|
96
|
+
executable_name = "{}.exe".format(app_name)
|
|
97
97
|
search_directories = []
|
|
98
98
|
directory = working_directory
|
|
99
99
|
while True:
|
|
@@ -103,24 +103,9 @@ def find_pyappify_executable(start_dir=None, environ=None):
|
|
|
103
103
|
directory = directory.parent
|
|
104
104
|
|
|
105
105
|
for directory in search_directories:
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
for candidate in directory.iterdir()
|
|
110
|
-
if candidate.is_file()
|
|
111
|
-
and candidate.suffix.casefold() == ".exe"
|
|
112
|
-
and candidate.name.casefold().startswith(app_name.casefold())
|
|
113
|
-
]
|
|
114
|
-
except OSError:
|
|
115
|
-
continue
|
|
116
|
-
if candidates:
|
|
117
|
-
candidates.sort(
|
|
118
|
-
key=lambda candidate: (
|
|
119
|
-
candidate.name.casefold() != exact_launcher_name,
|
|
120
|
-
candidate.name.casefold(),
|
|
121
|
-
)
|
|
122
|
-
)
|
|
123
|
-
return str(candidates[0].resolve())
|
|
106
|
+
candidate = directory / executable_name
|
|
107
|
+
if candidate.is_file():
|
|
108
|
+
return str(candidate.resolve())
|
|
124
109
|
return None
|
|
125
110
|
|
|
126
111
|
|
|
@@ -332,8 +317,8 @@ def _require_pyappify_executable():
|
|
|
332
317
|
if not pyappify_executable:
|
|
333
318
|
raise FileNotFoundError(
|
|
334
319
|
"PyAppify executable was not found. Set PYAPPIFY_EXECUTABLE to an "
|
|
335
|
-
"existing executable or place
|
|
336
|
-
"
|
|
320
|
+
"existing executable or place <app_name>.exe between the working directory "
|
|
321
|
+
"and the app root."
|
|
337
322
|
)
|
|
338
323
|
return pyappify_executable
|
|
339
324
|
|
|
@@ -427,6 +412,12 @@ def get_version_list(
|
|
|
427
412
|
if not isinstance(release_only, bool):
|
|
428
413
|
raise TypeError("release_only must be a boolean")
|
|
429
414
|
|
|
415
|
+
if not _is_supported_pyappify_version(pyappify_version):
|
|
416
|
+
raise RuntimeError(
|
|
417
|
+
"PyAppify does not support checking for updates for "
|
|
418
|
+
f"pyappify_version: {pyappify_version}"
|
|
419
|
+
)
|
|
420
|
+
|
|
430
421
|
if "PYAPPIFY_PYTHON_TEST" in os.environ:
|
|
431
422
|
if _wait_for_exit(exit_event, 5):
|
|
432
423
|
_raise_if_exit_requested(exit_event)
|
|
@@ -448,6 +439,19 @@ def get_version_list(
|
|
|
448
439
|
return response
|
|
449
440
|
|
|
450
441
|
|
|
442
|
+
def _is_supported_pyappify_version(version):
|
|
443
|
+
"""Return whether a PyAppify version is valid and supports version checks."""
|
|
444
|
+
if not isinstance(version, str) or not version:
|
|
445
|
+
return False
|
|
446
|
+
|
|
447
|
+
normalized = version[1:] if version.startswith("v") else version
|
|
448
|
+
parts = normalized.split(".")
|
|
449
|
+
if not parts or any(not part.isdigit() for part in parts):
|
|
450
|
+
return False
|
|
451
|
+
|
|
452
|
+
return tuple(int(part) for part in parts) >= (1, 2, 2)
|
|
453
|
+
|
|
454
|
+
|
|
451
455
|
def get_versions(number_versions=10, release_only=True, timeout=120, exit_event=None):
|
|
452
456
|
"""Alias for get_version_list."""
|
|
453
457
|
return get_version_list(number_versions, release_only, timeout, exit_event)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|