diff options
author | Tristan Van Berkom <tristan.vanberkom@codethink.co.uk> | 2018-08-05 18:03:09 +0900 |
---|---|---|
committer | Tristan Van Berkom <tristan.vanberkom@codethink.co.uk> | 2018-08-05 19:07:46 +0900 |
commit | bc63f27846ec10a71d498ab5c48e9864970643e5 (patch) | |
tree | 0b177de3e9c8b201c8ee124e46f5816fb5bf4a8e | |
parent | f69a02874e482723061f7a5d125ae4384fec4cc9 (diff) | |
download | buildstream-bc63f27846ec10a71d498ab5c48e9864970643e5.tar.gz |
__main__.py: Adding private entry point so we can run BuildStream without installing
This is needed to build docs without installing BuildStream.
-rw-r--r-- | buildstream/__main__.py | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/buildstream/__main__.py b/buildstream/__main__.py new file mode 100644 index 000000000..4b0fdabfe --- /dev/null +++ b/buildstream/__main__.py @@ -0,0 +1,17 @@ +################################################################## +# Private Entry Point # +################################################################## +# +# This allows running the cli when BuildStream is uninstalled, +# as long as BuildStream repo is in PYTHONPATH, one can run it +# with: +# +# python3 -m buildstream [program args] +# +# This is used when we need to run BuildStream before installing, +# like when we build documentation. +# +if __name__ == '__main__': + # pylint: disable=no-value-for-parameter + from ._frontend.cli import cli + cli() |