pypa/pip — pull request #428 by gvalkov (2012-01-06 01:10:14+00:00)
Title: Refactoring

This branch attempts to address some areas of pip that I think need more work.

**Look and Feel**

old:
[`pip help`](https://gist.github.com/raw/1556718/d82231058dd3c3ff3e1529eaf325b4f5d3075540/pip%20help%20(develop%206d6ead)
[`pip help install`](https://gist.github.com/raw/1556718/76f4e7ded3301d9595a62196a80c9d66c665dcba/pip%20help%20install%20(develop%206d6ead)

new:
[`pip help`](https://gist.github.com/raw/1556718/ad4e7e60476c21c0f0590e6f866f0e4191584637/pip%20help)
[`pip help install`](https://gist.github.com/raw/1556718/255f284fd38870036734ac0fa31cf83d69e8869b/pip%20help%20install)

* Less verbose command line help (long option descriptions will be moved to a man page).
* Prettier and more compact option formatting.
* Group related options.
* `pip` `pip --help` and `pip help` with no arguments should behave in the same way.
* No need for `--src=DIR, --source=DIR, --source-dir=DIR, --source-directory=DIR` like lines. Decide on two and maintain compatibility for the rest.

**Code**

* No global parser and commands.
* No need for deferred command loading - deferred instantiation should be enough.
* Better project structure.
* Better configuration handling (instead of an optparse.Values)
* Many more ...

... Listing all these would turn this into a design document and I actually prefer fixing things. Please refer to the code - the commits are fairly atomic (mostly for demonstrative purposes)

This is still mostly a work in progress, but since refactoring work often ends up being un-mergeable, I'd be glad if this was merged earlier.