forked from dragnet-org/dragnet
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
28 lines (21 loc) · 913 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
26
27
28
# 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: nose
nose:
nosetests --exe --cover-package=dragnet --with-coverage --cover-branches -v --cover-erase
unittest:
python -m unittest discover -s 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