summaryrefslogtreecommitdiffstats
path: root/Lib/packaging/util.py
diff options
context:
space:
mode:
authorTarek Ziade <tarek@ziade.org>2011-05-30 10:07:49 (GMT)
committerTarek Ziade <tarek@ziade.org>2011-05-30 10:07:49 (GMT)
commitb1b6e1384cf180657e8301643a4563077183a9e4 (patch)
tree9ba33451b79908d89a8207b1d7b3fa2d3bb59a03 /Lib/packaging/util.py
parent43f289ad8882a743d03b92a430f7ab7616e96673 (diff)
downloadcpython-b1b6e1384cf180657e8301643a4563077183a9e4.zip
cpython-b1b6e1384cf180657e8301643a4563077183a9e4.tar.gz
cpython-b1b6e1384cf180657e8301643a4563077183a9e4.tar.bz2
Cleaned up the installer output behavior.
This change also makes sure the logger handlers are not alterated after an installation. That also fixes the remaining environment alteration issue in test_packaging.
Diffstat (limited to 'Lib/packaging/util.py')
-rw-r--r--Lib/packaging/util.py19
1 files changed, 10 insertions, 9 deletions
diff --git a/Lib/packaging/util.py b/Lib/packaging/util.py
index 15da9e6..e839320 100644
--- a/Lib/packaging/util.py
+++ b/Lib/packaging/util.py
@@ -1224,9 +1224,9 @@ def _has_egg_info(srcdir):
for item in os.listdir(srcdir):
full_path = os.path.join(srcdir, item)
if item.endswith('.egg-info') and os.path.isdir(full_path):
- logger.info("found egg-info directory")
+ logger.debug("Found egg-info directory.")
return True
- logger.warning("no egg-info directory found")
+ logger.debug("No egg-info directory found.")
return False
@@ -1243,9 +1243,9 @@ def _has_text(setup_py, installer):
with open(setup_py, 'r', encoding='utf-8') as setup:
for line in setup:
if re.search(installer_pattern, line):
- logger.info("found %s text in setup.py", installer)
+ logger.debug("Found %s text in setup.py.", installer)
return True
- logger.warning("no %s text found in setup.py", installer)
+ logger.debug("No %s text found in setup.py.", installer)
return False
@@ -1261,15 +1261,16 @@ def _has_pkg_info(srcdir):
pkg_info = os.path.join(srcdir, 'PKG-INFO')
has_pkg_info = os.path.isfile(pkg_info)
if has_pkg_info:
- logger.info("PKG-INFO file found")
- logger.warning("no PKG-INFO file found")
+ logger.debug("PKG-INFO file found.")
+ else:
+ logger.debug("No PKG-INFO file found.")
return has_pkg_info
def _has_setup_py(srcdir):
setup_py = os.path.join(srcdir, 'setup.py')
if os.path.isfile(setup_py):
- logger.info('setup.py file found')
+ logger.debug('setup.py file found.')
return True
return False
@@ -1277,9 +1278,9 @@ def _has_setup_py(srcdir):
def _has_setup_cfg(srcdir):
setup_cfg = os.path.join(srcdir, 'setup.cfg')
if os.path.isfile(setup_cfg):
- logger.info('setup.cfg file found')
+ logger.debug('setup.cfg file found.')
return True
- logger.warning("no setup.cfg file found")
+ logger.debug("No setup.cfg file found.")
return False