[Distutils] install --dry-run broken?

Jim Fulton jim at zope.com
Thu Apr 22 23:11:16 CEST 2010

On Thu, Apr 22, 2010 at 3:50 PM, P.J. Eby <pje at telecommunity.com> wrote:
> At 02:54 PM 4/22/2010 -0400, Jim Fulton wrote:
>> I tried the distutils example:
>>  http://docs.python.org/distutils/introduction.html#a-simple-example
>> running
>>  python2.6 setup.py install --dry-run
>> (or python2.6 setup.py install -n)
>> installed the package.
>> Am I missunderstanding something? Or is --dry-run an april fool's
>> joke? :)
> It appears the issue is that this has always been broken in distutils.  What
> you need to do is:
>   python2.6 setup.py --dry-run install
> (Or -n).
> The problem is that the 'install' command doesn't pass on its local
> --dry-run flag to any of the subcommands that do the real work.
> Probably, the --dry-run option should be dropped from the individual
> commands altogether in distutils2, with only a global flag being allowed.

That sounds good, although

    python2.6 setup.py --dry-run install

doesn't work either. With the "simple example":

  python2.6 setup.py --dry-run install
  running install
  running build
  running build_py
  running install_lib
  copying build/lib/foo.py -> /usr/local/python/2.6/lib/python2.6/site-packages
  error: file '/usr/local/python/2.6/lib/python2.6/site-packages/foo.py'
does not exist

Or maybe this constitutes "working" for distutils. ;)


Jim Fulton

More information about the Distutils-SIG mailing list