forked from linode/linode-cli
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
43 lines (35 loc) · 807 Bytes
/
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
#
# Makefile for more convenient building of the Linode CLI and its baked content
#
SPEC_VERSION ?= latest
ifndef SPEC
override SPEC = $(shell ./resolve_spec_url ${SPEC_VERSION})
endif
install: check-prerequisites requirements build
pip3 install --force dist/*.whl
.PHONY: build
build: clean
python3 -m linodecli bake ${SPEC} --skip-config
cp data-3 linodecli/
python3 setup.py bdist_wheel
python3 setup.py sdist
.PHONY: requirements
requirements:
pip3 install -r requirements.txt
.PHONY: requirements
lint:
pylint linodecli
.PHONY: check-prerequisites
check-prerequisites:
@ pip3 -v >/dev/null
@ python3 -V >/dev/null
.PHONY: clean
clean:
rm -f linodecli/data-*
rm -f linode-cli.sh baked_version
rm -f data-*
rm -rf dist
.PHONY: test
test:
pytest tests
python -m unittest tests/*.py