-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
42 lines (34 loc) · 1 KB
/
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
39
40
41
42
BLK = black
DCK = docker
PIP = pip
BASEDIR = $(CURDIR)
SRCDIR = ${BASEDIR}/meertrig
DOCKERFILE = ${BASEDIR}/docker/Dockerfile
help:
@echo 'Makefile for MeerTRAP Trigger Tools'
@echo 'Usage:'
@echo 'make black reformat the code using black code formatter'
@echo 'make clean remove temporary files'
@echo 'make install install the module locally'
@echo 'make production build docker image for production use'
@echo 'make interactive run an interactive shell'
black:
${BLK} *.py */*.py */*/*.py
clean:
rm -f ${SRCDIR}/*.pyc
rm -f ${SRCDIR}/*/*.pyc
rm -rf ${SRCDIR}/__pycache__
rm -rf ${SRCDIR}/apps/__pycache__
rm -rf ${BASEDIR}/build
rm -rf ${BASEDIR}/dist
rm -rf ${BASEDIR}/meertrig.egg-info
install:
${PIP} install .
interactive:
${DCK} run -it --rm --network=host \
meertrig bash
production:
${DCK} build \
--file ${DOCKERFILE} \
--tag meertrig ${BASEDIR}
.PHONY: help black clean install interactive production