mirror of https://github.com/explosion/spaCy.git
Improve pex building in Makefile
This commit is contained in:
parent
b8edc8dffb
commit
7bc68913e3
16
Makefile
16
Makefile
|
@ -1,7 +1,17 @@
|
||||||
SHELL := /bin/bash
|
SHELL := /bin/bash
|
||||||
sha = $(shell "git" "rev-parse" "--short" "HEAD")
|
sha = $(shell "git" "rev-parse" "--short" "HEAD")
|
||||||
|
version = $(shell "bin/get-version.sh")
|
||||||
|
wheel = spacy-$(version)-cp36-cp36m-linux_x86_64.whl
|
||||||
|
|
||||||
dist/spacy.pex : spacy/*.py* spacy/*/*.py*
|
dist/spacy.pex : dist/spacy-$(sha).pex
|
||||||
|
cp dist/spacy-$(sha).pex dist/spacy.pex
|
||||||
|
chmod a+rx dist/spacy.pex
|
||||||
|
|
||||||
|
dist/spacy-$(sha).pex : dist/$(wheel)
|
||||||
|
env3.6/bin/python -m pip install pex==1.5.3
|
||||||
|
env3.6/bin/pex pytest dist/$(wheel) -e spacy -o dist/spacy-$(sha).pex
|
||||||
|
|
||||||
|
dist/$(wheel) : setup.py spacy/*.py* spacy/*/*.py*
|
||||||
python3.6 -m venv env3.6
|
python3.6 -m venv env3.6
|
||||||
source env3.6/bin/activate
|
source env3.6/bin/activate
|
||||||
env3.6/bin/pip install wheel
|
env3.6/bin/pip install wheel
|
||||||
|
@ -9,10 +19,6 @@ dist/spacy.pex : spacy/*.py* spacy/*/*.py*
|
||||||
env3.6/bin/python setup.py build_ext --inplace
|
env3.6/bin/python setup.py build_ext --inplace
|
||||||
env3.6/bin/python setup.py sdist
|
env3.6/bin/python setup.py sdist
|
||||||
env3.6/bin/python setup.py bdist_wheel
|
env3.6/bin/python setup.py bdist_wheel
|
||||||
env3.6/bin/python -m pip install pex==1.5.3
|
|
||||||
env3.6/bin/pex pytest dist/*.whl -e spacy -o dist/spacy-$(sha).pex
|
|
||||||
cp dist/spacy-$(sha).pex dist/spacy.pex
|
|
||||||
chmod a+rx dist/spacy.pex
|
|
||||||
|
|
||||||
.PHONY : clean
|
.PHONY : clean
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue