pypa/pip — pull request #1572 by qwcode (2014-02-16 03:32:07+00:00)
Title: [WIP] internal wheel cache

here's a WIP implementation of an inline wheel build cache, that's opt-in.

here's the new `pip install` options:

```
--wheel-cache Build and Cache wheels
--wheel-cache-rebuild Rebuild pre-existing wheels in the cache.
--wheel-cache-dir Directory for cached wheels. Defaults to <...>
--wheel-cache-exclude A Package to exclude from wheel building and caching.
```

much of the diff is shuffle. the new logic is primarily in 2 new functions:

- `InstallRequirement.build` :this builds wheels into the cache
- `RequirementSet.find_requirement`: this knows how to look in the cache first.

I still need to cleanup some things, fix/add tests, update docs, but wanted to put the basic implementation out there for review.

Over email, I mentioned doing the cache in a general way for sdists as well,
but atm, thinking that would just be more complex, and mostly pointless in the long run. (i.e. the `--package-cache` idea would go away)

A historial note: an early version of the wheel support, had a `--build-wheel=DIR` option, but it wasn't a full cache solution. see the discussion in #684 as to how we ended up with `pip wheel`. btw, I think `pip wheel` still has a place, after we have wheel caching.