Skip to content

Commit

Permalink
Update Makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
honnibal committed Aug 24, 2020
1 parent 944b124 commit ecd86ba
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
@@ -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")

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
package := $(shell "bin/get-package.sh")

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

Expand All @@ -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
Expand Down

0 comments on commit ecd86ba

Please sign in to comment.