| 1 |
PYTHON := $(shell python -c 'import platform;print(platform.python_version().split(".")[0])') |
| 2 |
PYTHON3 := $(shell if which python3 &>/dev/null;then which python3; elif [ "$(PYTHON)" == 3 ]; then which python; fi) |
| 3 |
|
| 4 |
all: build |
| 5 |
.PHONY: all |
| 6 |
|
| 7 |
build: |
| 8 |
rm -fr build |
| 9 |
python3 setup.py bdist_wheel --universal |
| 10 |
.PHONY: build |
| 11 |
|
| 12 |
clean: |
| 13 |
rm -rf dist build |
| 14 |
.PHONY: clean |
| 15 |
|
| 16 |
check: |
| 17 |
if [ -x "$(PYTHON3)" ]; then $(PYTHON3) -m unittest varlink;fi |
| 18 |
.PHONY: check |
| 19 |
|
| 20 |
docs: |
| 21 |
python3 setup.py build_sphinx --source-dir=docs/ --build-dir=docs/build --all-files |
| 22 |
.PHONY: docs |
| 23 |
|
| 24 |
docsdeploy: docs |
| 25 |
GIT_DEPLOY_DIR=$(PWD)/docs/build/html GIT_DEPLOY_BRANCH=gh-pages ./git-deploy-branch.sh -m "doc update" |
| 26 |
.PHONY: docsdeploy |