mirror of
https://github.com/vale981/melpazoid
synced 2025-03-05 09:21:39 -05:00
fix: better align "main" file detection with package-build
This commit is contained in:
parent
d693294c68
commit
32a976753b
1 changed files with 5 additions and 0 deletions
|
@ -248,8 +248,13 @@ def _main_file(files: List[str], recipe: str) -> str:
|
||||||
try:
|
try:
|
||||||
return next(
|
return next(
|
||||||
el
|
el
|
||||||
|
# the code in #'package-build--build-multi-file-package that
|
||||||
|
# determines the 'main' file is not quite exposed but it first
|
||||||
|
# looks for name-pkg.el, then name-pkg.el.in, and then name.el,
|
||||||
|
# which happens to match sorted() order:
|
||||||
for el in sorted(files)
|
for el in sorted(files)
|
||||||
if os.path.basename(el) == f"{name}-pkg.el"
|
if os.path.basename(el) == f"{name}-pkg.el"
|
||||||
|
or os.path.basename(el) == f"{name}-pkg.el.in"
|
||||||
or os.path.basename(el) == f"{name}.el"
|
or os.path.basename(el) == f"{name}.el"
|
||||||
)
|
)
|
||||||
except StopIteration:
|
except StopIteration:
|
||||||
|
|
Loading…
Add table
Reference in a new issue