Skip to content

Commit 49e8090

Browse files
committed
use shared Makefile
1 parent 10f1cb0 commit 49e8090

File tree

1 file changed

+10
-53
lines changed

1 file changed

+10
-53
lines changed

Makefile

Lines changed: 10 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -1,58 +1,15 @@
11
#!/usr/bin/make -f
22

3-
.PHONY: doc test update all tag pypi upload
3+
PACKAGE=asyncgpio
4+
ifneq ($(wildcard /usr/share/sourcemgr/make/py),)
5+
include /usr/share/sourcemgr/make/py
6+
# availabe via http://github.com/smurfix/sourcemgr
47

5-
all:
6-
@echo "Please use 'python setup.py'."
7-
@exit 1
8-
9-
# need to use python3 sphinx-build
10-
PATH := /usr/share/sphinx/scripts/python3:${PATH}
11-
12-
PACKAGE = asyncgpio
13-
PYTHON ?= python3
14-
SPHINX ?= sphinx3-build
15-
export PYTHONPATH=$(shell pwd)
16-
17-
PYTEST ?= ${PYTHON} $(shell which pytest-3)
18-
TEST_OPTIONS ?= -xvvv --full-trace
19-
PYLINT_RC ?= .pylintrc
20-
21-
BUILD_DIR ?= build
22-
INPUT_DIR ?= docs/source
23-
24-
# Sphinx options (are passed to build_docs, which passes them to sphinx-build)
25-
# -W : turn warning into errors
26-
# -a : write all files
27-
# -b html : use html builder
28-
# -i [pat] : ignore pattern
29-
30-
SPHINXOPTS ?= -a -W -b html
31-
AUTOSPHINXOPTS := -i *~ -i *.sw* -i Makefile*
32-
33-
SPHINXBUILDDIR ?= $(BUILD_DIR)/sphinx/html
34-
ALLSPHINXOPTS ?= -d $(BUILD_DIR)/sphinx/doctrees $(SPHINXOPTS) docs
35-
36-
doc:
37-
$(SPHINX) -a $(INPUT_DIR) $(BUILD_DIR)
38-
39-
livehtml: docs
40-
sphinx-autobuild $(AUTOSPHINXOPTS) $(ALLSPHINXOPTS) $(SPHINXBUILDDIR)
8+
else
9+
%:
10+
@echo "Please use 'python setup.py'."
11+
@exit 1
12+
endif
4113

4214
test:
43-
$(PYTEST) $(PACKAGE) $(TEST_OPTIONS)
44-
45-
46-
tagged:
47-
git describe --tags --exact-match
48-
test $$(git ls-files -m | wc -l) = 0
49-
50-
pypi: tagged
51-
python3 setup.py sdist upload
52-
53-
upload: pypi
54-
git push-all --tags
55-
56-
update:
57-
pip install -r ci/test-requirements.txt
58-
15+
sudo tests/test.sh

0 commit comments

Comments
 (0)