Skip to content

Fix Makefile to use virtual environment and apply best practices#8

Open
Aboudjem wants to merge 1 commit intocalesthio:mainfrom
Aboudjem:fix/makefile-venv-best-practices
Open

Fix Makefile to use virtual environment and apply best practices#8
Aboudjem wants to merge 1 commit intocalesthio:mainfrom
Aboudjem:fix/makefile-venv-best-practices

Conversation

@Aboudjem
Copy link
Copy Markdown

@Aboudjem Aboudjem commented Apr 7, 2026

Summary

  • Fix PEP 668 breakage: Route all Python/pip commands through .venv, auto-created on first make run with pip self-upgrade
  • Add .venv/ to .gitignore: Prevents accidentally committing the virtual environment
  • Add help default target: Running bare make now shows all available targets with descriptions
  • Add venv dependency to all Python targets: test, test-contracts, lint, and preflight now ensure the venv exists before running
  • Add distclean target: Removes caches and the virtual environment for a full reset
  • Simplify clean target: Use portable find instead of Python one-liner for cache removal

Test plan

  • make help — displays all targets with descriptions
  • make -n setup — dry-run confirms venv creation, pip routing, and correct command sequence
  • make setup — full end-to-end install on a clean checkout
  • make test — auto-creates venv if missing, then runs pytest
  • make distclean && make setup — clean slate rebuild

🤖 Generated with Claude Code

Homebrew Python (PEP 668) blocks bare pip installs. Route all Python/pip
commands through .venv, auto-create the venv on first run, and upgrade
pip at venv creation. Also adds a help target, distclean, venv dependency
on test/lint/preflight targets, and adds .venv/ to .gitignore.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@Aboudjem Aboudjem requested a review from calesthio as a code owner April 7, 2026 15:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant