Re: [Distutils] install --dry-run broken?

At 05:11 PM 4/22/2010 -0400, Jim Fulton wrote:
Or maybe this constitutes "working" for distutils. ;)
It does, I'm afraid. The problem is that the build is also a dry run, so the files aren't there for the later bits to actually copy. It might be better to do a dry run mechanism based mainly on setuptools' sandboxing code -- the sandbox framework could be extended to allow faking all file operations that go through normal Python APIs. (i.e. not external commands like compilers; those would of course fail unless separately faked.) There are actually quite a lot of applications for such sandboxing within the distutils, that at one time I hoped to explore in later setuptools versions. (e.g. for testing, uninstalls of arbitrary packages, etc.)

On Fri, Apr 23, 2010 at 6:58 AM, P.J. Eby <pje@telecommunity.com> wrote:
At 05:11 PM 4/22/2010 -0400, Jim Fulton wrote:
Or maybe this constitutes "working" for distutils. ;)
It does, I'm afraid. The problem is that the build is also a dry run, so the files aren't there for the later bits to actually copy.
It might be better to do a dry run mechanism based mainly on setuptools' sandboxing code -- the sandbox framework could be extended to allow faking all file operations that go through normal Python APIs. (i.e. not external commands like compilers; those would of course fail unless separately faked.)
Right, I think sandboxing would be a better solution, less intrusive to the code, and this would work for *any* distutils command out there. Now my question is about setuptools' sandbox : it seems to me that it was only making sure a setup script wasn't trynig to write outside a given directory, using DirectorySandbox. 1- How this tool could be used to record the writings ? Would we need to subtype AbstractSandbox ? 2- If 1/ is doable, what about making this tool its own standalone project ? that would be useful for many projects Regards Tarek -- Tarek Ziadé | http://ziade.org

P.J. Eby wrote:
The problem is that the build is also a dry run, so the files aren't there for the later bits to actually copy.
That's not a problem for me, because I'm not trying to find out what will get copied. I only use --dry-run to exercise my setup.py code to make sure it doesn't crash. Please don't take this functionality away just because of some other functionality that it doesn't provide. -- Greg
participants (3)
-
Greg Ewing
-
P.J. Eby
-
Tarek Ziadé