diff options
author | Kali Kaneko <kali@leap.se> | 2015-10-27 09:57:42 -0400 |
---|---|---|
committer | Kali Kaneko <kali@leap.se> | 2015-10-27 09:57:42 -0400 |
commit | d39d5d9ac81abaa2e0efde448f8bcf7f618a0292 (patch) | |
tree | cfbe7b23dec57877ae45661b33567c0c56a9adc0 | |
parent | b8ce26e69e15aa6f7786f7761ce30047d6a71906 (diff) |
add bonafide_cli entrypoint
-rw-r--r-- | bonafide/setup.py | 5 | ||||
-rwxr-xr-x | bonafide/src/leap/bonafide/bonafide_cli.py (renamed from bonafide/src/leap/bonafide/bonafide_cli) | 6 |
2 files changed, 10 insertions, 1 deletions
diff --git a/bonafide/setup.py b/bonafide/setup.py index eef1541e..828d82e9 100644 --- a/bonafide/setup.py +++ b/bonafide/setup.py @@ -70,6 +70,8 @@ try: except Exception: long_description = "" +bonafide_cli = 'bonafide_cli=leap.bonafide.bonafide_cli:main' + setup( name='leap.bonafide', version=VERSION, @@ -92,4 +94,7 @@ setup( install_requires=parsed_reqs, include_package_data=True, zip_safe=False, + entry_points={ + 'console_scripts': [bonafide_cli] + }, ) diff --git a/bonafide/src/leap/bonafide/bonafide_cli b/bonafide/src/leap/bonafide/bonafide_cli.py index 15a7a009..30cae6a1 100755 --- a/bonafide/src/leap/bonafide/bonafide_cli +++ b/bonafide/src/leap/bonafide/bonafide_cli.py @@ -85,7 +85,7 @@ def run_command(command, _provider, username, password): d.addBoth(_cbShutDown) reactor.run() -if __name__ == '__main__': +def main(): color_init() description = (Fore.YELLOW + 'Manage and configure a LEAP Account ' 'using the bonafide protocol.' + Fore.RESET) @@ -98,3 +98,7 @@ if __name__ == '__main__': password = getpass( Fore.BLUE + '%s@%s password:' % (ns.username, ns.provider) + Fore.RESET) run_command(ns.command, ns.provider, ns.username, password) + + +if __name__ == '__main__': + main() |