[Distutils] Bugginess in distutils.core.run_setup?
Arve Knudsen
aknuds-1 at broadpark.no
Tue Oct 18 00:51:23 CEST 2005
On Mon, 17 Oct 2005 21:18:06 +0200, Phillip J. Eby <pje at telecommunity.com>
wrote:
> At 08:41 PM 10/17/2005 +0200, Arve Knudsen wrote:
>> Sorry if this has been asked before, but I'm having difficulties in
>> using
>> the distutils.core.run_setup function. Setup scripts that will work
>> happily when run from the commandline ("python setup.py") bomb out when
>> under run_setup. What happens as far as I can tell is that run_setup
>> provides a "locals" argument for execfile, which is used for "import"
>> statements. What happens then is that imports on the global level are
>> not
>> visible to functions, so an exception is raised when a function tries to
>> access a globally imported module. Is this due to faulty logic in
>> run_setup (explicitly specifying the "locals" argument)?
>
> The run_setup() is broken in more ways than that. I've usually found it
> simpler to just write my own, e.g. setuptools.sandbox.run_setup().
>
Shame to hear that .. anyway, cheers, I'll most definitely have a look at
setuptools.sandbox.run_setup.
Arve
More information about the Distutils-SIG
mailing list