[Distutils] [issue107] bdist_egg --bdist-dir param not working quite as expected
P.J. Eby
pje at telecommunity.com
Fri Apr 30 18:50:48 CEST 2010
At 01:18 AM 4/30/2010 +0000, Patrick Ting wrote:
>So when specifying a build directory through the --bdist-dir param
>to anything than the default directory:
>1. (as expected) a build directory is created, the pyc files are
>generated in this directory, and then the directory is deleted.
>2. (bug) build/ directory in the cwd is always created with the
>original .py files copied into it.
Just for the benefit of anybody tracking this on the mailing list,
the issue is that setting the build directory in this way only
changes bdist_egg's build directory, not any other command's build
directory (such as build_py). This is an artifact of distutils
design, where you set options to commands like "build" and "install",
which are then inherited by subcommands.
The "distutils correct" way to do what the OP is trying to do is therefore:
setup.py build --build-base=/whatever bdist_whatever
As this will pass the build base onto all the subcommands. This is
the same pattern for bdist_egg, bdist_wininst, bdist_dumb, etc.
Maybe distutils2 should have a cleaner way of doing this sort of
thing, if it's not being built on the same infrastructure.
More information about the Distutils-SIG
mailing list