Skip to content

add entry points #902

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Feb 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/source/about/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
34 changes: 20 additions & 14 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ def list2cmdline(cmd_list):
log.addHandler(StreamHandler(sys.stdout))


# -----------------------------------------------------------------------------
# --------------------------------------------------------------------------------------
# Basic Constants
# -----------------------------------------------------------------------------
# --------------------------------------------------------------------------------------


# the name of the project
Expand All @@ -40,9 +40,9 @@ def list2cmdline(cmd_list):
JS_DIR = SRC_DIR / "client"


# -----------------------------------------------------------------------------
# --------------------------------------------------------------------------------------
# Package Definition
# -----------------------------------------------------------------------------
# --------------------------------------------------------------------------------------


package = {
Expand Down Expand Up @@ -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"):
Expand All @@ -99,9 +99,9 @@ def list2cmdline(cmd_list):
sys.exit(1)


# -----------------------------------------------------------------------------
# --------------------------------------------------------------------------------------
# Requirements
# -----------------------------------------------------------------------------
# --------------------------------------------------------------------------------------


requirements = []
Expand Down Expand Up @@ -133,9 +133,9 @@ def list2cmdline(cmd_list):
package["extras_require"] = extra_requirements


# -----------------------------------------------------------------------------
# --------------------------------------------------------------------------------------
# Library Description
# -----------------------------------------------------------------------------
# --------------------------------------------------------------------------------------


with (ROOT_DIR / "README.md").open() as f:
Expand All @@ -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):
Expand Down Expand Up @@ -188,9 +194,9 @@ def run(self):
package["cmdclass"]["build_py"] = build_javascript_first(build_py)


# -----------------------------------------------------------------------------
# --------------------------------------------------------------------------------------
# Install It
# -----------------------------------------------------------------------------
# --------------------------------------------------------------------------------------


if __name__ == "__main__":
Expand Down