[Distutils] Using Wheel with zipimport

Donald Stufft donald at stufft.io
Wed Jan 29 12:58:51 CET 2014

That doesn't really speak to the fact they were designed for that. If I read that it looks like some commenting that they are importable (which as it stands they are) and not someone calling it a supported feature of the format. It even states that the format is designed primarily for distribution. Given that the PEPs text had always been contrary to the position that wheels were designed to be importable I don't think you can draw any other conclusion. 

> On Jan 29, 2014, at 6:52 AM, Chris Jerdonek <chris.jerdonek at gmail.com> wrote:
>> On Wed, Jan 29, 2014 at 3:41 AM, Donald Stufft <donald at stufft.io> wrote:
>>> On Jan 29, 2014, at 4:23 AM, Paul Moore <p.f.moore at gmail.com> wrote:
>>> As I recall, it was in the original version of the PEP/spec and it was
>>> always an intended feature. The wheel file for the wheel project
>>> itself is (deliberately) runnable as a zip file, so that you can
>>> bootstrap into the wheel world using the "wheel install" command.
>> I just read every version of the PEP that has ever existed in Mercurial
>> and no version besides Nick's most recent contains any text about
>> the importability of Wheels besides that one of the differences of
>> Wheel and Egg is that Wheel is an installation format and Egg is
>> importable.
> FWIW, Nick clarified this aspect of wheels on this list at least once
> -- back in Sep 2012 when the PEP was first introduced.  See this
> email:
> https://mail.python.org/pipermail/distutils-sig/2012-September/018959.html
> "It's also not quite true that the contents of a wheel aren't
> importable - since they're still just a zipfile, they can still be
> added to an import path in the same manner as egg files. It's just not
> *recommended* to use them that way, as the format is designed
> primarily for use in distribution rather than runtime imports."
> --Chris

More information about the Distutils-SIG mailing list