2018-06-02 15:10:15 +00:00
|
|
|
SHELL := /bin/bash
|
2020-02-26 19:59:10 +00:00
|
|
|
PYVER := 3.6
|
|
|
|
VENV := ./env$(PYVER)
|
|
|
|
|
2020-03-04 18:28:16 +00:00
|
|
|
version := $(shell "bin/get-version.sh")
|
2018-06-02 15:10:15 +00:00
|
|
|
|
2020-03-04 18:28:16 +00:00
|
|
|
dist/spacy-$(version).pex : wheelhouse/spacy-$(version).stamp
|
|
|
|
$(VENV)/bin/pex -f ./wheelhouse --no-index --disable-cache -m spacy -o $@ spacy==$(version) jsonschema
|
|
|
|
chmod a+rx $@
|
2019-08-25 12:54:19 +00:00
|
|
|
|
2020-02-26 19:59:10 +00:00
|
|
|
dist/pytest.pex : wheelhouse/pytest-*.whl
|
2020-03-04 18:28:16 +00:00
|
|
|
$(VENV)/bin/pex -f ./wheelhouse --no-index --disable-cache -m pytest -o $@ pytest pytest-timeout mock
|
|
|
|
chmod a+rx $@
|
2019-08-25 12:54:19 +00:00
|
|
|
|
2020-03-04 18:28:16 +00:00
|
|
|
wheelhouse/spacy-$(version).stamp : $(VENV)/bin/pex setup.py spacy/*.py* spacy/*/*.py*
|
2020-02-26 19:59:10 +00:00
|
|
|
$(VENV)/bin/pip wheel . -w ./wheelhouse
|
|
|
|
$(VENV)/bin/pip wheel jsonschema spacy_lookups_data -w ./wheelhouse
|
2020-03-04 18:28:16 +00:00
|
|
|
touch $@
|
2020-02-26 19:59:10 +00:00
|
|
|
|
|
|
|
wheelhouse/pytest-%.whl : $(VENV)/bin/pex
|
|
|
|
$(VENV)/bin/pip wheel pytest pytest-timeout mock -w ./wheelhouse
|
|
|
|
|
2020-03-04 18:28:16 +00:00
|
|
|
$(VENV)/bin/pex :
|
2020-02-26 19:59:10 +00:00
|
|
|
python$(PYVER) -m venv $(VENV)
|
|
|
|
$(VENV)/bin/python -m pip install pex wheel
|
|
|
|
|
|
|
|
.PHONY : clean test
|
2018-06-24 21:39:34 +00:00
|
|
|
|
2020-02-26 19:59:10 +00:00
|
|
|
test : dist/spacy-$(version).pex dist/pytest.pex
|
2020-03-04 18:28:16 +00:00
|
|
|
( . $(VENV)/bin/activate ; \
|
|
|
|
PEX_PATH=dist/spacy-$(version).pex ./dist/pytest.pex --pyargs spacy -x ; )
|
2018-06-24 21:39:34 +00:00
|
|
|
|
|
|
|
clean : setup.py
|
|
|
|
rm -rf dist/*
|
2020-02-26 19:59:10 +00:00
|
|
|
rm -rf ./wheelhouse
|
2020-03-04 18:28:16 +00:00
|
|
|
rm -rf $(VENV)
|
2018-06-24 21:39:34 +00:00
|
|
|
python setup.py clean --all
|