Charmed-Kubernetes/kubernetes-control-plane/hooks/relations/vsphere-integration/make_docs

21 lines
494 B
Python

#!.tox/py3/bin/python
import sys
from shutil import rmtree
from unittest.mock import patch
import pydocmd.__main__
with patch('charmhelpers.core.hookenv.metadata') as metadata:
metadata.return_value = {
'requires': {'vsphere': {'interface': 'vsphere'}},
'provides': {'vsphere': {'interface': 'vsphere'}},
}
sys.path.insert(0, '.')
print(sys.argv)
if len(sys.argv) == 1:
sys.argv.extend(['build'])
pydocmd.__main__.main()
rmtree('_build')