From f366201a8718d855ad1785865fae282cf205e2a3 Mon Sep 17 00:00:00 2001 From: Evan Scherrer Date: Sat, 5 Sep 2026 12:49:01 -0500 Subject: [PATCH] add build step --- Makefile | 7 +++++++ main.py => src/main.py | 5 +++-- rcon.py => src/rcon.py | 0 utils.py => src/utils.py | 0 4 files changed, 10 insertions(+), 2 deletions(-) create mode 100644 Makefile rename main.py => src/main.py (98%) rename rcon.py => src/rcon.py (100%) rename utils.py => src/utils.py (100%) diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..aba69e5 --- /dev/null +++ b/Makefile @@ -0,0 +1,7 @@ +build: + python -m zipapp src -m "main:main" -o rcon-client.pyz -p "/usr/bin/env python3" + +clean: + rm -rf __pycache__ + rm -f *.pyz + diff --git a/main.py b/src/main.py similarity index 98% rename from main.py rename to src/main.py index 942c549..c0016cd 100644 --- a/main.py +++ b/src/main.py @@ -12,7 +12,8 @@ GRN = '\001\x1b[0;32m\002' BLU = '\001\x1b[0;34m\002' GRY = '\001\x1b[0;37m\002' -def main(args): +def main(): + args = parse_args() RCON_ADDRESS = None if args.host: RCON_ADDRESS = args.host @@ -63,5 +64,5 @@ def main(args): if __name__ == '__main__': - main(parse_args()) + main() diff --git a/rcon.py b/src/rcon.py similarity index 100% rename from rcon.py rename to src/rcon.py diff --git a/utils.py b/src/utils.py similarity index 100% rename from utils.py rename to src/utils.py