fix: move dep checks into scripts/check_deps.sh for robustness

Replaces fragile one-liner Makefile chain with a proper shell script.
Tries: sudo -n apt → python3 -m pip --user → get-pip.py bootstrap.
Prints a clear manual-install message if all automated paths fail.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-22 09:23:01 -04:00
parent b2f12824ac
commit 368457ecce
2 changed files with 49 additions and 13 deletions
+1 -13
View File
@@ -39,19 +39,7 @@ help:
# Setup commands
check-deps:
@echo "Checking system dependencies..."
@which python3 >/dev/null 2>&1 || \
{ echo "Installing python3..." && sudo -n apt-get install -y python3 2>/dev/null || \
{ echo "ERROR: python3 not found. Run: sudo apt-get install -y python3" ; exit 1 ; } ; }
@python3 -c "import cryptography" 2>/dev/null || { \
echo "Installing python3-cryptography..." ; \
sudo -n apt-get install -y python3-cryptography 2>/dev/null || \
python3 -m pip install --user cryptography 2>/dev/null || \
{ python3 -m ensurepip --upgrade 2>/dev/null && python3 -m pip install --user cryptography 2>/dev/null ; } || \
{ echo "ERROR: Cannot install python3-cryptography. Run: sudo apt-get install python3-cryptography" ; exit 1 ; } ; }
@python3 -c "import cryptography" >/dev/null 2>&1 || \
{ echo "ERROR: python3-cryptography still not found. Run: sudo apt-get install python3-cryptography" ; exit 1 ; }
@echo "Dependencies OK."
@sh scripts/check_deps.sh
setup: check-deps
@echo "Setting up Personal Internet Cell..."