mirror of
https://github.com/kovidgoyal/kitty
synced 2026-06-08 14:18:26 +02:00
Set building flag globally
This commit is contained in:
2
setup.py
2
setup.py
@@ -26,6 +26,7 @@ from glfw import glfw
|
|||||||
from glfw.glfw import ISA, BinaryArch, Command, CompileKey, CompilerType
|
from glfw.glfw import ISA, BinaryArch, Command, CompileKey, CompilerType
|
||||||
|
|
||||||
src_base = os.path.dirname(os.path.abspath(__file__))
|
src_base = os.path.dirname(os.path.abspath(__file__))
|
||||||
|
setattr(sys, 'running_from_setup', True)
|
||||||
|
|
||||||
def check_version_info() -> None:
|
def check_version_info() -> None:
|
||||||
with open(os.path.join(src_base, 'pyproject.toml')) as f:
|
with open(os.path.join(src_base, 'pyproject.toml')) as f:
|
||||||
@@ -1128,7 +1129,6 @@ def build_ref_map(skip_generation: bool = False) -> str:
|
|||||||
def build_cli_parser_specs(skip_generation: bool = False) -> str:
|
def build_cli_parser_specs(skip_generation: bool = False) -> str:
|
||||||
dest = 'kitty/launcher/cli-parser-data_generated.h'
|
dest = 'kitty/launcher/cli-parser-data_generated.h'
|
||||||
if not skip_generation:
|
if not skip_generation:
|
||||||
setattr(sys, 'running_from_setup', True)
|
|
||||||
m = runpy.run_path('kitty/simple_cli_definitions.py', {'appname': appname})
|
m = runpy.run_path('kitty/simple_cli_definitions.py', {'appname': appname})
|
||||||
h = '\n'.join(m['generate_c_parsers']())
|
h = '\n'.join(m['generate_c_parsers']())
|
||||||
update_if_changed(dest, h)
|
update_if_changed(dest, h)
|
||||||
|
|||||||
Reference in New Issue
Block a user