-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMakefile
65 lines (50 loc) · 1.14 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
59
60
61
62
63
64
65
PYTHON=python
MODULE = edgex_access
VERSION = 0.0.13
S3EDGE = s3edge
SOURCES = $(MODULE)/$(MODULE).py
SETUP = setup.py
DOCS = docs/source/$(MODULE).rst docs/source/s3edgex.rst
SCRIPTS = s3edgex/s3edgex
READMES = README.md LICENSE
TESTLOG = testlog.log
REQ = requirements.txt
DISTDIR = dist
DIST_FILE = $(DISTDIR)/$(MODULE)-$(VERSION).tar.gz
ALL_FILES = $(SOURCES) $(SETUP) $(READMES) $(TESTS) $(DOCS) $(SCRIPTS) $(REQ)
all: build install test
show:
@for f in $(ALL_FILES) ; do \
echo $$f ; \
done | sort -u
clean:
rm -rf $(MODULE).egg-info
rm -rf dist build
rm -rf __pycache__
make -C docs clean
rm test.log
req:
pip freeze > $(REQ)
$(PYTHON) -m pip install setuptools wheel twine
init:
pip install -r requirements.txt
build: $(SOURCES) $(SETUP) req
$(PYTHON) $(SETUP) build
$(PYTHON) $(SETUP) sdist bdist_wheel
# dev version only
installd:
pip install .
install: $(SOURCES) $(SETUP)
$(PYTHON) $(SETUP) install
uninstall:
pip uninstall -y $(MODULE)
register: $(SETUP)
echo "twine upload dist/*"
docs: $(DOCS)
make -C docs html
testlog:
@if [ -f test.log ]; then \
rm test.log; \
fi
make -C test 2>&1 | tee test.log
test: testlog