pyappify 1.0.9__tar.gz → 1.0.11__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.9 → pyappify-1.0.11}/PKG-INFO +1 -1
- {pyappify-1.0.9 → pyappify-1.0.11}/pyappify/__init__.py +35 -8
- {pyappify-1.0.9 → pyappify-1.0.11}/pyappify.egg-info/PKG-INFO +1 -1
- {pyappify-1.0.9 → pyappify-1.0.11}/pyproject.toml +1 -1
- {pyappify-1.0.9 → pyappify-1.0.11}/pyappify/app_config.py +0 -0
- {pyappify-1.0.9 → pyappify-1.0.11}/pyappify/main.py +0 -0
- {pyappify-1.0.9 → pyappify-1.0.11}/pyappify.egg-info/SOURCES.txt +0 -0
- {pyappify-1.0.9 → pyappify-1.0.11}/pyappify.egg-info/dependency_links.txt +0 -0
- {pyappify-1.0.9 → pyappify-1.0.11}/pyappify.egg-info/entry_points.txt +0 -0
- {pyappify-1.0.9 → pyappify-1.0.11}/pyappify.egg-info/requires.txt +0 -0
- {pyappify-1.0.9 → pyappify-1.0.11}/pyappify.egg-info/top_level.txt +0 -0
- {pyappify-1.0.9 → pyappify-1.0.11}/setup.cfg +0 -0
|
@@ -58,13 +58,14 @@ except ImportError:
|
|
|
58
58
|
|
|
59
59
|
|
|
60
60
|
def find_pyappify_executable(start_dir=None, environ=None):
|
|
61
|
-
"""Find the
|
|
61
|
+
"""Find the configured launcher or an app launcher above ``working``."""
|
|
62
62
|
environ = os.environ if environ is None else environ
|
|
63
63
|
configured = environ.get("PYAPPIFY_EXECUTABLE")
|
|
64
64
|
if configured:
|
|
65
65
|
configured_path = Path(configured).expanduser()
|
|
66
66
|
if configured_path.is_file():
|
|
67
67
|
return str(configured_path.resolve())
|
|
68
|
+
return None
|
|
68
69
|
|
|
69
70
|
current = Path(start_dir or os.getcwd()).expanduser()
|
|
70
71
|
if current.is_file():
|
|
@@ -74,12 +75,37 @@ def find_pyappify_executable(start_dir=None, environ=None):
|
|
|
74
75
|
except OSError:
|
|
75
76
|
current = current.absolute()
|
|
76
77
|
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
if
|
|
82
|
-
|
|
78
|
+
working_directory = next(
|
|
79
|
+
(
|
|
80
|
+
directory
|
|
81
|
+
for directory in (current,) + tuple(current.parents)
|
|
82
|
+
if directory.name.casefold() == "working" and directory.parent.name
|
|
83
|
+
),
|
|
84
|
+
None,
|
|
85
|
+
)
|
|
86
|
+
if working_directory is None:
|
|
87
|
+
return None
|
|
88
|
+
|
|
89
|
+
app_name = working_directory.parent.name
|
|
90
|
+
apps_directory = working_directory.parent.parent
|
|
91
|
+
data_directory = apps_directory.parent
|
|
92
|
+
if apps_directory.name.casefold() != "apps" or data_directory.name.casefold() != "data":
|
|
93
|
+
return None
|
|
94
|
+
|
|
95
|
+
app_root = data_directory.parent
|
|
96
|
+
executable_name = "{}.exe".format(app_name)
|
|
97
|
+
search_directories = []
|
|
98
|
+
directory = working_directory
|
|
99
|
+
while True:
|
|
100
|
+
search_directories.append(directory)
|
|
101
|
+
if directory == app_root:
|
|
102
|
+
break
|
|
103
|
+
directory = directory.parent
|
|
104
|
+
|
|
105
|
+
for directory in search_directories:
|
|
106
|
+
candidate = directory / executable_name
|
|
107
|
+
if candidate.is_file():
|
|
108
|
+
return str(candidate.resolve())
|
|
83
109
|
return None
|
|
84
110
|
|
|
85
111
|
|
|
@@ -291,7 +317,8 @@ def _require_pyappify_executable():
|
|
|
291
317
|
if not pyappify_executable:
|
|
292
318
|
raise FileNotFoundError(
|
|
293
319
|
"PyAppify executable was not found. Set PYAPPIFY_EXECUTABLE to an "
|
|
294
|
-
"existing executable or place
|
|
320
|
+
"existing executable or place <app_name>.exe between the working directory "
|
|
321
|
+
"and the app root."
|
|
295
322
|
)
|
|
296
323
|
return pyappify_executable
|
|
297
324
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|