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:06:42 +0900 |
commit | d9b2de3ebf42335722c2297134ab542828249785 (patch) | |
tree | e063dcd2be2a73b08f6e430d6d6bd0e8215aa186 | |
parent | 111c0fdec14198ed4cc88dcd24b961421d7df2ce (diff) | |
download | buildstream-d9b2de3ebf42335722c2297134ab542828249785.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() |