Skip to content

Commit 60c2ea4

Browse files
committed
Revert "Replace print statement with logger"
This reverts commit 853d481. It's best to leave print statements in the setup script. See also: mc2-project#179
1 parent 853d481 commit 60c2ea4

File tree

1 file changed

+10
-13
lines changed

1 file changed

+10
-13
lines changed

python-package/setup.py

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,11 @@
1-
import logging
21
import multiprocessing
32
import os
3+
import shutil
44
import subprocess
5+
import sys
56

67
from setuptools import find_packages, setup
78

8-
# # Configure logging
9-
logger = logging.getLogger()
10-
logger.setLevel("DEBUG")
11-
129
# Get the absolute path of setup.py
1310
setup_path = os.path.dirname(os.path.abspath(os.path.expanduser(__file__)))
1411

@@ -104,8 +101,8 @@
104101
# to the root directory of the mc2 repository for easier paths in
105102
# the configuration yamls.
106103

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")
109106

110107
home_path = os.path.abspath(os.path.join(setup_path, "../"))
111108
# Terminal shell initialization scripts to support
@@ -146,20 +143,20 @@ def set_path(path):
146143
shell_paths_set = [set_path(path) for path in shell_paths]
147144

148145
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")
150147
for path in shell_paths:
151-
logger.debug(f"\t{path}")
152-
logger.debug(
148+
print(f"\t{path}")
149+
print(
153150
"\nPlease add the following line to your shell initialization\n"
154151
"file to ensure that MC2 Client is configured automatically:\n\n"
155152
f"\texport MC2_CLIENT_HOME={home_path}"
156153
)
157154
else:
158-
logger.debug("Successfully modified:\n")
155+
print("Successfully modified:\n")
159156
for (success, path) in zip(shell_paths_set, shell_paths):
160157
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.")
163160

164161
env_path = os.path.join(home_path, "mc2_client_env")
165162
print(f"\nTo configure your current shell, run:\n\n\tsource {env_path}\n")

0 commit comments

Comments
 (0)