mirror of
https://github.com/certbot/certbot.git
synced 2026-06-07 07:42:08 -04:00
Create public shim around main and make that the entry point
This commit is contained in:
parent
7f951071dc
commit
14e6401efc
3 changed files with 22 additions and 2 deletions
20
certbot/certbot/main.py
Normal file
20
certbot/certbot/main.py
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
"""Certbot main public entry point."""
|
||||
import logging.handlers
|
||||
import sys
|
||||
|
||||
from certbot._internal import main as internal_main
|
||||
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
def main(*args, **kwargs):
|
||||
"""Shim around internal main function"""
|
||||
return internal_main.main(*args, **kwargs)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
err_string = main()
|
||||
if err_string:
|
||||
logger.warning("Exiting with message %s", err_string)
|
||||
sys.exit(err_string) # pragma: no cover
|
||||
|
|
@ -163,7 +163,7 @@ setup(
|
|||
|
||||
entry_points={
|
||||
'console_scripts': [
|
||||
'certbot = certbot._internal.main:main',
|
||||
'certbot = certbot.main:main',
|
||||
],
|
||||
'certbot.plugins': [
|
||||
'manual = certbot._internal.plugins.manual:Authenticator',
|
||||
|
|
|
|||
|
|
@ -147,7 +147,7 @@ files=run.bat
|
|||
renew-down.ps1
|
||||
|
||||
[Command certbot]
|
||||
entry_point=certbot._internal.main:main
|
||||
entry_point=certbot.main:main
|
||||
extra_preamble=pywin32_paths.py
|
||||
'''.format(certbot_version=certbot_version,
|
||||
installer_suffix='win_amd64' if PYTHON_BITNESS == 64 else 'win32',
|
||||
|
|
|
|||
Loading…
Reference in a new issue