diff options
-rw-r--r-- | Makefile | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/Makefile b/Makefile new file mode 100644 index 000000000..2f0afbd83 --- /dev/null +++ b/Makefile @@ -0,0 +1,35 @@ +# Makefile for BuildStream +# + +REQUIREMENTS_FILES := requirements.txt dev-requirements.txt plugin-requirements.txt +PYTHON := python3 +VENV := $(PYTHON) -m venv +TOX := tox + +VENV_PIP = $(VENVDIR)/bin/pip + + +.PHONY: all sdist tests clean requirements-remove requirements-update + +all: tests + +tests: + $(TOX) + +sdist: + python3 setup.py sdsit + +requirements-remove: + rm $(REQUIREMENTS_FILES) || true + +requirements-update: requirements-remove $(REQUIREMENTS_FILES) + +%.txt: %.in + $(eval VENVDIR := $(shell mktemp -d $$TMPDIR/bst-venv.XXXXXX)) + $(VENV) $(VENVDIR) + $(VENV_PIP) install -r $^ + $(VENV_PIP) freeze -r $^ > $@ + rm -rf $(VENVDIR) + +clean: + rm -rf __pycache__ tmp .tox |