2018-05-30 18:35:11 +00:00
|
|
|
.PHONY: _default clean clean-libuv distclean compile debug docs test testinstalled release setup-build ci-clean
|
2015-11-03 23:49:23 +00:00
|
|
|
|
|
|
|
|
2016-07-05 18:38:55 +00:00
|
|
|
PYTHON ?= python
|
2021-01-21 00:01:14 +00:00
|
|
|
ROOT = $(dir $(realpath $(firstword $(MAKEFILE_LIST))))
|
2016-07-05 18:38:55 +00:00
|
|
|
|
|
|
|
|
2016-11-10 23:46:56 +00:00
|
|
|
_default: compile
|
2015-11-01 17:00:43 +00:00
|
|
|
|
|
|
|
|
|
|
|
clean:
|
2017-04-04 16:30:40 +00:00
|
|
|
rm -fr dist/ doc/_build/ *.egg-info uvloop/loop.*.pyd
|
2016-11-10 23:46:56 +00:00
|
|
|
rm -fr uvloop/*.c uvloop/*.html uvloop/*.so
|
2016-04-14 16:53:08 +00:00
|
|
|
rm -fr uvloop/handles/*.html uvloop/includes/*.html
|
2015-11-03 17:42:21 +00:00
|
|
|
find . -name '__pycache__' | xargs rm -rf
|
2015-11-01 17:00:43 +00:00
|
|
|
|
|
|
|
|
2018-05-30 18:35:11 +00:00
|
|
|
ci-clean: clean
|
|
|
|
rm -fr build/lib.* build/temp.* build/libuv
|
|
|
|
|
|
|
|
|
2016-04-12 14:28:39 +00:00
|
|
|
clean-libuv:
|
2016-07-29 16:07:16 +00:00
|
|
|
(cd vendor/libuv; git clean -dfX)
|
2015-11-03 23:49:23 +00:00
|
|
|
|
|
|
|
|
2016-04-12 14:28:39 +00:00
|
|
|
distclean: clean clean-libuv
|
2017-04-04 16:30:40 +00:00
|
|
|
rm -fr build/
|
2016-04-12 14:28:39 +00:00
|
|
|
|
|
|
|
|
2017-11-10 22:24:00 +00:00
|
|
|
setup-build:
|
2016-11-10 18:03:05 +00:00
|
|
|
$(PYTHON) setup.py build_ext --inplace --cython-always
|
2015-11-26 01:35:36 +00:00
|
|
|
|
|
|
|
|
2017-11-10 22:24:00 +00:00
|
|
|
compile: clean setup-build
|
|
|
|
|
|
|
|
|
2016-11-10 18:03:05 +00:00
|
|
|
debug: clean
|
|
|
|
$(PYTHON) setup.py build_ext --inplace --debug \
|
|
|
|
--cython-always \
|
|
|
|
--cython-annotate \
|
|
|
|
--cython-directives="linetrace=True" \
|
2016-11-10 17:16:03 +00:00
|
|
|
--define UVLOOP_DEBUG,CYTHON_TRACE,CYTHON_TRACE_NOGIL
|
2015-11-10 22:41:22 +00:00
|
|
|
|
|
|
|
|
2017-03-30 14:59:06 +00:00
|
|
|
docs:
|
|
|
|
$(PYTHON) setup.py build_ext --inplace build_sphinx
|
2016-05-08 04:30:27 +00:00
|
|
|
|
|
|
|
|
2015-11-10 22:41:22 +00:00
|
|
|
test:
|
2021-02-09 18:44:08 +00:00
|
|
|
PYTHONASYNCIODEBUG=1 $(PYTHON) -m unittest -v tests.suite
|
|
|
|
$(PYTHON) -m unittest -v tests.suite
|
2016-04-12 13:52:32 +00:00
|
|
|
|
|
|
|
|
2017-09-11 23:44:19 +00:00
|
|
|
testinstalled:
|
2021-01-21 00:01:14 +00:00
|
|
|
cd "$${HOME}" && $(PYTHON) $(ROOT)/tests/__init__.py
|