[Distutils] distlib.mount API design (was: wheels on sys.path clarification (reboot))
ncoghlan at gmail.com
Thu Jan 30 23:38:18 CET 2014
On 30 Jan 2014 23:26, "Paul Moore" <p.f.moore at gmail.com> wrote:
> On 30 January 2014 12:29, Nick Coghlan <ncoghlan at gmail.com> wrote:
> > I actually think this is a useful thing to experiment with, I'm just
> > not sure distlib is the best place for that experiment. With
> > appropriately secure tempfile handling and the right sys.path (and
> > module __path__) manipulation it's not obviously *impossible* to
> > handle C extensions at arbitrary positions in the module namespace
> > this way, just difficult. zipimport itself is a bad place to
> > experiment though, since not only is it currently a complex ball of C
> > code, but adding such a feature without clear evidence of robust
> > support in a third party project would be irresponsible.
> I just sent a long message that essentially gave a chunk of history
> and suggested a similar thing - an "enhanced zipimport" module to
> experiment with solutions in this space. With importlib available, an
> experimental implementation shouldn't even be too hard.
> The only difference is that I see very little reason why such a
> solution can't apply to all zipfiles, and not just wheels.
The advantage of wheels over plain zipfiles for this use case is the
structured metadata. distlib.mount doesn't try to guess the package
structure for the extensions, you have to provide an EXTENSIONS file in the
metadata that explains what C extensions are present and how they should
map into the module namespace.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Distutils-SIG