forked from currentslab/extractnet
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
25 lines (19 loc) · 869 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 extractnet/*.pyc extractnet/*.so extractnet/lcs.cpp extractnet/blocks.cpp extractnet.egg-info extractnet/features/*.pyc extractnet/features/_kohlschuetter.cpp extractnet/features/_readability.cpp extractnet/features/_weninger.cpp
test: pytest
pytest:
pytest --cov=extractnet --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