before refactoring
This commit is contained in:
52
Makefile
Normal file
52
Makefile
Normal file
@@ -0,0 +1,52 @@
|
||||
# Makefile for medtrace-synth
|
||||
|
||||
VENV := .venv
|
||||
PYTHON := $(VENV)/bin/python
|
||||
PIP := $(PYTHON) -m pip
|
||||
|
||||
POJAGI_DSP_PATH ?= ../pojagi-dsp
|
||||
|
||||
help:
|
||||
@echo "Targets:"
|
||||
@echo " venv - Create virtualenv in .venv"
|
||||
@echo " install - Install deps and this package"
|
||||
@echo " run - Run the server via 'python -m medtrace_synth'"
|
||||
@echo " install-dev - Install deps (and this package) in dev mode"
|
||||
@echo " dev - Run using PYTHONPATH=src (no install)"
|
||||
@echo " build - Build sdist and wheel into dist/"
|
||||
@echo " clean - Remove build artifacts"
|
||||
@echo " nuke - Clean artifacts and remove .venv"
|
||||
|
||||
$(VENV):
|
||||
python3 -m venv $(VENV)
|
||||
$(PIP) -q install -U pip
|
||||
|
||||
install: $(VENV)
|
||||
$(PIP) install .[live]
|
||||
|
||||
install-dev: $(VENV)
|
||||
$(PIP) install -e .[dev]
|
||||
$(PIP) install -e $(POJAGI_DSP_PATH)
|
||||
|
||||
run: install
|
||||
$(PYTHON) -m medtrace_synth
|
||||
|
||||
dev: install-dev
|
||||
PYTHONPATH=src $(PYTHON) -m watchfiles \
|
||||
--filter=python \
|
||||
--target-type=command \
|
||||
"$(PYTHON) -m medtrace_synth" \
|
||||
src $(POJAGI_DSP_PATH)
|
||||
|
||||
build: install
|
||||
$(PIP) install -U hatch
|
||||
$(PYTHON) -m hatch build
|
||||
|
||||
clean:
|
||||
rm -rf build dist .eggs *.egg-info
|
||||
|
||||
nuke: clean
|
||||
rm -rf $(VENV)
|
||||
|
||||
|
||||
.PHONY: help install install-dev run dev build clean nuke
|
||||
Reference in New Issue
Block a user