[Distutils] Passing build_ext arguments to easy_install?
Phillip J. Eby
pje at telecommunity.com
Tue Aug 8 18:15:17 CEST 2006
At 12:02 PM 8/8/2006 -0400, Jim Fulton wrote:
>On Aug 8, 2006, at 11:58 AM, Phillip J. Eby wrote:
>>At 10:43 AM 8/8/2006 -0400, Jim Fulton wrote:
>>>One hack I can think of is to use --editible and --build-directory to
>>>download the package, write a setup.cfg into the resulting directory
>>>and then run easy_install on the result. I would hope though that
>>>there is a better way. :)
>>Not at the moment, no. However, you could subclass easy_install
>>and override the 'run_setup()' method to edit the setup.cfg first.
>>The setuptools.command.setopt module includes some nice routines
>>for editing setup.cfg files, so that you won't even overwrite
>>settings you don't care about.
>OK, I'll look at that when I get a chance. Thanks. Would you be
>interested in some sort of patch for 0.7 to make it possible to pass
>this information to easy_install?
Do you mean via the command-line interface?
One thing I originally thought about doing was trying to have some way for
the child setup to "inherit" settings from the easy_install command; that
is, to copy default options from the parent process to the "subprocess"
(not really a subprocess), perhaps by editing the target's setup.cfg. But
maybe for what you want, all you need is something like:
easy_install --build-commands="build_ext --blah fah wah foo" whatever
The big question there of course is whether those commands should also be
applied to dependencies. For something like include and library dirs, it's
probably not a problem, I'm just wondering about the general applicability.
More information about the Distutils-SIG