File: release.py

package info (click to toggle)
rust-codspeed 4.1.0-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 1,560 kB
  • sloc: ansic: 9,768; sh: 6; makefile: 2
file content (21 lines) | stat: -rw-r--r-- 472 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
from pathlib import Path

content = Path("zig-out/lib/core.c").read_text()
print("Size of core.c:", len(content.splitlines()))

valgrind_wrapper = Path("src/helpers/valgrind_wrapper.c").read_text()

STUB = Path("scripts/stub.c").read_text()

TEMPLATE = f"""\
// This file is generated by scripts/release.py
// Do not edit it manually.
#if defined(_WIN32) || defined(__APPLE__)
{STUB}
#else
{content}
#endif
{valgrind_wrapper}
"""

Path("dist/core.c").write_text(TEMPLATE)