forked from juju/python-libjuju
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
59 lines (48 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
BIN := .tox/py3/bin
PY := $(BIN)/python3
PIP := $(BIN)/pip3
VERSION=$(shell cat VERSION)
.PHONY: clean
clean:
find . -name __pycache__ -type d -exec rm -r {} +
find . -name *.pyc -delete
rm -rf .tox
rm -rf docs/_build/
.PHONY: .tox
.tox:
tox -r --notest
.PHONY: client
client:
tox -r --notest -e lint,py3
$(PY) -m juju.client.facade -s "juju/client/schemas*" -o juju/client/
.PHONY: test
test: lint
tox -e py3
tox -e integration
.PHONY: lint
lint:
tox -e lint
.PHONY: docs
docs: .tox
$(PIP) install -r docs/requirements.txt
rm -rf docs/_build/
$(BIN)/sphinx-build -b html docs/ docs/_build/
cd docs/_build/ && zip -r docs.zip *
.PHONY: release
release:
git fetch --tags
rm dist/*.tar.gz || true
$(PY) setup.py sdist
$(BIN)/twine upload --repository-url https://upload.pypi.org/legacy/ dist/*
git tag ${VERSION}
git push --tags
.PHONY: upload
upload: release
.PHONY: install-deb-build-deps
install-deb-build-deps:
sudo apt install -y python3-all debhelper sbuild schroot ubuntu-dev-tools
$(PIP) install stdeb
.PHONY: build-deb
build-deb: install-deb-build-deps
rm -rf deb_dist
$(PY) setup.py --command-packages=stdeb.command bdist_deb