-
Notifications
You must be signed in to change notification settings - Fork 604
Expand file tree
/
Copy pathMakefile
More file actions
57 lines (33 loc) · 1.28 KB
/
Makefile
File metadata and controls
57 lines (33 loc) · 1.28 KB
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
.PHONY: _default clean clean-libuv distclean compile debug docs test testinstalled release setup-build ci-clean
PYTHON ?= python
ROOT = $(dir $(realpath $(firstword $(MAKEFILE_LIST))))
_default: compile
clean:
rm -fr dist/ doc/_build/ *.egg-info uvloop/loop.*.pyd uvloop/loop_d.*.pyd
rm -fr uvloop/*.c uvloop/*.html uvloop/*.so uvloop/*.pyd
rm -fr uvloop/handles/*.html uvloop/includes/*.html
find . -name '__pycache__' | xargs rm -rf
ci-clean: clean
rm -fr build/lib.* build/temp.* build/libuv
clean-libuv:
(cd vendor/libuv; git clean -dfX)
distclean: clean clean-libuv
rm -fr build/
setup-build:
$(PYTHON) setup.py build_ext --inplace --cython-always
compile: clean setup-build
# NOTE: --debug will not work on windows since it asks for a non-existant _d.lib file.
# TODO: Fix workflows for missing debug binaries in the future.
debug: clean
$(PYTHON) setup.py build_ext --inplace \
--cython-always \
--cython-annotate \
--cython-directives="linetrace=True" \
--define UVLOOP_DEBUG,CYTHON_TRACE,CYTHON_TRACE_NOGIL
docs:
$(PYTHON) setup.py build_ext --inplace build_sphinx
test:
PYTHONASYNCIODEBUG=1 $(PYTHON) -m unittest discover -v tests
$(PYTHON) -m unittest discover -v tests
testinstalled:
cd "$${HOME}" && $(PYTHON) -m unittest discover -v $(ROOT)/tests