-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathmakefile
40 lines (30 loc) · 884 Bytes
/
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
## makefile automates the build and deployment for python projects
## Build system
#
PROJ_TYPE = python
PROJ_MODULES = git python-resources python-doc python-doc-deploy
PY_DEP_POST_DEPS += modeldeps
SPACY_MODELS += sm md lg
CLEAN_DEPS += pycleancache
#PY_SRC_TEST_PAT ?= 'test_token.py'
## Includes
#
include ./zenbuild/main.mk
## Targets
#
# https://spacy.io/models/en
.PHONY: allmodels
allmodels:
@for i in $(SPACY_MODELS) ; do \
echo "installing $$i" ; \
$(PYTHON_BIN) -m spacy download en_core_web_$${i} ; \
done
.PHONY: modeldeps
modeldeps:
$(PIP_BIN) install $(PIP_ARGS) -r $(PY_SRC)/requirements-model.txt
.PHONY: scoredeps
scoredeps:
$(PIP_BIN) install $(PIP_ARGS) -r $(PY_SRC)/requirements-score.txt
.PHONY: uninstalldeps
uninstalldeps:
$(PYTHON_BIN) -m pip freeze | grep spacy | sed 's/\([^= ]*\).*/\1/' | xargs pip uninstall -y