From ecd86bae846463fc1a208ea61a1890be383a9351 Mon Sep 17 00:00:00 2001 From: Matthew Honnibal Date: Mon, 24 Aug 2020 14:41:56 +0200 Subject: [PATCH] Update Makefile --- Makefile | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) 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