On Aug 20, 2013, at 8:57 PM, Vinay Sajip <vinay_sa...@yahoo.co.uk> wrote:
> Thomas Heller <theller <at> ctypes.org> writes: > >> Ok, now I understand. But the zipfile could contain a loader-module >> for each extension which does something like this (this example extracts >> and loads 'bz2.pyd'): > > In distlib, I've built on top of the zipfile support to allow C extensions > to be available. Ordinary zipfiles contain no metadata indicating the > extensions available, but wheels built with distil do. The wheel handling > code in distlib takes advantage of this. The Wheel.mount() API [1] takes > care of this (adding the wheel to sys.path, extracting the extensions to a > user-specific directory and using an import hook to call imp.load_dynamic > when required, so that both Python modules and extensions are available for > import). It seems to work, though when I introduced the Wheel.mount() API I > was told that it was very dangerous, and the sky would fall, or something :-) > > Regards, > > Vinay Sajip > > [1] http://distlib.readthedocs.org/en/latest/tutorial.html#mounting-wheels > > > _______________________________________________ > Distutils-SIG maillist - Distutils-SIG@python.org > http://mail.python.org/mailman/listinfo/distutils-sig Mounting Wheels seems like a bad idea, it was one of the things Daniel explicitly removed (since Wheels are basically cleaned up eggs). Adding it back in ex post facto seems like it's an idea that's going down the wrong track. If Wheels are to be importable it should be enshrined in the PEP not an adhoc feature of one possible implementation. ----------------- Donald Stufft PGP: 0x6E3CBCE93372DCFA // 7C6B 7C5D 5E2B 6356 A926 F04F 6E3C BCE9 3372 DCFA
signature.asc
Description: Message signed with OpenPGP using GPGMail
_______________________________________________ Distutils-SIG maillist - Distutils-SIG@python.org http://mail.python.org/mailman/listinfo/distutils-sig