-
Notifications
You must be signed in to change notification settings - Fork 27
Expand file tree
/
Copy pathMakefile
More file actions
43 lines (32 loc) · 1010 Bytes
/
Makefile
File metadata and controls
43 lines (32 loc) · 1010 Bytes
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
# The targets in this makefile should be executed inside Poetry, i.e. `poetry run make
# docs`.
.PHONY: default docs generate mypy-cdp mypy-generate test-cdp test-generate test-import
.NOTPARALLEL:
PYTHON ?= $(if $(CONDA_PREFIX),$(CONDA_PREFIX)/bin/python,python)
PYTEST ?= $(PYTHON) -m pytest
MYPY ?= $(if $(CONDA_PREFIX),$(CONDA_PREFIX)/bin/mypy,mypy)
SPHINXBUILD ?= $(PYTHON) -m sphinx
default:
$(MAKE) mypy-generate
$(MAKE) test-generate
$(MAKE) generate
$(MAKE) test-import
$(MAKE) mypy-cdp
$(MAKE) test-cdp
MYPY_CACHE_BASE ?= .mypy_cache
MYPY_GENERATOR_CACHE ?= $(MYPY_CACHE_BASE)/generator
MYPY_CDP_CACHE ?= $(MYPY_CACHE_BASE)/cdp
docs:
$(MAKE) -C docs SPHINXBUILD="$(SPHINXBUILD)" html
generate:
$(PYTHON) generator/generate.py
mypy-cdp:
$(MYPY) --cache-dir $(MYPY_CDP_CACHE) cdp/
mypy-generate:
$(MYPY) --cache-dir $(MYPY_GENERATOR_CACHE) generator/
test-cdp:
$(PYTEST) test/
test-generate:
$(PYTEST) generator/
test-import:
$(PYTHON) -c 'import cdp; print(cdp.accessibility)'