tarc/Makefile
Kris Lamoureux b23ca49a83
Add Makefile and refactor package structure
- Replace shell script with Makefile for build/install tasks
- Move main logic into main() function for proper packaging
- Configure package entrypoint in pyproject.toml
2024-10-12 22:40:18 -04:00

26 lines
586 B
Makefile

.PHONY: default venv build install clean
default: install
venv:
@[ ! -d ./venv ] && python3 -m venv venv && bash -c \
"source venv/bin/activate && \
pip install --upgrade pip && \
pip install -r requirements.txt" || true
build: venv
@if [ -n "$$(git status --porcelain)" ]; then \
echo "[ERROR]: There are uncommitted changes or untracked files."; \
exit 1; \
fi
@bash -c \
"source venv/bin/activate && \
pip install build twine && \
python -m build"
install: venv
@bash -c "source venv/bin/activate && pip install -e ."
clean:
rm -rf venv dist tarc.egg-info