swc-installation-test: Consolidate and reorganize test scripts
swc-installation-test-2.py: sort CHECKS into topics
swc-installation-test-2.py: Add some editors and browsers

Based on a list of possibilities mentioned by Cait Pickens in an
internal email.
swc-installation-test-2.py: Add virtual-editor and virtual-browser

Often we don't care which editor is installed, so long as at least one
is installed.  This commit tweaks Dependency and adds a
VirtualDependency class to support such virtual dependencies.  You
can't get very fancy with boolean logic, but an all-and and all-or
lists will probably be sufficient for our needs.
swc-installation-test-2.py: Add exe_extension for MS Windows compat.

Use distutils' new_compiler() to get the appropriate exe_extension for
the user's system.  This way command names can always be specified in
their bare form, and we'll automatically add the right executable
extension for other platforms.
swc-installation-test-2.py: `PythonDependency`s should depend on Python
swc-installation-test-2.py: Cache check errors

Avoid running the same check (e.g. 'python') over and over.
swc-installation-test-2.py: Don't print duplicate exceptions

For example, if you have an outdated 'python', you only want to hear
about that once, not once for each PythonPackageDependency.
swc-installation-test-2.py: Print successfully-found versions

This makes it easy to see what a user has installed.
swc-installation-test-2.py: Don't chain exceptions (yet)

Exception chaining (PEP 3134, 'raise ... from') raises SyntaxErros in
Python 2.x.  Comment the chaining out until SWC starts teaching only
Python 3.x.
swc-installation-test-2.py: import print_function for Python 2.6

Otherwise `print()` actually prints `()`, where we want it to print a
blank line.
swc-installation-test-2.py: Don't parse missing versions
swc-installation-test-2.py: Add import_module for older Pythons

importlib is new in Python 2.7 / 3.1.  Add a minimal workaround for
earlier versions.
swc-installation-test-2.py: Refactor PythonPackageDependency._get_version

Split it into pieces for easier subclassing.
swc-installation-test-2.py: Fix 'mercurial' version extraction

The Mercurial Python package stores its version in strange places.
swc-installation-test-2.py: Fix version extraction for sqlite3-python

The 'sqlite3' package has the same version as the standard library.
We only check for it because sometimes (e.g. on Gentoo) Python may be
compiled without this package.
swc-installation-test-2.py: Don't require a specific Bash version

I have access to a machine running OS X 10.6.8, which has:

  $ bash --version
  GNU bash, version 3.2.48(1)-release (x86_64-apple-darwin10.0)
  Copyright (C) 2007 Free Software Foundation, Inc.

That means no associative arrays, but for SWC purposes, it should
still get the job done.  All we really need is POSIX.2.
swc-installation-test-2.py: Add a virtual-shell and non-Bash shells

Commit to POSIX.2 [1] compatibility by allowing additional shells.  If
anyone has something besides sh, bash, or dash installed, they
probably know how to use it ;).

[1]: http://pubs.opengroup.org/onlinepubs/009695399/utilities/xcu_chap02.html
     IEEE Std 1003.2-1992
swc-installation-test-2.py: Add EasyInstallDependency class

Distribute's easy_install supports --version (at least since 0.6.21),
but Setuptool's original version does not (at least as of 0.6c9).
Assume that if we get some kind of reasonable output from
`easy_install --version` we're dealing with the Setuptools version.
swc-installation-test-2.py: Only require Git >= 1.7 (not >= 1.8)

Xcode 4.0.2 for OS X 10.6.8 shipped with Git 1.7.3.4.