Update Makefile

This commit is contained in:
Matthew Honnibal 2020-08-24 14:41:56 +02:00
parent 944b1246f0
commit ecd86bae84
1 changed files with 13 additions and 3 deletions

View File

@ -1,11 +1,20 @@
SHELL := /bin/bash SHELL := /bin/bash
PYVER := 3.6 PYVER := 3.6
VENV := ./env$(PYVER) VENV := ./env$(PYVER)
SPACY_EXTRAS := spacy-lookups-data jieba pkuseg==0.0.25 sudachipy sudachidict_core
version := $(shell "bin/get-version.sh") version := $(shell "bin/get-version.sh")
package := $(shell "bin/get-package.sh")
dist/spacy-$(version).pex : wheelhouse/spacy-$(version).stamp dist/$(package)-$(version).pex : wheelhouse/spacy-$(version).stamp
$(VENV)/bin/pex -f ./wheelhouse --no-index --disable-cache -m spacy -o $@ spacy==$(version) spacy-lookups-data jieba pkuseg==0.0.25 sudachipy sudachidict_core $(VENV)/bin/pex \
-f ./wheelhouse \
--no-index \
--disable-cache \
-m spacy \
-o $@ \
$(package)==$(version) \
$(SPACY_EXTRAS)
chmod a+rx $@ chmod a+rx $@
cp $@ dist/spacy.pex cp $@ dist/spacy.pex
@ -15,7 +24,8 @@ dist/pytest.pex : wheelhouse/pytest-*.whl
wheelhouse/spacy-$(version).stamp : $(VENV)/bin/pex setup.py spacy/*.py* spacy/*/*.py* wheelhouse/spacy-$(version).stamp : $(VENV)/bin/pex setup.py spacy/*.py* spacy/*/*.py*
$(VENV)/bin/pip wheel . -w ./wheelhouse $(VENV)/bin/pip wheel . -w ./wheelhouse
$(VENV)/bin/pip wheel spacy-lookups-data jieba pkuseg==0.0.25 sudachipy sudachidict_core -w ./wheelhouse $(VENV)/bin/pip wheel $(SPACY_EXTRAS) -w ./wheelhouse
touch $@ touch $@
wheelhouse/pytest-%.whl : $(VENV)/bin/pex wheelhouse/pytest-%.whl : $(VENV)/bin/pex