File: Makefile

package info (click to toggle)
metakernel 0.27.5-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 1,280 kB
  • sloc: python: 5,018; makefile: 207; sh: 27
file content (56 lines) | stat: -rw-r--r-- 1,194 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
# Note: This is meant for Metakernel developer use only
.PHONY: all clean test test_warn cover release help

export NAME=`python setup.py --name 2>/dev/null`
export VERSION=`python setup.py --version 2>/dev/null`


all: install

install: clean
	pip install  --upgrade --upgrade-strategy eager -e .[parallel,activity,test]
	pip install ./metakernel_python
	python -m metakernel_python install --user
	pip install ./metakernel_echo
	python -m metakernel_echo install --user

clean:
	rm -rf build dist
	/usr/bin/find . -name "*.pyc" -o -name "*.py,cover"| xargs rm -f

test: clean
	ipcluster start -n=3 &
	pytest
	ipcluster stop
	make clean

test_warn: clean
	ipcluster start -n=3 &
	export PYTHONWARNINGS="all"
	pytest
	ipcluster stop
	make clean

cover: clean
	ipcluster start -n=3 &
	pytest --cov=$(NAME)
	ipcluster stop
	coverage annotate

release:
	pip install wheel twine
	rm -rf dist build
	python setup.py bdist_wheel --universal
	python setup.py sdist
	git commit -a -m "Release $(VERSION)"; true
	git tag v$(VERSION)
	git push origin --all
	git push origin --tags
	twine upload dist/*

docs: clean
	pip install -r docs/requirements.txt
	make -C docs html

help:
	python generate_help.py