Skip to content

Instantly share code, notes, and snippets.

@qwcode
Created October 3, 2012 18:07
Show Gist options
  • Select an option

  • Save qwcode/3828683 to your computer and use it in GitHub Desktop.

Select an option

Save qwcode/3828683 to your computer and use it in GitHub Desktop.
"pip wheel"
Usage: pip wheel [OPTIONS] PACKAGE_NAMES...
Creates wheel archives from your requirements and place into ./wheels
(requires distribute>0.6.28 and wheel)
-w --wheel-dir <DIR> //alternative dir to place wheels into
--force-rebuild //rewrite existing wheels
--unpack-only <DIR> //unpack to dir, for manual building with "setup.py bdist_wheel"
-r, --requirement <FILENAME>
-f, --find-links <URL>
-i, --index-url <URL>
--extra-index-url <URL>
--no-index
-M, --use-mirrors
--mirrors <URL>
--download-cache <DIR>
--no-deps
why not other names?
- "pip bdist --format=[wheel...]": if wheel succeeds, would we seriously want to support any of the older forms?
- "pip build ..."
- if the intention here is to just label wheel building as "build", IMHO that will create confusion.
- if the intention is to do something much more elaborate, e.g also trying to break up the "setup.py install" step, that's too much IMHO
design:
- you can't just inherit from commands.install, or you take on all install options. that's too confusing
- either inherit directly from pip.basecommand.command (and construct a RequirmentSet),
or possibly do some refactor and create a new ReqSet command base class, if it makes sense
- feel free to modify and *add* methods to InstallRequirement/RequirementSet.
(better to not make these enormously long methods any longer and complicated)
P.S. if the general "--package-cache" idea succeeds( https://gist.github.com/3828762),
then I could see coming back and offering a "--build-wheel" option to install that builds/writes
wheels to your package-cache if you're using one.
@qwcode

qwcode commented Oct 10, 2012

Copy link
Copy Markdown
Author

assume that the new pip wheel command will ignore whether or not the packages are already installed?

that's my intention

When a package needs custom build_ext options (usually -L or -I for external libraries) the current incantation is

I guess at least support an --unpack-only option (so you can manually do certain ones)?

Assuming you don't want to invent a more complex automatic method of passing arguments to setup.py

wasn't planning on it, but related to this, there is a pull to add --install-option support line by line in requirements, but it's stagnating. pypa/pip#515

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment