2010-08-08 19:41:03 +08:00
|
|
|
# simple makefile to simplify repetetive build env management tasks under posix
|
|
|
|
|
|
2010-10-06 20:06:25 +08:00
|
|
|
# caution: testing won't work on windows, see README
|
|
|
|
|
|
2010-08-27 14:51:10 +08:00
|
|
|
PYTHON ?= python
|
2011-09-03 19:05:10 +08:00
|
|
|
CYTHON ?= cython
|
2010-08-27 14:51:10 +08:00
|
|
|
NOSETESTS ?= nosetests
|
2010-10-31 19:50:08 +08:00
|
|
|
CTAGS ?= ctags
|
2010-08-27 14:51:10 +08:00
|
|
|
|
2011-08-24 18:32:17 +08:00
|
|
|
all: clean inplace test
|
2010-08-08 19:41:03 +08:00
|
|
|
|
2010-10-31 19:50:08 +08:00
|
|
|
clean-ctags:
|
|
|
|
|
rm -f tags
|
|
|
|
|
|
2013-10-13 22:34:13 +08:00
|
|
|
clean: clean-ctags
|
2013-10-13 02:12:08 +08:00
|
|
|
$(PYTHON) setup.py clean
|
|
|
|
|
rm -rf dist
|
2010-08-08 19:41:03 +08:00
|
|
|
|
2010-08-17 20:01:47 +08:00
|
|
|
in: inplace # just a shortcut
|
2010-08-08 19:41:03 +08:00
|
|
|
inplace:
|
2014-07-16 16:31:12 +08:00
|
|
|
# to avoid errors in 0.15 upgrade
|
|
|
|
|
rm -f sklearn/utils/sparsefuncs*.so
|
|
|
|
|
rm -f sklearn/utils/random*.so
|
2010-08-27 14:51:10 +08:00
|
|
|
$(PYTHON) setup.py build_ext -i
|
2010-08-08 19:41:03 +08:00
|
|
|
|
2011-08-24 18:32:17 +08:00
|
|
|
test-code: in
|
2012-12-05 16:12:47 +08:00
|
|
|
$(NOSETESTS) -s -v sklearn
|
2014-05-21 09:44:46 +08:00
|
|
|
test-sphinxext:
|
|
|
|
|
$(NOSETESTS) -s -v doc/sphinxext/
|
2010-09-29 22:07:34 +08:00
|
|
|
test-doc:
|
2014-01-21 07:34:14 +08:00
|
|
|
$(NOSETESTS) -s -v doc/*.rst doc/modules/ doc/datasets/ \
|
2013-07-30 15:36:12 +08:00
|
|
|
doc/developers doc/tutorial/basic doc/tutorial/statistical_inference \
|
|
|
|
|
doc/tutorial/text_analytics
|
2010-10-14 22:32:23 +08:00
|
|
|
|
|
|
|
|
test-coverage:
|
2012-07-25 16:51:48 +08:00
|
|
|
rm -rf coverage .coverage
|
2012-12-05 16:12:47 +08:00
|
|
|
$(NOSETESTS) -s -v --with-coverage sklearn
|
2010-10-31 19:50:08 +08:00
|
|
|
|
2014-05-21 09:44:46 +08:00
|
|
|
test: test-code test-sphinxext test-doc
|
2010-10-31 19:50:08 +08:00
|
|
|
|
2010-11-06 22:46:50 +08:00
|
|
|
trailing-spaces:
|
2014-03-27 22:56:40 +08:00
|
|
|
find sklearn -name "*.py" -exec perl -pi -e 's/[ \t]*$$//' {} \;
|
2010-11-06 22:46:50 +08:00
|
|
|
|
2011-09-03 19:05:10 +08:00
|
|
|
cython:
|
2014-03-24 18:33:10 +08:00
|
|
|
find sklearn -name "*.pyx" -exec $(CYTHON) {} \;
|
2011-09-03 19:05:10 +08:00
|
|
|
|
2010-10-31 19:50:08 +08:00
|
|
|
ctags:
|
|
|
|
|
# make tags for symbol based navigation in emacs and vim
|
|
|
|
|
# Install with: sudo apt-get install exuberant-ctags
|
2015-07-16 18:15:17 +08:00
|
|
|
$(CTAGS) --python-kinds=-i -R sklearn
|
2011-10-04 21:44:17 +08:00
|
|
|
|
|
|
|
|
doc: inplace
|
2013-12-05 19:59:38 +08:00
|
|
|
$(MAKE) -C doc html
|
2011-10-04 21:44:17 +08:00
|
|
|
|
|
|
|
|
doc-noplot: inplace
|
2013-12-05 19:59:38 +08:00
|
|
|
$(MAKE) -C doc html-noplot
|
2012-10-31 23:34:22 +08:00
|
|
|
|
|
|
|
|
code-analysis:
|
|
|
|
|
flake8 sklearn | grep -v __init__ | grep -v external
|
|
|
|
|
pylint -E -i y sklearn/ -d E1103,E0611,E1101
|