From 94e0ecda832b6e46e5193319efbce5f54b379102 Mon Sep 17 00:00:00 2001 From: Brett Williams Date: Thu, 6 Mar 2025 23:45:40 -0600 Subject: [PATCH] Update README.md --- README.md | 83 +++++++++++++++++++++++++++++++++++++++++++++++- agent_manager.py | 1 - 2 files changed, 82 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index cddfb22..f6ec52d 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,84 @@ # Cross-Py-Build -Cross-Py-Build is a simple remote build tool for compiling Python projects with PyInstaller on different platforms. \ No newline at end of file +Cross-Py-Build is a simple remote build tool for compiling Python projects with PyInstaller on different platforms on a local network. + +## System Requirements +- **Ubuntu/Debian & macOS:** 2GB+ RAM +- **Windows:** 4GB+ RAM +- **Python 3** installed +- **Local Network** for build agents + +--- + +### Example Usage + + + ```sh + ./agent_manager.py --build /path/to/repo -cpu x64 -os windows + +options: + -h, --help show this help message and exit + --status Get status of available servers + --build BUILD Path to the project to build + -cpu CPU CPU architecture + -os OS Operating system + -d, --download Download after build + --delete-cache Delete cache + --update-all Update build agent + --restart RESTART Hostname to restart + --restart-all Restart all agents + --shutdown SHUTDOWN Hostname to shutdown + --shutdown-all Restart all agents +``` + +--- + +## Worker VM Setup Guide + +This guide provides steps to set up a worker VM on **Ubuntu/Debian, macOS, or Windows**. + + +### Ubuntu/Debian or macOS +1. **Create a new VM** and install the OS. +2. **Update the system:** + - **Ubuntu/Debian:** + ```sh + sudo apt update && sudo apt upgrade -y + sudo apt install python3-pip python3-venv -y + ``` + - **macOS:** + ```sh + xcode-select --install # Install xcode tools + ``` + - Install Python 3.x from [python.org](https://www.python.org/downloads/) + - **Windows:** + - Install Python 3.x from [python.org](https://www.python.org/downloads/) + + +3. **Set up a virtual environment:** + + - **Ubuntu/Debian/macOS:** + ```sh + python3 -m venv venv + source venv/bin/activate + ``` + - **Windows:** + ```sh + python3 -m venv venv + source venv\Scripts\activate + ``` +4. **Copy project files** and install dependencies: + ```sh + pip install -r requirements.txt + ``` + +5. **Start Build Agent**: + - **Ubuntu/Debian/macOS:** + ```sh + python3 build_agent.py + ``` + - **Windows:** + ```sh + python build_agent.py + ``` +--- \ No newline at end of file diff --git a/agent_manager.py b/agent_manager.py index 8e7ea1c..2229f3d 100755 --- a/agent_manager.py +++ b/agent_manager.py @@ -57,7 +57,6 @@ def get_worker_status(hostname): status['ip'] = socket.gethostbyname(hostname) return status except requests.exceptions.RequestException as e: - print(f"EXCEPTION: {e}") return {"hostname": hostname, "status": "offline"}