2018-06-02 15:10:15 +00:00
|
|
|
SHELL := /bin/bash
|
2020-02-26 19:59:10 +00:00
|
|
|
WHEELHOUSE := ./wheelhouse
|
|
|
|
PYVER := 3.6
|
|
|
|
VENV := ./env$(PYVER)
|
|
|
|
|
2019-08-25 12:54:19 +00:00
|
|
|
version = $(shell "bin/get-version.sh")
|
2018-06-02 15:10:15 +00:00
|
|
|
|
2020-02-26 19:59:10 +00:00
|
|
|
dist/spacy-$(version).pex : wheelhouse/spacy-$(version)-*.whl
|
|
|
|
pex -f ./wheelhouse --no-index --disable-cache -m spacy -o dist/spacy-$(version).pex spacy==$(version) jsonschema
|
|
|
|
chmod a+rx dist/spacy-$(version).pex
|
2019-08-25 12:54:19 +00:00
|
|
|
|
2020-02-26 19:59:10 +00:00
|
|
|
dist/pytest.pex : wheelhouse/pytest-*.whl
|
|
|
|
$(VENV)/bin/pex -f ./wheelhouse --no-index --disable-cache -m pytest -o dist/pytest.pex pytest pytest-timeout mock
|
|
|
|
chmod a+rx dist/pytest.pex
|
2019-08-25 12:54:19 +00:00
|
|
|
|
2020-02-26 19:59:10 +00:00
|
|
|
wheelhouse/spacy-$(version)-%.whl : $(VENV)/bin/pex setup.py spacy/*.py* spacy/*/*.py*
|
|
|
|
$(VENV)/bin/pip wheel . -w ./wheelhouse
|
|
|
|
$(VENV)/bin/pip wheel jsonschema spacy_lookups_data -w ./wheelhouse
|
|
|
|
|
|
|
|
wheelhouse/pytest-%.whl : $(VENV)/bin/pex
|
|
|
|
$(VENV)/bin/pip wheel pytest pytest-timeout mock -w ./wheelhouse
|
|
|
|
|
|
|
|
$(VENV) :
|
|
|
|
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
|
|
|
|
PEX_PATH=dist/spacy-$(version).pex ./dist/pytest.pex --pyargs spacy -x
|
2018-06-24 21:39:34 +00:00
|
|
|
|
|
|
|
clean : setup.py
|
|
|
|
source env3.6/bin/activate
|
|
|
|
rm -rf dist/*
|
2020-02-26 19:59:10 +00:00
|
|
|
rm -rf ./wheelhouse
|
2018-06-24 21:39:34 +00:00
|
|
|
python setup.py clean --all
|