Skip to content

Commit 52fd5c6

Browse files
author
Hu Ji
committed
update scripts
1 parent aa2b00f commit 52fd5c6

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

src/linktools_setup/setup.py

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ def _parse_scripts(self, scripts):
200200

201201
def _parse_script(self, script):
202202
if "name" in script:
203-
yield SubScriptEntryPoint(
203+
yield ScriptEntryPoint(
204204
name=script.get("name"),
205205
module=script.get("module"),
206206
object=script.get("object", self.const.default_script_object),
@@ -277,10 +277,11 @@ def finalize_distribution_options(dist: setuptools.Distribution) -> None:
277277
if __name__ == '__main__':
278278
context = SetupContext(setuptools.Distribution())
279279

280-
scripts = [{
281-
"path": os.path.expanduser("~/Projects/linktools/src/linktools/cli/commands"),
282-
"module": "linktools.cli.commands",
283-
}]
284-
print([ep.as_script() for ep in context._parse_scripts(scripts)])
280+
# scripts = [{
281+
# "path": os.path.expanduser("~/Projects/linktools/src/linktools/cli/commands"),
282+
# "module": "linktools.cli.commands",
283+
# }]
284+
scripts = {"name": "ct-cntr", "module": "linktools_cntr.__main__"}
285+
# print([ep.as_script() for ep in context._parse_scripts(scripts)])
285286
# print([ep.as_script() for ep in context._parse_scripts(scripts) if isinstance(ep, ScriptEntryPoint)])
286-
# print([ep.as_script() for ep in context._parse_scripts(scripts) if not isinstance(ep, SubScriptEntryPoint)])
287+
print([ep.as_script() for ep in context._parse_scripts(scripts) if not isinstance(ep, SubScriptEntryPoint)])

0 commit comments

Comments
 (0)