Work around failing test due to distutils.version issue

In py3k the following fails, handle this and use string comparison in worst
case.

Tested on 2.6 and 3.2

>> from distutils.version import LooseVersion as LV
>>> v1, v2, v3 = (LV('1.1'), LV('1.1.2'), LV('1.1a1'))
>>> v1 > v2
False
>>> v1 > v3
False
>>> v2 > v3
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "distutils/version.py", line 70, in __gt__
    c = self._cmp(other)
  File "distutils/version.py", line 343, in _cmp
    if self.version < other.version:
TypeError: unorderable types: int() < str()
Fix launchpad urls

Fixes issue #36 by supporting launchpad urls.

Functionally tested

python pip/runner.py install -e bzr+lp:ijson#egg=ijson
Obtaining ijson from bzr+lp:ijson#egg=ijson
  Checking out lp:ijson to ./src/ijson
You have not informed bzr of your Launchpad ID, and you must do this to
write to Launchpad or access private data.  See "bzr help launchpad-login".
  Running setup.py egg_info for package ijson
Installing collected packages: ijson
  Running setup.py develop for ijson
    install_dir /Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/
    Creating /Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/ijson.egg-link (link to .)
    Adding ijson 0.8.0 to easy-install.pth file
    error: /Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/easy-install.pth: Permission denied
    Complete output from command /Library/Frameworks/Python.framework/Versions/2.6/Resources/Python.app/Contents/MacOS/Python -c "import setuptools; __file__='/Users/pnasrat/Development/pip/src/ijson/setup.py'; exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" develop --no-deps:
    running develop

install_dir /Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/
running egg_info
writing ijson.egg-info/PKG-INFO
writing top-level names to ijson.egg-info/top_level.txt
writing dependency_links to ijson.egg-info/dependency_links.txt
warning: manifest_maker: standard file '-c' not found
reading manifest file 'ijson.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'ijson.egg-info/SOURCES.txt'
running build_ext

Creating /Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/ijson.egg-link (link to .)
Adding ijson 0.8.0 to easy-install.pth file
Add unit tests for bazaar URL handling

Tested on 2.4.4, 2.7.1 and 3.2

nosetests tests.test_vcs_bazaar passes in each, full setup.py test gives:

2.4:

----------------------------------------------------------------------
Ran 107 tests in 167.345s

OK

2.7 fails 1 on Test freezing a mercurial clone

Script result: python setup.py develop
-- stderr: --------------------
warning: no files found matching '*.html' under directory 'docs'
warning: no previously-included files matching '*.txt' found under directory 'docs/build'
no previously-included directories found matching 'docs/build/html/_sources'

3.2

I got a bunch of failures, mostly environments (bzr, hg) and fragility I think.

----------------------------------------------------------------------
Ran 107 tests in 289.871s

FAILED (failures=5, errors=6, skipped=2)
Update requirements format documentation

Ensure new feature documented.
Merge branch 'release/1.0.1' into develop
Clean up doc to (hopefully) make it easier to understand
Merge pull request #277 from pdubroy/develop.

Clean up doc to (hopefully) make it easier to understand
Fixed setup.py long-description to account for sphinx index.html changes.
Added link to virtualenv.
Use absolute path to docs dir. Fixes issue #279.
Merge branch 'launchpad' of https://github.com/pnasrat/pip into develop
Fix whitespace, etc for pep8 compliance

Reran tests after changes on 2.4, 2.6, 3.2 all pass.

=====================================================
================== Running pep8 =====================

Searching for pep8
Reading http://pypi.python.org/simple/pep8/
Reading http://github.com/cburroughs/pep8.py/tree/master
Reading http://github.com/jcrocholl/pep8
Best match: pep8 0.6.1
Processing pep8-0.6.1-py2.6.egg
pep8 0.6.1 is already the active version in easy-install.pth
Installing pep8 script to /Users/pnasrat/Development/pip/pip_virtualenv/bin

Using /Users/pnasrat/Development/pip/pip_virtualenv/lib/python2.6/site-packages/pep8-0.6.1-py2.6.egg
Processing dependencies for pep8
Finished processing dependencies for pep8

==================== Ended pep8 =====================
=====================================================
Merge pull request #280 from pnasrat/pep8

Fix whitespace, etc for pep8 compliance
Fixed issue #283 and did some refactorings on git vcs backend
Removed broken and no-longer-useful -E and PIP_RESPECT_VIRTUALENV options.
Removed some unused imports.
Merge branch 'develop' into issue283-cant-find-tag-pointing-to-same-commit-as-origin-master
Use two argument form of patch not manual patch

After conversation with Michael Foord improve mock usage in pip.

Tested on 2.4, 2.7, 3.2
Merge pull request #292 from pnasrat/fix-mock-usage

Use two argument form of patch not manual patch
Directly extract symbolic links rather than their targets (#288).