[Distutils] Using Wheel with zipimport

Chris Jerdonek chris.jerdonek at gmail.com
Wed Jan 29 12:52:17 CET 2014


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