diff --git a/get_trust_anchor.py b/get_trust_anchor/__main__.py similarity index 99% rename from get_trust_anchor.py rename to get_trust_anchor/__main__.py index 42bd041..369ce54 100644 --- a/get_trust_anchor.py +++ b/get_trust_anchor/__main__.py @@ -474,4 +474,4 @@ def main(): print("Could not delete {}: '{}'. Continuing".format(this_file, this_exception)) if __name__ == "__main__": - main() + sys.exit(main()) diff --git a/setup.py b/setup.py index 491c832..7900037 100644 --- a/setup.py +++ b/setup.py @@ -12,7 +12,10 @@ 'Programming Language :: Python :: 3' ], url='https://github.com/iana-org/get_trust_anchor/', - scripts=[ - 'get_trust_anchor.py' - ] + packages=['get_trust_anchor'], + entry_points={ + 'console_scripts': [ + 'get-trust-anchor = get_trust_anchor.__main__:main' + ] + } )