diff options
Diffstat (limited to 'requirements/Makefile')
-rw-r--r-- | requirements/Makefile | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/requirements/Makefile b/requirements/Makefile new file mode 100644 index 000000000..4f966254f --- /dev/null +++ b/requirements/Makefile @@ -0,0 +1,21 @@ +# Makefile for updating BuildStream's requirements files. +# + +REQUIREMENTS_IN := $(wildcard *.in) +REQUIREMENTS_TXT := $(REQUIREMENTS_IN:.in=.txt) +PYTHON := python3 +VENV := $(PYTHON) -m venv + +VENV_PIP = $(VENVDIR)/bin/pip + + +.PHONY: all + +all: $(REQUIREMENTS_TXT) + +%.txt: %.in + $(eval VENVDIR := $(shell mktemp -d $$TMPDIR/bst-venv.XXXXXX)) + $(VENV) $(VENVDIR) + $(VENV_PIP) install -r $^ + $(VENV_PIP) freeze -r $^ > $@ + rm -rf $(VENVDIR) |