Minor packaging cleanup.

- Use shortcut dist.version instead of going through metadata;
- Use %r throughout to display project names and paths.
diff --git a/Lib/packaging/install.py b/Lib/packaging/install.py
index 51e70df..b6816e5 100644
--- a/Lib/packaging/install.py
+++ b/Lib/packaging/install.py
@@ -85,7 +85,7 @@
     dist.parse_config_files()
     try:
         dist.run_command('install_dist')
-        name = dist.metadata['name']
+        name = dist.metadata['Name']
         return database.get_distribution(name) is not None
     except (IOError, os.error, PackagingError, CCompilerError) as msg:
         raise ValueError("Failed to install, " + str(msg))
@@ -118,10 +118,10 @@
     """
     path = os.path.abspath(path)
     if os.path.isdir(path):
-        logger.info('Installing from source directory: %s', path)
+        logger.info('Installing from source directory: %r', path)
         return _run_install_from_dir(path)
     elif _is_archive_file(path):
-        logger.info('Installing from archive: %s', path)
+        logger.info('Installing from archive: %r', path)
         _unpacked_dir = tempfile.mkdtemp()
         try:
             shutil.unpack_archive(path, _unpacked_dir)
@@ -129,7 +129,7 @@
         finally:
             shutil.rmtree(_unpacked_dir)
     else:
-        logger.warning('No projects to install.')
+        logger.warning('No project to install.')
         return False
 
 
@@ -191,7 +191,7 @@
 
             # reverting
             for installed_dist in installed_dists:
-                logger.info('Reverting %s', installed_dist)
+                logger.info('Reverting %r', installed_dist)
                 remove(installed_dist.name, paths)
             raise e
     return installed_dists
@@ -314,12 +314,12 @@
         if predicate.name.lower() != installed_project.name.lower():
             continue
         found = True
-        logger.info('Found %s %s', installed_project.name,
-                    installed_project.metadata['version'])
+        logger.info('Found %r %s', installed_project.name,
+                    installed_project.version)
 
         # if we already have something installed, check it matches the
         # requirements
-        if predicate.match(installed_project.metadata['version']):
+        if predicate.match(installed_project.version):
             return infos
         break
 
@@ -336,7 +336,7 @@
     try:
         release = index.get_release(requirements)
     except (ReleaseNotFound, ProjectNotFound):
-        raise InstallationException('Release not found: "%s"' % requirements)
+        raise InstallationException('Release not found: %r' % requirements)
 
     if release is None:
         logger.info('Could not find a matching project')
@@ -386,7 +386,7 @@
     """
     dist = get_distribution(project_name, use_egg_info=True, paths=paths)
     if dist is None:
-        raise PackagingError('Distribution "%s" not found' % project_name)
+        raise PackagingError('Distribution %r not found' % project_name)
     files = dist.list_installed_files(local=True)
     rmdirs = []
     rmfiles = []
@@ -423,7 +423,7 @@
 
     if not success:
         logger.info('%r cannot be removed.', project_name)
-        logger.info('Error: %s' % str(error))
+        logger.info('Error: %s', error)
         return False
 
     logger.info('Removing %r: ', project_name)
@@ -523,7 +523,7 @@
 
     except InstallationConflict as e:
         if logger.isEnabledFor(logging.INFO):
-            projects = ['%r %s' % (p.name, p.version) for p in e.args[0]]
+            projects = ('%r %s' % (p.name, p.version) for p in e.args[0])
             logger.info('%r conflicts with %s', project, ','.join(projects))
 
     return True