-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
75 lines (60 loc) · 1.5 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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
# This Makefile adheres to Clark Grubb's "Makefile Style Guide":
# http://clarkgrubb.com/makefile-style-guide
#
# The build goals that are expected to be used are as follows:
#
# all
# ---
# Day to day developer tasks, updates source files that are auto-generated. Default target.
#
# setup
# -----
# Use this to setup your environment (after you have activated a python virtual environment).
#
# ci
# --
# Builds CI environment that is used for both running tests *and* shipping production builds.
#
# test
# ----
# Runs all tests, depends on the `ci` build target.
#
# clean
# -----
# Removes all built files.
#
#
# The variables documented below can be set with `make sometarget FOO="my value"`:
#
# NOSEARGS
# ---------
# Allows for passing extra options to the nose test runner (eg: NOSEARGS="--pdb")
#
# TESTARGS
# ---------
# Allows for changing the options passed to the nose test runner entirely (eg: TESTARGS="-a wip").
#
### prologue
MAKEFLAGS += --warn-undefined-variables
SHELL := bash
.SHELLFLAGS := -eu -o pipefail -c
.DEFAULT_GOAL := all
.DELETE_ON_ERROR:
.SUFFIXES:
### environment variables
### internal variables
all :=
clean :=
.PHONY: lint
lint:
prospector
clean += clean_python
.PHONY: clean_python
clean_python:
find . -name \*.pyc -or -name __pycache__ -print0 | xargs -0 rm -rf
all += $(wildcard requirements-*.txt)
requirements-%.txt: requirements-%.in
pip-compile ${PIP_COMPILE_OPTS} --annotate --output-file "$@" "$<"
requirements-dev.txt: requirements-prod.txt
all: $(all)
clean: $(clean)