[Distutils] Install time prefixes and data files

Wolodja Wentland wentland at cl.uni-heidelberg.de
Fri Nov 13 14:48:24 CET 2009

On Fri, Nov 13, 2009 at 21:36 +0900, David Cournapeau wrote:
> On Fri, Nov 13, 2009 at 7:38 PM, Wolodja Wentland
> <wentland at cl.uni-heidelberg.de> wrote:

> > Could you elaborate on this idea please? Do you mean that megabars
> > plugins are shipped in a different distribution than megabar itself?
> Yes. Imagine that I create a library, which includes a firefox plugin
> in python. I need to differentiate between what will end up in firefox
> and the rest.

I can certainly see the need for this and would be +1 on this idea.

One way to do this could be:

In megabar:

        ('$plugins', '$purelib/plugins'),
        ('$foo', '$base_prefix/foo'),
        ('$plugins', 'plugins/standard_plugin.py'),

And in megabar-plugins:

        (pkgutil.get_prefix('megabar', '$plugin'),

You could use a standard prefix if megabar does not define a $plugin
custom prefix within megabar-plugins, which might even be the default if
introduction of custom_prefixes is not accepted/ok.

I think we need to:

* compile a list of standard prefixes and their default values on all
  platforms. I still like the idea to be able to modify these *only* by
  setting environment variables, so it would look something like this:

  stdprefix1 = os.environ.get('PYDIST_STDPREFIX1', 

  Create this list on a wiki? 

* Define an API that clarifies how to query this information:
    - within setup.py
    - at built time
    - at runtime
    - ... ??

Suggestions? Corrections? Better ideas? I am just brainstorming...

  .''`.     Wolodja Wentland    <wentland at cl.uni-heidelberg.de> 
 : :'  :    
 `. `'`     4096R/CAF14EFC 
   `-       081C B7CD FF04 2BA9 94EA  36B2 8B7F 7D30 CAF1 4EFC
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://mail.python.org/pipermail/distutils-sig/attachments/20091113/e3c7eb45/attachment.pgp>

More information about the Distutils-SIG mailing list