From 150711ff1db2c5e6fb3f1cf9a207965d6945cdcd Mon Sep 17 00:00:00 2001 From: rmorshea Date: Tue, 31 Jan 2023 23:37:36 -0800 Subject: [PATCH 1/2] add entry points --- setup.py | 34 ++++++++++++++++++++-------------- 1 file changed, 20 insertions(+), 14 deletions(-) diff --git a/setup.py b/setup.py index ba3b0e453..0dc0e66d0 100644 --- a/setup.py +++ b/setup.py @@ -25,9 +25,9 @@ def list2cmdline(cmd_list): log.addHandler(StreamHandler(sys.stdout)) -# ----------------------------------------------------------------------------- +# -------------------------------------------------------------------------------------- # Basic Constants -# ----------------------------------------------------------------------------- +# -------------------------------------------------------------------------------------- # the name of the project @@ -40,9 +40,9 @@ def list2cmdline(cmd_list): JS_DIR = SRC_DIR / "client" -# ----------------------------------------------------------------------------- +# -------------------------------------------------------------------------------------- # Package Definition -# ----------------------------------------------------------------------------- +# -------------------------------------------------------------------------------------- package = { @@ -75,9 +75,9 @@ def list2cmdline(cmd_list): } -# ----------------------------------------------------------------------------- +# -------------------------------------------------------------------------------------- # Library Version -# ----------------------------------------------------------------------------- +# -------------------------------------------------------------------------------------- pkg_root_init_file = PKG_DIR / "__init__.py" for line in pkg_root_init_file.read_text().split("\n"): @@ -99,9 +99,9 @@ def list2cmdline(cmd_list): sys.exit(1) -# ----------------------------------------------------------------------------- +# -------------------------------------------------------------------------------------- # Requirements -# ----------------------------------------------------------------------------- +# -------------------------------------------------------------------------------------- requirements = [] @@ -133,9 +133,9 @@ def list2cmdline(cmd_list): package["extras_require"] = extra_requirements -# ----------------------------------------------------------------------------- +# -------------------------------------------------------------------------------------- # Library Description -# ----------------------------------------------------------------------------- +# -------------------------------------------------------------------------------------- with (ROOT_DIR / "README.md").open() as f: @@ -145,9 +145,15 @@ def list2cmdline(cmd_list): package["long_description_content_type"] = "text/markdown" -# ---------------------------------------------------------------------------- +# -------------------------------------------------------------------------------------- +# Command Line Interface +# -------------------------------------------------------------------------------------- + +package["entry_points"] = {"console_scripts": ["idom=idom.__main__:app"]} + +# -------------------------------------------------------------------------------------- # Build Javascript -# ---------------------------------------------------------------------------- +# -------------------------------------------------------------------------------------- def build_javascript_first(cls): @@ -188,9 +194,9 @@ def run(self): package["cmdclass"]["build_py"] = build_javascript_first(build_py) -# ----------------------------------------------------------------------------- +# -------------------------------------------------------------------------------------- # Install It -# ----------------------------------------------------------------------------- +# -------------------------------------------------------------------------------------- if __name__ == "__main__": From 88a3f3863bbf5c2d4bf637c96c7c306e1c0602f2 Mon Sep 17 00:00:00 2001 From: rmorshea Date: Tue, 31 Jan 2023 23:42:12 -0800 Subject: [PATCH 2/2] changelog --- docs/source/about/changelog.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/source/about/changelog.rst b/docs/source/about/changelog.rst index ec81d430f..6f6a120af 100644 --- a/docs/source/about/changelog.rst +++ b/docs/source/about/changelog.rst @@ -30,6 +30,7 @@ Unreleased **Fixed** - :issue:`896` - Stale event handlers after disconnect/reconnect cycle +- :issue:`898` - Fixed CLI not registered as entry point v1.0.0-a1