Package checks are now case-insensitive.
Merge pull request #47 from dean/package-case-insensitive

Package checks are now case-insensitive.
Allow comments in hash lines.

Fixes #52
Allow non-hash comment lines in hash blocks.
Spaces aren't needed after a comment.
Tweak comment parsing. Bump version to 1.4.

* Allow # within hashes. (After the first occurrence of whitespace, you are no longer within a hash. Think of peep hash lines as a language that supports bare words as an equivalent to Python's quoted strings: quoted strings can contain #.)
* Require a space after the colon that follows the hash type, and require one between the # and the hash type. We did before, and I don't see a reason to loosen this up atm, since we can never re-tighten it.
* Don't bother explicitly stripping the space before a comment, since we don't do anything with comments anyway.
* Count comment lines that start with whitespace as contiguous peep comment lines for the purpose of hashes_above(). (pip allows comment lines to have leading space.)
Merge support for partial-line comments on hash lines. Close #52 and #54.
Add the beginnings of a test suite.

So far, it tests only hashes_of_requirements() (and thus also requirements_path_and_line()).
Add note about upgrading wheels

Fixes #50
Merge note about upgrading wheels. Close #55.
Polish readme a bit.

The division of the multiple-hashes section into 3 dependent subsections was confusing.
Add Travis config file.
Add Travis badge to readme.
Drastically refactor for readability.

peep_install() had grown far too much local state, and even I couldn't figure out what was going on anymore. By turning all the data structures inside out and encapsulating everything within each requirement (rather than having a bunch of hashes and sets off to the side), we reduce the number of locals in peep_install(), reduce the number of `for` loops down to one (rather than repeating them in each utility function), and surface the patterns that have emerged, such as various kinds of failure printing a header, a series of errors, and a footer.

* Temporarily break tests.
* Bump version to 2.0, both for the significance of the code change and for the upcoming backward-incompatible changes.
* Temporarily (or forever?) ignore command-line args during package downloading.
* Catch a conceivable race condition in which additional files get added to the temp dir. Probably wouldn't happen since it's not linked anywhere, but hey, it's security software.
Copy and paste in prepare_files() from pip, and annotate it a bit.
Give each requirement its own temp dir.

This closes a potential security hole in which 2 requirements have the same filename, one matches its hash and the other doesn't, but the non-matching one got created later and thus gets installed. This was not an issue in pre-2.0 versions of peep in which all files were downloaded, and then all hashes were checked.
Committing before replacing requests-based code with urllib2.

requests wasn't introduced until pip 1.5, and we obviously need to work with older pips. I'd rather have 1 code path than different behaviors with different pips.

peep runs without crashing on satisfied requirements. It doesn't get through installable ones yet.

* Remove kwarg calling convention from pip.main(); in some versions, it's not a kwarg.
* Pare down _downloaded_filename() to about the bare minimum.
* Teach peep how to call into just the pip parts that find the URL to download. Everything else download-related we'll do ourselves.
Reimplement downloading based only on urllib2, since requests is in pip's vendor lib only in 1.5 and later.

* Remove support for HTTP proxies and basic auth. If anybody needs them, they can submit a patch.
* Make errors presentable.
* Stop buffering output for now. The out-of-orderness problems seem to have gone away now that I don't call pip's noisy download routines anymore.
"deepcopy" pip's arg parser so it doesn't wreck itself the first time we call it.

This fixes the bug wherein pip would (unsafely) redownload a package even though peep had already done so.
Delete obsolete comments, and make a few tweaks for clarity.

This covers mythmon's feedback.