Refactored login code to better handle redirects (#116)
[osm/N2VC.git] / Makefile
1 BIN := .tox/py35/bin
2 PY := $(BIN)/python3.5
3 PIP := $(BIN)/pip
4 SCHEMAGEN := $(shell which schemagen)
5
6 clean:
7 find . -name __pycache__ -type d -exec rm -r {} +
8 find . -name *.pyc -delete
9 rm -rf .tox
10
11 .tox:
12 tox -r --notest
13
14 client:
15 ifndef SCHEMAGEN
16 $(error "schemagen is not available, please install from https://github.com/juju/schemagen")
17 endif
18 $(PY) -m juju.client.facade -s "juju/client/schemas*" -o juju/client/
19
20 test:
21 tox
22
23 docs: .tox
24 $(PIP) install -r docs/requirements.txt
25 rm -rf docs/api/* docs/_build/
26 $(BIN)/sphinx-apidoc -o docs/api/ juju/
27 $(BIN)/sphinx-build -b html docs/ docs/_build/
28 cd docs/_build/ && zip -r docs.zip *
29
30 upload: docs
31 $(PY) setup.py sdist upload upload_docs --upload-dir=docs/_build
32
33 .PHONY: clean client test docs upload