File: Makefile

package info (click to toggle)
fangfrisch 1.9.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 804 kB
  • sloc: python: 1,326; sh: 113; makefile: 64; sql: 24
file content (57 lines) | stat: -rw-r--r-- 983 bytes parent folder | download
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
# vim: ts=4: sw=4: noet

package = contrib/package.sh
unittest = contrib/unittest.sh
subdirs = docs

define usage

The following make targets are available:

  clean  Cleanup build directories.
  dist   Build distribution files.
  fla    Run flake8.
  fmt    Format Python source code.
  help   Show this text.
  pypi   Upload distribution files to PyPI.
  shc    Shell script care.
  stest  Run sandboxed Python tests (disables network tests).
  test   Run all Python tests and generate coverage report.

endef

.PHONY:	clean fla help pypi shc stest subdirs test

subdirs: $(subdirs)

$(subdirs):
	make -C $@

help:
	$(info $(usage))
	@exit 0

clean:
	find tmp -type f -delete
	$(package) clean

dist:
	$(package) dist

pypi:
	@echo "# Run this command to upload:\n$(package) pypi"

stest:	fla
	env NETWORK_TESTS=0 $(unittest)

test:	fla
	env NETWORK_TESTS=1 $(unittest) coverage

shc:
	shcare contrib/*.sh

fmt:
	black -l 120 src tests

fla:	fmt
	flake8 src tests --config=.flake8