Added new starting point for cpt.py.

Added new main block because this was mentioned in the meta issue
list (#406 in cling) as one of the rewrite steps. This also allows for
the main code to be run as opposed to running the main code plus the
function defintions.
This commit is contained in:
saisoma123 2022-06-09 16:56:46 -04:00 committed by jenkins
parent 1fee0d4b10
commit 3bd9d02ab1

View File

@ -1835,7 +1835,8 @@ def custom_input(prompt, always_yes=False):
# Global variables #
###############################################################################
workdir = os.path.abspath(os.path.expanduser(args['with_workdir']))
if __name__ == "__main__":
workdir = os.path.abspath(os.path.expanduser(args['with_workdir']))
srcdir = os.path.join(workdir, 'cling-src')
CLING_SRC_DIR = os.path.join(srcdir, 'tools', 'cling')
CPT_SRC_DIR = os.path.join(CLING_SRC_DIR, 'tools', 'packaging')