-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
38 lines (30 loc) · 1004 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# Makefile to handle setting up Python virtual environment
#
# Copyright (c) 2021 ZKM | Hertz-Lab
# Dan Wilcox <dan.wilcox@zkm.de>
#
# BSD Simplified License.
# For information on usage and redistribution, and for a DISCLAIMER OF ALL
# WARRANTIES, see the file, "LICENSE.txt," in this distribution.
#
# This code has been developed at ZKM | Hertz-Lab as part of „The Intelligent
# Museum“ generously funded by the German Federal Cultural Foundation.
VENV = venv
VBIN = $(VENV)/bin
PYTHON := python3
PIP := pip3
all: $(VENV)
.PHONY: clean
# set up python virtual environment and dependencies
$(VENV):
$(PYTHON) -m venv "$(VENV)"
$(VBIN)/$(PIP) install -r requirements.txt
# (re)generate a dependency requirements for current venv setup
freeze:
$(VBIN)/$(PIP) freeze > requirements.txt
# force reinstall dendencies, useful after manually editing requirements.txt
reinstall:
$(VBIN)/$(PIP) install --ignore-installed -r requirements.txt
# remove virtual environment
clean:
rm -rf "$(VENV)"