add src-space/* and clear src files

This commit is contained in:
2025-05-12 05:18:28 +09:00
parent 2f2e0759fd
commit 9e38b7ca63
13 changed files with 90 additions and 73 deletions

33
space/src-py/make.py Executable file
View File

@@ -0,0 +1,33 @@
#!/usr/bin/env python3
import py_compile
import click
SRC_DIR = r"./src"
TARGET = r"main.py"
OUTPUT = r"py.pyc"
BUILD_DIR = r"../../build"
@click.group()
def cli():
pass
@click.command(name="build")
def build():
try:
py_compile.compile(
f"{SRC_DIR}/{TARGET}", f"{BUILD_DIR}/{OUTPUT}", optimize=2, doraise=True
)
except Exception as e:
raise click.ClickException(e)
cli.add_command(build)
if __name__ == "__main__":
cli()