|
1 |
| -import logging |
2 | 1 | import multiprocessing
|
3 | 2 | import os
|
| 3 | +import shutil |
4 | 4 | import subprocess
|
| 5 | +import sys |
5 | 6 |
|
6 | 7 | from setuptools import find_packages, setup
|
7 | 8 |
|
8 |
| -# # Configure logging |
9 |
| -logger = logging.getLogger() |
10 |
| -logger.setLevel("DEBUG") |
11 |
| - |
12 | 9 | # Get the absolute path of setup.py
|
13 | 10 | setup_path = os.path.dirname(os.path.abspath(os.path.expanduser(__file__)))
|
14 | 11 |
|
|
104 | 101 | # to the root directory of the mc2 repository for easier paths in
|
105 | 102 | # the configuration yamls.
|
106 | 103 |
|
107 |
| -logger.debug("\n{:#^20}\n".format('')) |
108 |
| -logger.debug("Configuring shell for MC2 Client...\n") |
| 104 | +print("\n####################\n") |
| 105 | +print("Configuring shell for MC2 Client...\n") |
109 | 106 |
|
110 | 107 | home_path = os.path.abspath(os.path.join(setup_path, "../"))
|
111 | 108 | # Terminal shell initialization scripts to support
|
@@ -146,20 +143,20 @@ def set_path(path):
|
146 | 143 | shell_paths_set = [set_path(path) for path in shell_paths]
|
147 | 144 |
|
148 | 145 | if not any(shell_paths_set):
|
149 |
| - logger.debug("ERROR: Failed to write to any of the following:\n") |
| 146 | + print("ERROR: Failed to write to any of the following:\n") |
150 | 147 | for path in shell_paths:
|
151 |
| - logger.debug(f"\t{path}") |
152 |
| - logger.debug( |
| 148 | + print(f"\t{path}") |
| 149 | + print( |
153 | 150 | "\nPlease add the following line to your shell initialization\n"
|
154 | 151 | "file to ensure that MC2 Client is configured automatically:\n\n"
|
155 | 152 | f"\texport MC2_CLIENT_HOME={home_path}"
|
156 | 153 | )
|
157 | 154 | else:
|
158 |
| - logger.debug("Successfully modified:\n") |
| 155 | + print("Successfully modified:\n") |
159 | 156 | for (success, path) in zip(shell_paths_set, shell_paths):
|
160 | 157 | if success:
|
161 |
| - logger.debug(f"\t{path}") |
162 |
| - logger.debug("\nTo run MC2 Client you may need to restart your current shell.") |
| 158 | + print(f"\t{path}") |
| 159 | + print("\nTo run MC2 Client you may need to restart your current shell.") |
163 | 160 |
|
164 | 161 | env_path = os.path.join(home_path, "mc2_client_env")
|
165 | 162 | print(f"\nTo configure your current shell, run:\n\n\tsource {env_path}\n")
|
0 commit comments