-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
51 lines (44 loc) · 1.41 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
#####################################################
# python-make #
# =========== #
# #
# This is a simple Makefile wrapper to map 'make' #
# ulility commands to python 'setup.py' commands. #
# So you can, for example, use commands like this #
# from the command line: #
# #
# make #
# make test #
# make install #
# make clean #
# #
# For more information, and for the latest version, #
# see: https://github.com/ltn100/python-make #
#####################################################
PYTHON ?= python
TWINE ?= twine
SETUP := setup.py
.PHONY: all
all: build
.PHONY: build
build:
$(PYTHON) $(SETUP) sdist bdist_wheel
.PHONY: upload
upload: clean build
$(TWINE) $@ dist/*
# Pass-through targets dependant on 'build' target
.PHONY: install test
install test: build
$(PYTHON) $(SETUP) $@
.PHONY: docs
docs:
$(PYTHON) $(SETUP) build_sphinx && \
xdg-open build/sphinx/html/index.html
# Bespoke targets...
.PHONY: clean
clean:
$(PYTHON) $(SETUP) $@
rm -rf build dist
# Aliases...
.PHONY: check
check: test