forked from joelostblom/Watson
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
57 lines (44 loc) · 1.14 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
# Watson
PYTHON ?= python
PIP ?= pip
VENV = virtualenv
VENV_ARGS = -p $(PYTHON)
VENV_DIR = $(CURDIR)/.venv
VENV_WATSON_DIR = $(CURDIR)/data
all: install
$(VENV_DIR): requirements-dev.txt
$(VENV) $(VENV_ARGS) "$(VENV_DIR)"
echo "export WATSON_DIR=\"$(VENV_WATSON_DIR)\"" >> "$(VENV_DIR)"/bin/activate
echo "set -x WATSON_DIR \"$(VENV_WATSON_DIR)\"" >> "$(VENV_DIR)"/bin/activate.fish
"$(VENV_DIR)"/bin/pip install -U setuptools wheel pip
"$(VENV_DIR)"/bin/pip install -Ur $<
.PHONY: env
env: $(VENV_DIR)
.PHONY: install
install:
$(PYTHON) setup.py install
.PHONY: install-dev
install-dev:
$(PIP) install -r requirements-dev.txt
$(PYTHON) setup.py develop
.PHONY: check
check: clean
$(PYTHON) setup.py test
.PHONY: clean
clean:
find . -name '*.pyc' -delete
find . -name '__pycache__' -type d | xargs rm -fr
.PHONY: distclean
distclean: clean
rm -fr *.egg *.egg-info/ .eggs/
.PHONY:
mostlyclean: clean distclean
rm -rf "$(VENV_DIR)"
.PHONY: docs
docs: install-dev
$(PYTHON) scripts/gen-cli-docs.py
mkdocs build
.PHONY: completion-scripts
completion-scripts:
scripts/create-completion-script.sh bash
scripts/create-completion-script.sh zsh