mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-08-04 14:46:03 +00:00
Honor verbose flag when building shaders
This commit is contained in:
parent
66562a0d57
commit
f4cb2bc3a3
2 changed files with 4 additions and 2 deletions
|
|
@ -843,6 +843,7 @@ def main() -> None:
|
|||
if not shutil.which(slangc()[0]):
|
||||
raise SystemExit(f'The shader slang compiler ({slangc()[0]}) not in PATH: {os.environ.get("PATH")}')
|
||||
setup = runpy.run_path('setup.py')
|
||||
verbose = sys.argv[-3] == 'verbose'
|
||||
Command = setup['Command']
|
||||
parallel_run = setup['parallel_run']
|
||||
emphasis = setup['emphasis']
|
||||
|
|
@ -854,7 +855,7 @@ def main() -> None:
|
|||
if needs_build:
|
||||
desc = re.sub(r'\|(.+?)\|', lambda m: emphasis(m.group(1)), desc)
|
||||
needed.append(Command(desc, cmd, lambda: True))
|
||||
parallel_run(needed)
|
||||
parallel_run(needed, verbose)
|
||||
|
||||
compile_builtin_shaders(sys.argv[-2], sys.argv[-1], prun)
|
||||
|
||||
|
|
|
|||
3
setup.py
3
setup.py
|
|
@ -990,7 +990,7 @@ def dependecies_for(src: str, obj: str, all_headers: Iterable[str]) -> Iterable[
|
|||
yield path
|
||||
|
||||
|
||||
def parallel_run(items: List[Command]) -> None:
|
||||
def parallel_run(items: List[Command], verbose: bool = verbose) -> None:
|
||||
try:
|
||||
num_workers = max(2, os.cpu_count() or 1)
|
||||
except Exception:
|
||||
|
|
@ -1395,6 +1395,7 @@ def build_shaders(args: Options, kitty_exe: str, for_freeze: bool) -> None:
|
|||
kitty_exe,
|
||||
'+launch',
|
||||
os.path.join(src_base, 'kitty/shaders/slang.py'),
|
||||
'verbose' if verbose else '',
|
||||
'build/shaders',
|
||||
'shaders',
|
||||
],
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue