-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcli.py
33 lines (23 loc) · 912 Bytes
/
cli.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
import os, argparse, subprocess
from print_tricks import pt
pt.easy_imports('pup_py')
from main import main # Assuming the main functionality is in a function called `main_function`
def main():
parser = argparse.ArgumentParser(description="Pip Universal Projects CLI")
parser.add_argument('--run', action='store_true', help='Run the packaging and upload process')
args = parser.parse_args()
if args.run:
main()
# def is_running_in_vscode():
# # Check for typical VS Code environment variables
# print(os.environ)
# return 'VSCODE_CWD' in os.environ or 'VSCODE_IPC_HOOK_CLI' in os.environ
# if __name__ == "__main__":
# if is_running_in_vscode():
# print("Running inside VS Code")
# subprocess.run(['python', '-m', 'pup_py.cli'])
# else:
# print("Running from the command line")
# main()
if __name__ == "__main__":
main()