File: Makefile

package info (click to toggle)
datalad 1.2.1-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 7,148 kB
  • sloc: python: 69,414; sh: 1,521; makefile: 220
file content (61 lines) | stat: -rw-r--r-- 2,026 bytes parent folder | download | duplicates (2)
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
57
58
59
60
61
# simple makefile to simplify repetitive build env management tasks under posix
# Ideas borrowed from scikit-learn's and PyMVPA Makefiles  -- thanks!

PYTHON ?= python3

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 $@

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: CHANGELOG.md
	@echo ".. This file is auto-converted from CHANGELOG.md (make update-changelog) -- do not edit\n\nChange log\n**********" > docs/source/changelog.rst
	# sphinx 3.4.3-2 on Debian incorrectly handles unicode character
	# and then fails claiming that underlines are too short. So we remove all
	# such problematic ones for now.
	# Also, for some reason auto sticks subsections all the way to 4th level of sectioning,
	# so we bring them back to 2nd.
	# And pandoc manages to just skip all the valid markdown urls for authors within (),
	# so doing manual post conversion
	cat "$<" | sed -e 's,^#### ,## ,g' \
	| iconv -c -f utf-8 -t ascii \
    | grep -v  '^<.*> *$$' \
	| pandoc -t rst \
	| sed -e 's,\[\(@[^]]*\)\](\([^)]*\)),\`\1 <\2>\`__,g' \
	>> docs/source/changelog.rst


release-pypi: update-changelog
	# avoid upload of stale builds
	test ! -e dist
	$(PYTHON) setup.py sdist
	# the wheels we would produce are broken on windows, because they
	# install an incompatible entrypoint script
	# https://github.com/datalad/datalad/issues/4315
	#$(PYTHON) setup.py bdist_wheel
	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 $^ > $@