forked from collective/sphinxcontrib-httpexample
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
49 lines (36 loc) · 1.01 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
PYTHON ?= python3
ARGSTR ?= --argstr python $(PYTHON)
TEST = $(wildcard tests/*.py)
SRC = $(wildcard src/sphinxcontrib/httpexample/*.py)
.PHONY: all
all: test coverage
.PHONY: nix-%
nix-%: requirements.nix
nix-shell setup.nix $(ARGSTR) -A develop --run "$(MAKE) $*"
nix-env: requirements.nix
nix-build setup.nix $(ARGSTR) -A env
nix-shell: requirements.nix
nix-shell setup.nix $(ARGSTR) -A develop
.PHONY: docs
docs: requirements.nix
nix-build release.nix $(ARGSTR) -A docs
.PHONY: coverage
coverage: .coverage
coverage report --fail-under=80
.PHONY: coveralls
coveralls: .coverage
coveralls
.PHONY: test
test:
flake8 src
py.test
.PHONY: push-cachix
push-cachix:
nix-build setup.nix --argstr python python3 -A env|cachix push datakurre
nix-build setup.nix --argstr python python2 -A env|cachix push datakurre
###
.coverage: $(TEST) $(SRC)
coverage run setup.py test
requirements.nix: requirements.txt
nix-shell setup.nix -A pip2nix \
--run "pip2nix generate -r requirements.txt --output=requirements.nix"