summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTristan Van Berkom <tristan.vanberkom@codethink.co.uk>2018-08-05 18:03:09 +0900
committerTristan Van Berkom <tristan.vanberkom@codethink.co.uk>2018-08-05 19:06:42 +0900
commitd9b2de3ebf42335722c2297134ab542828249785 (patch)
treee063dcd2be2a73b08f6e430d6d6bd0e8215aa186
parent111c0fdec14198ed4cc88dcd24b961421d7df2ce (diff)
downloadbuildstream-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__.py17
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()