31 lines
871 B
Python
31 lines
871 B
Python
|
# -*- coding: utf-8; -*-
|
||
|
"""
|
||
|
{{cookiecutter.project_name}} CLI
|
||
|
"""
|
||
|
|
||
|
import typer
|
||
|
|
||
|
from wuttjamaican.cli import make_typer
|
||
|
|
||
|
|
||
|
{{cookiecutter.package_name}}_typer = make_typer(
|
||
|
name='{{cookiecutter.package_name}}',
|
||
|
help="{{cookiecutter.project_name}} -- {{cookiecutter.project_short_description}}"
|
||
|
)
|
||
|
|
||
|
|
||
|
@{{cookiecutter.package_name}}_typer.command()
|
||
|
def install(
|
||
|
ctx: typer.Context,
|
||
|
):
|
||
|
"""
|
||
|
Install the {{cookiecutter.project_name}} app
|
||
|
"""
|
||
|
config = ctx.parent.wutta_config
|
||
|
app = config.get_app()
|
||
|
install = app.get_install_handler(pkg_name='{{cookiecutter.package_name}}',
|
||
|
app_title="{{cookiecutter.project_name}}",
|
||
|
pypi_name='{{cookiecutter.distribution_name}}',
|
||
|
egg_name='{{cookiecutter.__egg_name}}')
|
||
|
install.run()
|