Skip to content

Commit

Permalink
Added new starting point for cpt.py.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
saisoma123 authored and jenkins committed Jun 28, 2022
1 parent 1fee0d4 commit 3bd9d02
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tools/packaging/cpt.py
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down

0 comments on commit 3bd9d02

Please sign in to comment.