forked from dragnet-org/dragnet
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
25 lines (19 loc) · 839 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# build inplace for unit tests to pass (since they are run from this
# top level directory we need the .so files to be in the src tree
# when they run.
build: clean
python setup.py build_ext --inplace
python setup.py build
clean:
# lcs.cpp and blocks.cpp are generated by cython
rm -rf build dist dragnet/*.pyc dragnet/*.so dragnet/lcs.cpp dragnet/blocks.cpp dragnet.egg-info dragnet/features/*.pyc dragnet/features/_kohlschuetter.cpp dragnet/features/_readability.cpp dragnet/features/_weninger.cpp
test: pytest
pytest:
pytest --cov=dragnet --cov-report=term --cov-branch -v test
# using python setup.py deploys as .egg, causing the model file not found
# using pip install deploys as a directory, so the model file can be found
# install: build
# python setup.py install
install-pip: build
pip install .
install: install-pip