forked from datalad/datalad
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
56 lines (40 loc) · 1.5 KB
/
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# simple makefile to simplify repetetive build env management tasks under posix
# Ideas borrowed from scikit-learn's and PyMVPA Makefiles -- thanks!
PYTHON ?= python
NOSETESTS ?= $(PYTHON) -m nose
MODULE ?= datalad
all: clean test
clean:
$(PYTHON) setup.py clean
rm -rf dist build bin
-find . -name '*.pyc' -delete
-find . -name '__pycache__' -type d -delete
bin:
mkdir -p $@
PYTHONPATH=bin:$(PYTHONPATH) $(PYTHON) setup.py develop --install-dir $@
test-code: bin
PATH=bin:$(PATH) PYTHONPATH=bin:$(PYTHONPATH) $(NOSETESTS) -s -v $(MODULE)
test-coverage:
rm -rf coverage .coverage
$(NOSETESTS) -s -v --with-coverage $(MODULE)
test: test-code
trailing-spaces:
find $(MODULE) -name "*.py" -exec perl -pi -e 's/[ \t]*$$//' {} \;
code-analysis:
flake8 $(MODULE) | grep -v __init__ | grep -v external
pylint -E -i y $(MODULE)/ # -d E1103,E0611,E1101
linkissues-changelog:
tools/link_issues_CHANGELOG
update-changelog: linkissues-changelog
@echo ".. This file is auto-converted from CHANGELOG.md (make update-changelog) -- do not edit\n\nChange log\n**********" > docs/source/changelog.rst
pandoc -t rst CHANGELOG.md >> docs/source/changelog.rst
release-pypi: update-changelog
# better safe than sorry
test ! -e dist
$(PYTHON) setup.py sdist
$(PYTHON) setup.py bdist_wheel --universal
twine upload dist/*
docs/source/basics_cmdline.rst.in: build/casts/cmdline_basic_usage.json
tools/cast2rst $^ > $@
docs/source/basics_nesteddatasets.rst.in: build/casts/seamless_nested_repos.json
tools/cast2rst $^ > $@