File: Makefile

package info (click to toggle)
toot 0.51.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,108 kB
  • sloc: python: 9,284; makefile: 41
file content (48 lines) | stat: -rw-r--r-- 952 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
.PHONY: clean publish test docs

dist:
	python -m build

publish :
	twine upload dist/*.tar.gz dist/*.whl

test:
	pytest -v
	flake8
	vermin toot

coverage:
	coverage erase
	coverage run
	coverage html --omit "toot/tui/*"
	coverage report

clean :
	find . -name "*pyc" | xargs rm -rf $1
	rm -rf build dist book MANIFEST htmlcov bundle toot*.tar.gz toot*.pyz

changelog:
	./scripts/generate_changelog > CHANGELOG.md
	cp CHANGELOG.md docs/changelog.md

docs: changelog
	mdbook build

docs-serve:
	mdbook serve --port 8000

docs-deploy: docs
	rsync --archive --compress --delete --stats book/ bezdomni:web/toot

.PHONY: bundle
bundle:
	mkdir bundle
	cp toot/__main__.py bundle
	pip install . --target=bundle
	rm -rf bundle/*.dist-info
	find bundle/ -type d -name "__pycache__" -exec rm -rf {} +
	python -m zipapp \
		--python "/usr/bin/env python3" \
		--output toot-`git describe`.pyz bundle \
		--compress
	echo "Bundle created: toot-`git describe`.pyz"