swc-installation-test-2.py: Isolate system-info indent in _print_info

This way shifting the indents if you add a longer key is a single-line
operation.
swc-installation-test-2.py: Use the more portable platform.uname()

From the docs [1,2]:

  platform.uname():
    Fairly portable uname interface...  Entries which cannot be
    determined are set to ''.

  os.uname():
    ... Availability: recent flavors of Unix.

[1]: http://docs.python.org/2/library/platform.html#platform.uname
[2]: http://docs.python.org/2/library/os.html#os.uname
swc-installation-test-2.py: Add OS-version detection

Using assorted functions from the `platform` module.  On my Linux box:

  $ python2.7
  Python 2.7.3 (default, Dec  5 2012, 10:56:01)
  [GCC 4.5.4] on linux2
  Type "help", "copyright", "credits" or "license" for more information.
  >>> import platform
  >>> platform.linux_distribution()
  ('Gentoo Base System', '2.1', '')
  >>> platform.mac_ver()
  ('', ('', '', ''), '')
  >>> platform.win32_ver()
  ('', '', '', '')

On an OS X box:

  $ python2.6
  Python 2.6.1 (r261:67515, Aug  2 2010, 20:10:18)
  [GCC 4.2.1 (Apple Inc. build 5646)] on darwin
  Type "help", "copyright", "credits" or "license" for more information.
  >>> import platform
  >>> platform.linux_distribution()
  ('', '', '')
  >>> platform.mac_ver()
  ('10.6.8', ('', '', ''), 'i386')
  >>> platform.win32_ver()
  ('', '', '', '')

I don't have access to an MS Windows box, but presumably it returns
something like:

  >>> platform.linux_distribution()
  ('', '', '')
  >>> platform.mac_ver()
  ('', ('', '', ''), '')
  >>> platform.win32_ver()
  ('XP', '5.1.2600', 'SP2', 'Multiprocessor Free')

We only want to print the one that applies (e.g. don't print a
'linux_distribution' entry on OS X), so we skip entries where value[0]
is an empty string.
swc-installation-test-2.py: Convert .version_option to .version_options

I'm about to implement a version check for 'make' where a single
option doesn't cut it.  For version of Python before 3.3,
shlex.quote() doesn't exist [1], so use pipes.quote() instead [2].

[1]: http://docs.python.org/3/library/shlex.html#shlex.quote
[2]: http://bugs.python.org/issue9723
swc-installation-test-2.py: Add CommandDependency.stdin

I'm about to implement a version check for 'make' where I want to pass
a test Makefile in via stdin.
swc-installation-test-2.py: Add MakeDependency class

On the fairly ancient SunOS 5.10 (January 2005), `make` doesn't
support `--version`.  Looking into the POSIX.2 specs [1], it doesn't
have to.  On FreeBSD [2] and in GNU Make [3], there is a MAKE_VERSION
variable, and the Sun executable has something similar:

  $ strings make | grep MAKE_VERSION
  .MAKE_VERSION

but it just expands to an empty string.

Since reading a makefile from stdin *is* in POSIX [1], we can use that
to test `make` if `make --version` fails.  If we get something for
MAKE_VERSION, use that.  If we get something for MAKE (required by
POSIX [2]), then call that a valid, but unkown, version.

[1]: http://pubs.opengroup.org/onlinepubs/009695399/utilities/make.html#tag_04_84_04
[2]: http://lists.freebsd.org/pipermail/freebsd-questions/2010-October/222214.html
[3]: http://www.gnu.org/software/make/manual/html_node/Features.html#index-MAKE_005fVERSION-1021
[4]: http://pubs.opengroup.org/onlinepubs/009695399/utilities/make.html#tag_04_84_13_08
swc-installation-test-2.py: Document command line arguments
swc-installation-test-2.py: Better error message for unknown checks
swc-installation-test: Return 1 on failure

I doubt anyone will check the exit status for these scripts, but it's
still good to follow conventions.
swc-installation-test-2.py: Add 'virtual-pypi-installer' and 'pip'

Students who need a Python Package Index (PyPI) installer should be
fine with either easy_install or pip [1].

[1]: http://pypi.python.org/pypi/pip
     http://www.pip-installer.org/
swc-installation-test-2.py: Comment out 'mercurial' dependency

There can be trouble detecting the Python package, especially on MS
Windows where the installed version of Python used to run the script
may not know about installed version of Mercurial.  Because nobody is
likely to use Mercurial's Python interface in a SWC class (they'll
probably stick to the command line interface), comment out this
dependency.
setup: Move installation test scripts under setup/

There will be a lot of other stuff in the boot camp repository.  Stay
organized by keeping "how to set up and test your machine" stuff in a
subdirectory.
setup/README.md: Install-testing script care and feeding
swc-installation-test-2.py: Add ipython (script) >= 0.13

And make sure the IPython package has the same minimum version.
IPython 0.12 can't display more recent notebooks.
swc-installation-test-2.py: Handle unparsable versions gracefully

This avoids raising NotImplementedError from my IPython 0.14.dev.  We
don't want to have to start ranking alpha, beta, dev, r6, etc., so
just print the unparsable version and minimum version, and leave it to
the student to decide if their version satisfies the condition.  It's
unlikely that students have such pre-/post-release software installed
anyway.
swc-installation-test-2.py: Add Pandas (pandas) >= 0.8

It's being used in 2013-01-columbia.
swc-installation-test-2.py: Add gedit to virtual-editor

For Gnome users.
swc-installation-test-2.py: Add and_dependencies to Python package setup

Not used by any packages yet, but I'm about to use it for IPython.
swc-installation-test-2.py: Print full DependencyError chain

If a requirement is not satisfied due to an and_dependency or
or_dependency failure, raise a new DependencyError and attach the
original error as its cause (this would be easier if we didn't have to
preserve Python 2.x support).  This way we can print the whole chain
(e.g. virtual-shell failed because sh is not installed), instead of
just the lowest level error.

Also indent the messages, because:

  check for virtual-editor failed:
    or-dependency not satisfied for virtual-editor
    For instructions on installing an up-to-date version, see
    http://software-carpentry.org/setup/
    cause:
    check for Notepad++ (notepad++) failed:
      could not find 'notepad++' executable
      For instructions on installing an up-to-date version, see
      http://software-carpentry.org/setup/

is more readable than:

  check for virtual-editor failed:
  or-dependency not satisfied for virtual-editor
  For instructions on installing an up-to-date version, see
  http://software-carpentry.org/setup/
  cause:
  check for Notepad++ (notepad++) failed:
  could not find 'notepad++' executable
  For instructions on installing an up-to-date version, see
  http://software-carpentry.org/setup/
swc-installation-test-2.py: Add IPython notebook dependencies

You can get a successful IPython import even if you haven't installed
the dependencies you need for viewing notebooks.  This adds explicit
dependencies based on the current listings in IPython's setup.py.