Makefile 1.06 KB
Newer Older
1
.PHONY: _default clean clean-libuv distclean compile debug docs test testinstalled release setup-build ci-clean
2 3 4 5 6 7 8 9 10


PYTHON ?= python


_default: compile


clean:
11
	rm -fr dist/ doc/_build/ *.egg-info uvloop/loop.*.pyd
12 13 14 15 16
	rm -fr uvloop/*.c uvloop/*.html uvloop/*.so
	rm -fr uvloop/handles/*.html uvloop/includes/*.html
	find . -name '__pycache__' | xargs rm -rf


17 18 19 20
ci-clean: clean
	rm -fr build/lib.* build/temp.* build/libuv


21 22 23 24 25
clean-libuv:
	(cd vendor/libuv; git clean -dfX)


distclean: clean clean-libuv
26
	rm -fr build/
27 28


29
setup-build:
30 31 32
	$(PYTHON) setup.py build_ext --inplace --cython-always


33 34 35
compile: clean setup-build


36 37 38 39 40 41 42 43
debug: clean
	$(PYTHON) setup.py build_ext --inplace --debug \
		--cython-always \
		--cython-annotate \
		--cython-directives="linetrace=True" \
		--define UVLOOP_DEBUG,CYTHON_TRACE,CYTHON_TRACE_NOGIL


44 45
docs:
	$(PYTHON) setup.py build_ext --inplace build_sphinx
46 47 48


test:
49 50 51 52 53 54
	PYTHONASYNCIODEBUG=1 $(PYTHON) setup.py test
	$(PYTHON) setup.py test


testinstalled:
	$(PYTHON) tests/__init__.py
55 56 57 58


release: distclean compile test
	$(PYTHON) setup.py sdist bdist_wheel upload