summaryrefslogtreecommitdiff
path: root/bonafide
diff options
context:
space:
mode:
Diffstat (limited to 'bonafide')
-rw-r--r--bonafide/setup.py5
-rwxr-xr-xbonafide/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 eef1541..828d82e 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 15a7a00..30cae6a 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()