From 6b3e6e371a55f465245192b0900b51d45bc30319 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 21 May 2018 15:56:18 -0400 Subject: [PATCH] Add __main__, allowing for invocation under runpy (python -m). Fixes #115. --- src/towncrier/__main__.py | 4 ++++ src/towncrier/newsfragments/115.feature | 1 + 2 files changed, 5 insertions(+) create mode 100644 src/towncrier/__main__.py create mode 100644 src/towncrier/newsfragments/115.feature diff --git a/src/towncrier/__main__.py b/src/towncrier/__main__.py new file mode 100644 index 00000000..48133f26 --- /dev/null +++ b/src/towncrier/__main__.py @@ -0,0 +1,4 @@ +import towncrier + + +__name__ == '__main__' and towncrier._main() diff --git a/src/towncrier/newsfragments/115.feature b/src/towncrier/newsfragments/115.feature new file mode 100644 index 00000000..a400cc05 --- /dev/null +++ b/src/towncrier/newsfragments/115.feature @@ -0,0 +1 @@ +Allow for invocation under runpy. Invoke with `python -m towncrier`.