Skip to content

Commit 53b8cc0

Browse files
authored
add entry points (#902)
* add entry points * changelog
1 parent 491c05a commit 53b8cc0

File tree

2 files changed

+21
-14
lines changed

2 files changed

+21
-14
lines changed

docs/source/about/changelog.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ Unreleased
3030
**Fixed**
3131

3232
- :issue:`896` - Stale event handlers after disconnect/reconnect cycle
33+
- :issue:`898` - Fixed CLI not registered as entry point
3334

3435

3536
v1.0.0-a1

setup.py

Lines changed: 20 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ def list2cmdline(cmd_list):
2525
log.addHandler(StreamHandler(sys.stdout))
2626

2727

28-
# -----------------------------------------------------------------------------
28+
# --------------------------------------------------------------------------------------
2929
# Basic Constants
30-
# -----------------------------------------------------------------------------
30+
# --------------------------------------------------------------------------------------
3131

3232

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

4242

43-
# -----------------------------------------------------------------------------
43+
# --------------------------------------------------------------------------------------
4444
# Package Definition
45-
# -----------------------------------------------------------------------------
45+
# --------------------------------------------------------------------------------------
4646

4747

4848
package = {
@@ -75,9 +75,9 @@ def list2cmdline(cmd_list):
7575
}
7676

7777

78-
# -----------------------------------------------------------------------------
78+
# --------------------------------------------------------------------------------------
7979
# Library Version
80-
# -----------------------------------------------------------------------------
80+
# --------------------------------------------------------------------------------------
8181

8282
pkg_root_init_file = PKG_DIR / "__init__.py"
8383
for line in pkg_root_init_file.read_text().split("\n"):
@@ -99,9 +99,9 @@ def list2cmdline(cmd_list):
9999
sys.exit(1)
100100

101101

102-
# -----------------------------------------------------------------------------
102+
# --------------------------------------------------------------------------------------
103103
# Requirements
104-
# -----------------------------------------------------------------------------
104+
# --------------------------------------------------------------------------------------
105105

106106

107107
requirements = []
@@ -133,9 +133,9 @@ def list2cmdline(cmd_list):
133133
package["extras_require"] = extra_requirements
134134

135135

136-
# -----------------------------------------------------------------------------
136+
# --------------------------------------------------------------------------------------
137137
# Library Description
138-
# -----------------------------------------------------------------------------
138+
# --------------------------------------------------------------------------------------
139139

140140

141141
with (ROOT_DIR / "README.md").open() as f:
@@ -145,9 +145,15 @@ def list2cmdline(cmd_list):
145145
package["long_description_content_type"] = "text/markdown"
146146

147147

148-
# ----------------------------------------------------------------------------
148+
# --------------------------------------------------------------------------------------
149+
# Command Line Interface
150+
# --------------------------------------------------------------------------------------
151+
152+
package["entry_points"] = {"console_scripts": ["idom=idom.__main__:app"]}
153+
154+
# --------------------------------------------------------------------------------------
149155
# Build Javascript
150-
# ----------------------------------------------------------------------------
156+
# --------------------------------------------------------------------------------------
151157

152158

153159
def build_javascript_first(cls):
@@ -188,9 +194,9 @@ def run(self):
188194
package["cmdclass"]["build_py"] = build_javascript_first(build_py)
189195

190196

191-
# -----------------------------------------------------------------------------
197+
# --------------------------------------------------------------------------------------
192198
# Install It
193-
# -----------------------------------------------------------------------------
199+
# --------------------------------------------------------------------------------------
194200

195201

196202
if __name__ == "__main__":

0 commit comments

Comments
 (0)