Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make build reproducible #6685

Merged
merged 1 commit into from Oct 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions gen-go-code.py
Expand Up @@ -822,6 +822,7 @@ def generate_ssh_kitten_data() -> None:
def normalize(t: tarfile.TarInfo) -> tarfile.TarInfo:
t.uid = t.gid = 0
t.uname = t.gname = ''
t.mtime = 0
return t

if newer(dest, *files):
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Expand Up @@ -843,7 +843,7 @@ def build_ref_map(skip_generation: bool = False) -> str:
dest = 'kitty/docs_ref_map_generated.h'
if not skip_generation:
d = extract_rst_targets()
h = 'static const char docs_ref_map[] = {\n' + textwrap.fill(', '.join(map(str, bytearray(json.dumps(d).encode('utf-8'))))) + '\n};\n'
h = 'static const char docs_ref_map[] = {\n' + textwrap.fill(', '.join(map(str, bytearray(json.dumps(d, sort_keys=True).encode('utf-8'))))) + '\n};\n'
q = ''
with suppress(FileNotFoundError), open(dest) as f:
q = f.read()
Expand All @@ -868,7 +868,7 @@ def find_uniform_names(raw: str) -> Iterator[str]:
for x in m.group(1).split(','):
yield x.strip().partition('[')[0]

for x in glob.glob('kitty/*.glsl'):
for x in sorted(glob.glob('kitty/*.glsl')):
name = os.path.basename(x).partition('.')[0]
name, sep, shader_type = name.partition('_')
if not sep or shader_type not in ('fragment', 'vertex'):
Expand Down