-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
58 lines (44 loc) · 1.25 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
#### EXECUTABLES ###########################
PYTHON_WIN = py
PYTHON_UNX = python3
FLAKE8 = flake8
PDOC = pdoc
#### OTHER VARS ############################
DOCS_LOCATION = $(CURDIR)/docs
############################################
ifeq ($(OS),Windows_NT)
PY = $(PYTHON_WIN)
else
PY = $(PYTHON_UNX)
endif
.PHONY: _make install deps test docs lint help
_make: deps install
install:
$(PY) -m pip install -e .
deps:
$(PY) -m pip install -r $(CURDIR)/requirements.txt
test:
[ "$(CASE)" != "" ] &&\
$(PY) -m unittest -v tests.$(CASE)
[ "$(CASE)" != "" ] ||\
$(PY) -m unittest -v tests/*.py
docs:
rm -r $(DOCS_LOCATION)/* || true
$(PDOC) \
--html \
--html-dir $(DOCS_LOCATION) \
--overwrite \
--external-links \
pytter
mv $(DOCS_LOCATION)/pytter/* $(DOCS_LOCATION)/
rm -r $(DOCS_LOCATION)/pytter
lint:
$(FLAKE8) $(CURDIR)
help:
@echo "Avaliable make recipes:"
@echo " * Ensure local dependencies and install package"
@echo " deps Ensure local pip dependencies"
@echo " docs Create or update code documentation"
@echo " install Install package locally from source"
@echo " lint Run flake8 over the project source"
@echo " test Execute tests"