Skip to content

Commit 0a27590

Browse files
Makes main command use entry_points.
Co-authored-by: Piotr Kaznowski <[email protected]>
1 parent c393657 commit 0a27590

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

cli/pa renamed to cli/pa.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
It was build with typer & click under the hood.
1414
"""
1515

16-
app = typer.Typer(help=help)
16+
app = typer.Typer(help=help, no_args_is_help=True, context_settings={"help_option_names": ["--help", "-h"]})
1717
app.add_typer(django.app, name="django", help="Makes Django Girls tutorial projects deployment easy")
1818
app.add_typer(path.app, name="path", help="Perform some operations on files")
1919
app.add_typer(schedule.app, name="schedule", help="Manage scheduled tasks")

setup.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,12 @@
4242
python_requires=">=3.8",
4343
package_data={},
4444
data_files=[],
45-
entry_points={},
45+
entry_points={
46+
"console_scripts": [
47+
"pa=cli.pa:app",
48+
]
49+
},
4650
scripts=[
47-
"cli/pa",
4851
"pythonanywhere/snakesay.py",
4952
"scripts/pa_autoconfigure_django.py",
5053
"scripts/pa_create_scheduled_task.py",

0 commit comments

Comments
 (0)