Skip to content

Commit

Permalink
Make improvements to edmtool (#454)
Browse files Browse the repository at this point in the history
* DEV : edmtool improvements

- ensure that -h works along with --help
- add a new shell command

	modified:   ci/edmtool.py

* CLN : Use a dict literal instead of dict function

	modified:   ci/edmtool.py
  • Loading branch information
Poruri Sai Rahul authored Dec 1, 2020
1 parent f64a225 commit 55fc728
Showing 1 changed file with 24 additions and 1 deletion.
25 changes: 24 additions & 1 deletion ci/edmtool.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,13 @@
github_url_fmt = "git+http://github.com/enthought/{0}.git#egg={0}"


@click.group()
# Ensure that "-h" is supported for getting help.
CONTEXT_SETTINGS = {
"help_option_names": ["-h", "--help"],
}


@click.group(context_settings=CONTEXT_SETTINGS)
def cli():
pass

Expand Down Expand Up @@ -234,6 +240,23 @@ def install(runtime, toolkit, pillow, environment, source):
click.echo('Done install')


@cli.command()
@click.option('--runtime', default='3.6')
@click.option('--toolkit', default='null')
@click.option('--pillow', default='pillow')
@click.option('--environment', default=None)
def shell(runtime, toolkit, pillow, environment):
""" Create a shell into the EDM development environment
(aka 'activate' it).
"""
parameters = get_parameters(runtime, toolkit, pillow, environment)
commands = [
"edm shell -e {environment}",
]
execute(commands, parameters)


@cli.command()
@click.option('--runtime', default='3.6')
@click.option('--toolkit', default='null')
Expand Down

0 comments on commit 55fc728

Please sign in to comment.