[Distutils] util.copy_file and --dry-run
Greg Ward
gward@python.net
Sat, 20 May 2000 11:54:31 -0400
On 20 May 2000, Bastian Kleineidam said:
> I found a misleading behaviour with the --dry-run option. Suppose you
> create a directory and then you copy a file in this directory. With
> --dry-run the directory is not created and this makes the copy_file
> function to announce the renaming of the file rather than copying it
> into the new directory.
>
> code snippet:
> ./setup.py --dry-run build
> [...]
> creating build/scripts
> copying linkchecker -> build
>
> should be:
> creating build/scripts
> copying linkchecker -> build/scripts
Ooh, sneaky sneaky! This is both a feature and a bug, if you'll buy
that. I've just changed how 'copy_file()' does its verbose output so
that the feature part outweighs the bug part. ('copy_file()' still
misunderstands what it's doing in dry-run mode when you try to copy to a
directory that doesn't exist. But it now prints output that makes it
*look* like it knows what it's doing. Since this only affects the
verbose output in dry-run mode, I think that *looking* good is good
enough.)
Greg
--
Greg Ward - geek gward@python.net
http://starship.python.net/~gward/
I appoint you ambassador to Fantasy Island!!!