diff options
author | Jason R. Coombs <jaraco@jaraco.com> | 2016-08-03 22:02:31 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-08-03 22:02:31 -0400 |
commit | 5129feb2a45c60a6050d8a27aaa8611fbb74e00a (patch) | |
tree | 19951d6cc618b554e97cc75db5ddc676fa5ffb67 | |
parent | 6a4e5446c941291ec5e7c56cee1d5a872300c955 (diff) | |
parent | 18c0fdab26ba13a9cf142408d7f1f2566be21fa7 (diff) | |
download | external_python_setuptools-5129feb2a45c60a6050d8a27aaa8611fbb74e00a.tar.gz external_python_setuptools-5129feb2a45c60a6050d8a27aaa8611fbb74e00a.tar.bz2 external_python_setuptools-5129feb2a45c60a6050d8a27aaa8611fbb74e00a.zip |
Merge pull request #717 from vallsv/fix-logging-arguments
Fix logging using arguments instead of formatter
-rw-r--r-- | setuptools/command/bdist_egg.py | 14 | ||||
-rwxr-xr-x | setuptools/package_index.py | 3 |
2 files changed, 8 insertions, 9 deletions
diff --git a/setuptools/command/bdist_egg.py b/setuptools/command/bdist_egg.py index 50744b87..cbea7537 100644 --- a/setuptools/command/bdist_egg.py +++ b/setuptools/command/bdist_egg.py @@ -129,7 +129,7 @@ class bdist_egg(Command): self.distribution.data_files.append(item) try: - log.info("installing package data to %s" % self.bdist_dir) + log.info("installing package data to %s", self.bdist_dir) self.call_command('install_data', force=0, root=None) finally: self.distribution.data_files = old @@ -152,7 +152,7 @@ class bdist_egg(Command): self.run_command("egg_info") # We run install_lib before install_data, because some data hacks # pull their data path from the install_lib command. - log.info("installing library code to %s" % self.bdist_dir) + log.info("installing library code to %s", self.bdist_dir) instcmd = self.get_finalized_command('install') old_root = instcmd.root instcmd.root = None @@ -169,7 +169,7 @@ class bdist_egg(Command): pyfile = os.path.join(self.bdist_dir, strip_module(filename) + '.py') self.stubs.append(pyfile) - log.info("creating stub loader for %s" % ext_name) + log.info("creating stub loader for %s", ext_name) if not self.dry_run: write_stub(os.path.basename(ext_name), pyfile) to_compile.append(pyfile) @@ -186,14 +186,14 @@ class bdist_egg(Command): self.mkpath(egg_info) if self.distribution.scripts: script_dir = os.path.join(egg_info, 'scripts') - log.info("installing scripts to %s" % script_dir) + log.info("installing scripts to %s", script_dir) self.call_command('install_scripts', install_dir=script_dir, no_ep=1) self.copy_metadata_to(egg_info) native_libs = os.path.join(egg_info, "native_libs.txt") if all_outputs: - log.info("writing %s" % native_libs) + log.info("writing %s", native_libs) if not self.dry_run: ensure_directory(native_libs) libs_file = open(native_libs, 'wt') @@ -201,7 +201,7 @@ class bdist_egg(Command): libs_file.write('\n') libs_file.close() elif os.path.isfile(native_libs): - log.info("removing %s" % native_libs) + log.info("removing %s", native_libs) if not self.dry_run: os.unlink(native_libs) @@ -458,7 +458,7 @@ def make_zipfile(zip_filename, base_dir, verbose=0, dry_run=0, compress=True, p = path[len(base_dir) + 1:] if not dry_run: z.write(path, p) - log.debug("adding '%s'" % p) + log.debug("adding '%s'", p) compression = zipfile.ZIP_DEFLATED if compress else zipfile.ZIP_STORED if not dry_run: diff --git a/setuptools/package_index.py b/setuptools/package_index.py index 8d965f49..9ef782cb 100755 --- a/setuptools/package_index.py +++ b/setuptools/package_index.py @@ -1038,8 +1038,7 @@ def open_with_auth(url, opener=urllib.request.urlopen): cred = PyPIConfig().find_credential(url) if cred: auth = str(cred) - info = cred.username, url - log.info('Authenticating as %s for %s (from .pypirc)' % info) + log.info('Authenticating as %s for %s (from .pypirc)', cred.username, url) if auth: auth = "Basic " + _encode_auth(auth) |