Initial implementation: gitswarm REPL, build script, README
Adds: - gitswarm.py: REPL interactivo con rich que escanea repos git de primer nivel, muestra estado (ahead/behind/dirty) y permite update <repo>|all via git pull --ff-only. - gitswarm: wrapper bash que invoca el venv local. - build.sh: compila a binario standalone con Nuitka --onefile. - requirements.txt: rich. - README.md: uso, requisitos del sistema (python3-dev, gcc, patchelf para el build) e instrucciones de desarrollo y compilacion.
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
#!/usr/bin/env bash
|
||||
# Compila gitswarm a un binario standalone con Nuitka.
|
||||
# Requisitos del sistema: python3-dev, gcc, patchelf (ver README).
|
||||
set -euo pipefail
|
||||
|
||||
HERE="$(cd "$(dirname "$0")" && pwd)"
|
||||
cd "$HERE"
|
||||
|
||||
if [ ! -d .venv ]; then
|
||||
echo "[build] creando venv…"
|
||||
python3 -m venv .venv
|
||||
.venv/bin/pip install --quiet --upgrade pip
|
||||
.venv/bin/pip install --quiet -r requirements.txt
|
||||
fi
|
||||
|
||||
if ! .venv/bin/python -c "import nuitka" 2>/dev/null; then
|
||||
echo "[build] instalando nuitka en el venv…"
|
||||
.venv/bin/pip install --quiet nuitka
|
||||
fi
|
||||
|
||||
echo "[build] limpiando artefactos previos…"
|
||||
rm -rf dist build gitswarm.build gitswarm.dist gitswarm.onefile-build
|
||||
|
||||
echo "[build] compilando (esto puede tardar 1-2 min)…"
|
||||
.venv/bin/python -m nuitka \
|
||||
--onefile \
|
||||
--assume-yes-for-downloads \
|
||||
--output-dir=dist \
|
||||
--output-filename=gitswarm \
|
||||
--remove-output \
|
||||
--lto=yes \
|
||||
--include-package=rich \
|
||||
gitswarm.py
|
||||
|
||||
echo "[build] hecho:"
|
||||
ls -lh dist/gitswarm
|
||||
echo "[build] instalar con: cp dist/gitswarm ~/.local/bin/"
|
||||
Reference in New Issue
Block a user