[Python-checkins] distutils2: Fixing logging strings; improve lower-case consistency
tarek.ziade
python-checkins at python.org
Wed Feb 16 22:23:56 CET 2011
tarek.ziade pushed 39e2a0b88acf to distutils2:
http://hg.python.org/distutils2/rev/39e2a0b88acf
changeset: 1012:39e2a0b88acf
user: Kelsey Hightower <kelsey.hightower at gmail.com>
date: Wed Feb 09 18:57:42 2011 -0500
summary:
Fixing logging strings; improve lower-case consistency
files:
distutils2/_backport/shutil.py
distutils2/command/bdist_dumb.py
distutils2/command/bdist_wininst.py
distutils2/command/clean.py
distutils2/command/register.py
distutils2/command/sdist.py
distutils2/compiler/bcppcompiler.py
distutils2/compiler/msvc9compiler.py
distutils2/compiler/msvccompiler.py
distutils2/compiler/unixccompiler.py
distutils2/index/simple.py
distutils2/install.py
diff --git a/distutils2/_backport/shutil.py b/distutils2/_backport/shutil.py
--- a/distutils2/_backport/shutil.py
+++ b/distutils2/_backport/shutil.py
@@ -408,7 +408,7 @@
from distutils2._backport import tarfile
if logger is not None:
- logger.info('Creating tar archive')
+ logger.info('creating tar archive')
uid = _get_uid(owner)
gid = _get_gid(group)
diff --git a/distutils2/command/bdist_dumb.py b/distutils2/command/bdist_dumb.py
--- a/distutils2/command/bdist_dumb.py
+++ b/distutils2/command/bdist_dumb.py
@@ -129,7 +129,7 @@
if not self.keep_temp:
if self.dry_run:
- logger.info('Removing %s' % self.bdist_dir)
+ logger.info('removing %s' % self.bdist_dir)
else:
rmtree(self.bdist_dir)
diff --git a/distutils2/command/bdist_wininst.py b/distutils2/command/bdist_wininst.py
--- a/distutils2/command/bdist_wininst.py
+++ b/distutils2/command/bdist_wininst.py
@@ -192,7 +192,7 @@
if not self.keep_temp:
if self.dry_run:
- logger.info('Removing %s' % self.bdist_dir)
+ logger.info('removing %s' % self.bdist_dir)
else:
rmtree(self.bdist_dir)
diff --git a/distutils2/command/clean.py b/distutils2/command/clean.py
--- a/distutils2/command/clean.py
+++ b/distutils2/command/clean.py
@@ -48,7 +48,7 @@
# gone)
if os.path.exists(self.build_temp):
if self.dry_run:
- logger.info('Removing %s' % self.build_temp)
+ logger.info('removing %s' % self.build_temp)
else:
rmtree(self.build_temp)
else:
@@ -62,7 +62,7 @@
self.build_scripts):
if os.path.exists(directory):
if self.dry_run:
- logger.info('Removing %s' % directory)
+ logger.info('removing %s' % directory)
else:
rmtree(directory)
else:
diff --git a/distutils2/command/register.py b/distutils2/command/register.py
--- a/distutils2/command/register.py
+++ b/distutils2/command/register.py
@@ -92,7 +92,7 @@
'''
# send the info to the server and report the result
code, result = self.post_to_server(self.build_post_data('verify'))
- logger.info('Server response (%s): %s' % (code, result))
+ logger.info('server response (%s): %s' % (code, result))
def send_metadata(self):
@@ -206,10 +206,10 @@
data['email'] = raw_input(' EMail: ')
code, result = self.post_to_server(data)
if code != 200:
- logger.info('Server response (%s): %s' % (code, result))
+ logger.info('server response (%s): %s' % (code, result))
else:
- logger.info('You will receive an email shortly.')
- logger.info(('Follow the instructions in it to '
+ logger.info('you will receive an email shortly.')
+ logger.info(('follow the instructions in it to '
'complete registration.'))
elif choice == '3':
data = {':action': 'password_reset'}
@@ -217,7 +217,7 @@
while not data['email']:
data['email'] = raw_input('Your email address: ')
code, result = self.post_to_server(data)
- logger.info('Server response (%s): %s' % (code, result))
+ logger.info('server response (%s): %s' % (code, result))
def build_post_data(self, action):
# figure the data to send - the metadata plus some additional
diff --git a/distutils2/command/sdist.py b/distutils2/command/sdist.py
--- a/distutils2/command/sdist.py
+++ b/distutils2/command/sdist.py
@@ -336,7 +336,7 @@
if not self.keep_temp:
if self.dry_run:
- logger.info('Removing %s' % base_dir)
+ logger.info('removing %s' % base_dir)
else:
rmtree(base_dir)
diff --git a/distutils2/compiler/bcppcompiler.py b/distutils2/compiler/bcppcompiler.py
--- a/distutils2/compiler/bcppcompiler.py
+++ b/distutils2/compiler/bcppcompiler.py
@@ -191,7 +191,7 @@
self._fix_lib_args (libraries, library_dirs, runtime_library_dirs)
if runtime_library_dirs:
- logger.warning(("I don't know what to do with "
+ logger.warning(("don't know what to do with "
"'runtime_library_dirs': %s"),
str(runtime_library_dirs))
diff --git a/distutils2/compiler/msvc9compiler.py b/distutils2/compiler/msvc9compiler.py
--- a/distutils2/compiler/msvc9compiler.py
+++ b/distutils2/compiler/msvc9compiler.py
@@ -215,7 +215,7 @@
productdir = Reg.get_value(r"%s\Setup\VC" % vsbase,
"productdir")
except KeyError:
- logger.debug("Unable to find productdir in registry")
+ logger.debug("unable to find productdir in registry")
productdir = None
if not productdir or not os.path.isdir(productdir):
@@ -229,14 +229,14 @@
logger.debug("%s is not a valid directory" % productdir)
return None
else:
- logger.debug("Env var %s is not set or invalid" % toolskey)
+ logger.debug("env var %s is not set or invalid" % toolskey)
if not productdir:
- logger.debug("No productdir found")
+ logger.debug("no productdir found")
return None
vcvarsall = os.path.join(productdir, "vcvarsall.bat")
if os.path.isfile(vcvarsall):
return vcvarsall
- logger.debug("Unable to find vcvarsall.bat")
+ logger.debug("unable to find vcvarsall.bat")
return None
def query_vcvarsall(version, arch="x86"):
@@ -248,7 +248,7 @@
if vcvarsall is None:
raise DistutilsPlatformError("Unable to find vcvarsall.bat")
- logger.debug("Calling 'vcvarsall.bat %s' (version=%s)", arch, version)
+ logger.debug("calling 'vcvarsall.bat %s' (version=%s)", arch, version)
popen = subprocess.Popen('"%s" %s & set' % (vcvarsall, arch),
stdout=subprocess.PIPE,
stderr=subprocess.PIPE)
diff --git a/distutils2/compiler/msvccompiler.py b/distutils2/compiler/msvccompiler.py
--- a/distutils2/compiler/msvccompiler.py
+++ b/distutils2/compiler/msvccompiler.py
@@ -44,9 +44,9 @@
RegError = win32api.error
except ImportError:
- logger.info("Warning: Can't read registry to find the "
+ logger.info("warning: can't read registry to find the "
"necessary compiler setting\n"
- "Make sure that Python modules _winreg, "
+ "make sure that Python modules _winreg, "
"win32api or win32con are installed.")
pass
@@ -653,7 +653,7 @@
if get_build_version() >= 8.0:
- logger.debug("Importing new compiler from distutils.msvc9compiler")
+ logger.debug("importing new compiler from distutils.msvc9compiler")
OldMSVCCompiler = MSVCCompiler
from distutils2.compiler.msvc9compiler import MSVCCompiler
# get_build_architecture not really relevant now we support cross-compile
diff --git a/distutils2/compiler/unixccompiler.py b/distutils2/compiler/unixccompiler.py
--- a/distutils2/compiler/unixccompiler.py
+++ b/distutils2/compiler/unixccompiler.py
@@ -98,9 +98,9 @@
sysroot = compiler_so[idx+1]
if sysroot and not os.path.isdir(sysroot):
- logger.warning("Compiling with an SDK that doesn't seem to exist: %s",
+ logger.warning("compiling with an SDK that doesn't seem to exist: %s",
sysroot)
- logger.warning("Please check your Xcode installation")
+ logger.warning("please check your Xcode installation")
return compiler_so
diff --git a/distutils2/index/simple.py b/distutils2/index/simple.py
--- a/distutils2/index/simple.py
+++ b/distutils2/index/simple.py
@@ -168,7 +168,7 @@
if predicate.name.lower() in self._projects and not force_update:
return self._projects.get(predicate.name.lower())
prefer_final = self._get_prefer_final(prefer_final)
- logger.info('Reading info on PyPI about %s' % predicate.name)
+ logger.info('reading info on PyPI about %s' % predicate.name)
self._process_index_page(predicate.name)
if predicate.name.lower() not in self._projects:
diff --git a/distutils2/install.py b/distutils2/install.py
--- a/distutils2/install.py
+++ b/distutils2/install.py
@@ -134,12 +134,12 @@
installed_dists, installed_files = [], []
for dist in dists:
- logger.info('Installing %s %s' % (dist.name, dist.version))
+ logger.info('installing %s %s' % (dist.name, dist.version))
try:
installed_files.extend(_install_dist(dist, path))
installed_dists.append(dist)
except Exception, e:
- logger.info('Failed. %s' % str(e))
+ logger.info('failed. %s' % str(e))
# reverting
for installed_dist in installed_dists:
@@ -243,7 +243,7 @@
conflict.
"""
if not installed:
- logger.info('Reading installed distributions')
+ logger.info('reading installed distributions')
installed = get_distributions(use_egg_info=True)
infos = {'install': [], 'remove': [], 'conflict': []}
@@ -258,7 +258,7 @@
if predicate.name.lower() != installed_project.name.lower():
continue
found = True
- logger.info('Found %s %s' % (installed_project.name,
+ logger.info('found %s %s' % (installed_project.name,
installed_project.version))
# if we already have something installed, check it matches the
@@ -268,7 +268,7 @@
break
if not found:
- logger.info('Project not installed.')
+ logger.info('project not installed.')
if not index:
index = wrapper.ClientWrapper()
@@ -283,7 +283,7 @@
release = releases.get_last(requirements, prefer_final=prefer_final)
if release is None:
- logger.info('Could not find a matching project')
+ logger.info('could not find a matching project')
return infos
# this works for Metadata 1.2
@@ -358,7 +358,7 @@
finally:
shutil.rmtree(tmp)
- logger.info('Removing %r...' % project_name)
+ logger.info('removing %r...' % project_name)
file_count = 0
for file_ in rmfiles:
@@ -391,20 +391,20 @@
if os.path.exists(dist.path):
shutil.rmtree(dist.path)
- logger.info('Success ! Removed %d files and %d dirs' % \
+ logger.info('success ! removed %d files and %d dirs' % \
(file_count, dir_count))
def install(project):
- logger.info('Getting information about "%s".' % project)
+ logger.info('getting information about "%s".' % project)
try:
info = get_infos(project)
except InstallationException:
- logger.info('Cound not find "%s".' % project)
+ logger.info('could not find "%s".' % project)
return
if info['install'] == []:
- logger.info('Nothing to install.')
+ logger.info('nothing to install.')
return
install_path = get_config_var('base')
--
Repository URL: http://hg.python.org/distutils2
More information about the Python-checkins
mailing list