[Distutils] installing .py plugins to an alternate directory

Andrew Dalke dalke at dalkescientific.com
Sat Dec 5 00:22:45 CET 2009

On Dec 3, 2009, at 8:09 PM, Tarek Ziadé wrote:
> What about having an explicit configuration file in Akara for plugins,
> where you just add extensions, exactly like mercurial does:
>  [extensions]
>  foo = package.spam_extension
>  bar = spam_extension2
> where "package.spam_extension" and "spam_extension2" are modules Akara
> would simply __import__()
> Meaning a plugin will be a normal project that gets installed, and
> then configured to be used in Akara.

Since I don't know how mercurial does this, I'm going to have to guess on your meaning here and reading the hg documentation.

There seem to be two ways to install an extension. One is by editing the hgrc file, and the other is by putting the Python code in the "hgext" module.

I looked at the installation instructions for mercurial packages listed at http://mercurial.selenic.com/wiki/UsingExtensions . They all require hand-editing of the hgrc file. That is not what I want.

What I want is "python setup.py install" to work, and to allow third-party extensions to use the existing Python setup framework to install not only the extension component, but any other packages and even compiled C code which might be needed.

The other option was to put files into hgext, but that seems only appropriate for the extensions shipped with Mercurial, and I found nothing which helped automating the installation of those files.

So your recommendation does not seem helpful.

				dalke at dalkescientific.com

More information about the Distutils-SIG mailing list