pyappify 1.0.10__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pyappify
3
- Version: 1.0.10
3
+ Version: 1.0.11
4
4
  Summary: My awesome Python application
5
5
  Classifier: Programming Language :: Python :: 3
6
6
  Classifier: License :: OSI Approved :: MIT License
@@ -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
- exact_launcher_name = "{} Launcher.exe".format(app_name).casefold()
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
- try:
107
- candidates = [
108
- candidate
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 an executable whose name starts with the app name "
336
- "in the working directory or a parent directory."
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
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pyappify
3
- Version: 1.0.10
3
+ Version: 1.0.11
4
4
  Summary: My awesome Python application
5
5
  Classifier: Programming Language :: Python :: 3
6
6
  Classifier: License :: OSI Approved :: MIT License
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "pyappify"
7
- version = "1.0.10"
7
+ version = "1.0.11"
8
8
  description = "My awesome Python application"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.7"
File without changes
File without changes