Kris Lamoureux
b23ca49a83
- Replace shell script with Makefile for build/install tasks - Move main logic into main() function for proper packaging - Configure package entrypoint in pyproject.toml
26 lines
586 B
Makefile
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
|