[Distutils] Standardizing distribution of "plugins" for extensible apps

Phillip J. Eby pje at telecommunity.com
Thu Dec 9 16:49:14 CET 2004

At 05:59 AM 12/9/04 -0500, Bob Ippolito wrote:
>On Dec 8, 2004, at 13:20, Phillip J. Eby wrote:
>>At 12:19 PM 12/8/04 -0500, Bob Ippolito wrote:
>>>What about something like this:
><zip layout incompatible with zipimport>
>>>This should more or less allow for someone to create a "fat" plugin that 
>>>has platform-specific dependencies, but includes them for multiple platforms.
>>I'd prefer to be able to use a plugin archive (.par, anyone?) directly 
>>with zipimport in the case that it's a pure Python archive (or if it's on 
>>some hypothetical platform that can load extensions from a 
>>zipfile).  Ideally, also, one should also be able to unzip a .par 
>>directly into site-packages or a subdirectory thereof and use it.
>>Thus, I'd prefer to see an internal layout that's something more like:
><zip layout compatible with zipimport>
>Uh, why does it matter if zipimport can do something with it if we're 
>going to need a custom importer anyway?

Well, for one thing, so we can possibly reuse some of the zipimport 
code.  But also because it allows pure-Python packages distributed this way 
to be used without additional downloads or other steps, and because 
packages with extensions can just be unzipped in an application's directory.

>By the way, .par is just about the worst possible choice for an extension, 
>- It's already used by Perl and PHP to mean similar things


>- We're not using DOS anymore, it's safe to use more than three letters.
>- It's a common english word, good luck finding it on google or anywhere 
>else for that matter.
>   "pyplugin" has "about 14" results on google (that displays as 4)

Hm.  I'm not sure that what Google displays *now* is going to be helpful 
later.  I mean, if you Google "PyProtocols" today, almost half the results 
are Debian package mirrors.  If the format catches on, you're going to have 
to search for something besides "pyplugin" to find anything useful.  But I 
don't have any real objection to "pyplugin", apart from the fact the length 
makes me uneasy, admittedly irrationally so.  Before DOS 3-character 
extensions, I was using TRS-DOS 3-character extensions, so I've got about 
20 years of 3-characterness to overcome.  :)

"pyarc", btw, has "about 10" results on Google (that displays as 6), so 
it's about as unused as "pyplugin", and is shorter.  Which is therefore 
less unnerving to my primitive hindbrain's fear of longer extension names.  ;)

OTOH, "bdist_plugin" has a much nicer ring than "bdist_pyplugin" or 
"bdist_pyarc", so there's lots of ways this could go.  "pyzip" is also 
comparably "available" with respect to Google hits.

More information about the Distutils-SIG mailing list