def entry_point():
    """ An entry point for setuptools. This is required because
        `if __name__ == '__main__'` is not fired when the entry point
        is 'main()'. This just wraps the old behavior in a function so
        it can be called from setuptools.
    """
    try:
        mainret = main()
    except (EOFError, KeyboardInterrupt):
        print_err('\nUser cancelled.\n')
        mainret = 2
    except BrokenPipeError:
        print_err('\nBroken pipe, input/output was interrupted.\n')
        mainret = 3
    except InvalidArg as exarg:
        handle_err(exarg.as_colr())
        mainret = 4
    except ValueError as exnum:
        handle_err(exnum)
        mainret = 4

    sys.exit(mainret)
An entry point for setuptools. This is required because
        `if __name__ == '__main__'` is not fired when the entry point
        is 'main()'. This just wraps the old behavior in a function so
        it can be called from setuptools.