diff --git a/Makefile b/Makefile index cfdcdcd79..a205a4bbb 100644 --- a/Makefile +++ b/Makefile @@ -1,11 +1,20 @@ SHELL := /bin/bash PYVER := 3.6 VENV := ./env$(PYVER) +SPACY_EXTRAS := spacy-lookups-data jieba pkuseg==0.0.25 sudachipy sudachidict_core version := $(shell "bin/get-version.sh") +package := $(shell "bin/get-package.sh") -dist/spacy-$(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 +dist/$(package)-$(version).pex : wheelhouse/spacy-$(version).stamp + $(VENV)/bin/pex \ + -f ./wheelhouse \ + --no-index \ + --disable-cache \ + -m spacy \ + -o $@ \ + $(package)==$(version) \ + $(SPACY_EXTRAS) chmod a+rx $@ 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* $(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 $@ wheelhouse/pytest-%.whl : $(VENV)/bin/pex