From d0bbaf6d4e18875f2eef4a5fbe40774c222e4521 Mon Sep 17 00:00:00 2001 From: grabowski Date: Fri, 24 Oct 2025 16:59:03 +0700 Subject: [PATCH] Fix UV build issues by removing build system MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit **Issues Fixed:** - Removed hatchling build-backend (not needed for scripts) - Changed to --no-project mode (no editable install) - UV now runs scripts directly without building **Makefile Updated:** - Uses 'uv run --no-project' to skip build - Added 'make sync' to install dependencies - Simplified dependency installation - No more build errors **Install Script Updated:** - Uses 'make sync' instead of 'uv pip install -e .' - Faster installation, no build step **Usage:** ```bash # Install dependencies make sync # Run the system (no build needed) make start # Everything just works! ``` **Why This Works:** - No build system = no build errors - Direct script execution via UV - Dependencies installed separately - Simpler, more reliable 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- Makefile | 22 +++++++++++++--------- README.md | 4 +++- install_service.sh | 2 +- pyproject.toml | 4 ---- 4 files changed, 17 insertions(+), 15 deletions(-) diff --git a/Makefile b/Makefile index 30c4d12..59f848e 100644 --- a/Makefile +++ b/Makefile @@ -1,19 +1,22 @@ # Wedding Phone Makefile # Simple commands to run the wedding phone system -.PHONY: start test install clean help +.PHONY: start test install clean help sync start: @echo "Starting Wedding Phone System..." - uv run python rotary_phone_web.py + uv run --no-project python rotary_phone_web.py test: @echo "Running audio tests..." - uv run python test_complete.py + uv run --no-project python test_complete.py -install: - @echo "Installing dependencies..." - uv pip install -e . +sync: + @echo "Installing/syncing dependencies..." + uv pip install flask numpy pyaudio RPi.GPIO + +install: sync + @echo "Dependencies installed!" clean: @echo "Cleaning up..." @@ -26,10 +29,11 @@ help: @echo "" @echo " make start - Start the wedding phone system" @echo " make test - Run audio tests" - @echo " make install - Install dependencies" + @echo " make sync - Install/sync dependencies" + @echo " make install - Same as sync" @echo " make clean - Clean temporary files" @echo " make help - Show this help message" @echo "" @echo "Or use UV directly:" - @echo " uv run python rotary_phone_web.py" - @echo " uv run python test_complete.py" + @echo " uv run --no-project python rotary_phone_web.py" + @echo " uv run --no-project python test_complete.py" diff --git a/README.md b/README.md index 83a30f3..95291dd 100644 --- a/README.md +++ b/README.md @@ -67,7 +67,9 @@ sudo apt-get update sudo apt-get install -y python3-pyaudio portaudio19-dev # Install Python dependencies with UV -uv pip install -e . +make sync +# Or manually: +# uv pip install flask numpy pyaudio RPi.GPIO ``` #### Option B: Using pip diff --git a/install_service.sh b/install_service.sh index 8163efb..100a4e6 100644 --- a/install_service.sh +++ b/install_service.sh @@ -59,7 +59,7 @@ echo -e "${GREEN}✓ UV is installed${NC}" echo "" echo "Installing dependencies..." cd "$SCRIPT_DIR" -uv pip install -e . +make sync echo -e "${GREEN}✓ Dependencies installed${NC}" echo "" diff --git a/pyproject.toml b/pyproject.toml index fad2b94..63c2006 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -19,7 +19,3 @@ wedding-phone-test = "test_complete:main" dev = [ "pytest>=7.0.0", ] - -[build-system] -requires = ["hatchling"] -build-backend = "hatchling.build"