forked from python-trio/trio-asyncio
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
59 lines (41 loc) · 1.35 KB
/
Makefile
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
58
#!/usr/bin/make -f
.PHONY: doc test update all tag pypi upload
all:
@echo "Please use 'python setup.py'."
@exit 1
# need to use python3 sphinx-build
PATH := /usr/share/sphinx/scripts/python3:${PATH}
PACKAGE = trio_asyncio
PYTHON ?= python3
export PYTHONPATH=$(shell pwd)
PYTEST ?= ${PYTHON} $(shell which pytest-3)
TEST_OPTIONS ?= -xvvv --full-trace
PYLINT_RC ?= .pylintrc
BUILD_DIR ?= build
INPUT_DIR ?= docs/source
# Sphinx options (are passed to build_docs, which passes them to sphinx-build)
# -W : turn warning into errors
# -a : write all files
# -b html : use html builder
# -i [pat] : ignore pattern
SPHINXOPTS ?= -a -W -b html
AUTOSPHINXOPTS := -i *~ -i *.sw* -i Makefile*
SPHINXBUILDDIR ?= $(BUILD_DIR)/sphinx/html
ALLSPHINXOPTS ?= -d $(BUILD_DIR)/sphinx/doctrees $(SPHINXOPTS) docs
doc:
sphinx3-build -a $(INPUT_DIR) $(BUILD_DIR)
livehtml: docs
sphinx-autobuild $(AUTOSPHINXOPTS) $(ALLSPHINXOPTS) $(SPHINXBUILDDIR)
test:
$(PYTEST) $(PACKAGE) $(TEST_OPTIONS)
tag:
@-git tag v$(shell python3 setup.py -V)
pypi: tag
@if python3 setup.py -V 2>/dev/null | grep -qs + >/dev/null 2>&1 ; \
then echo "You need a clean, tagged tree" >&2; exit 1 ; fi
python3 setup.py sdist upload
## version depends on tag, so re-tagging doesn't make sense
upload: pypi
git push-all --tags
update:
pip install -r ci/test-requirements.txt