I can set the final dist directory of py2exe using the command line:
python setup.py py2exe -d "my/dist/dir"
but I can’t seem to set the file to use for the interim build directory. I’ve taken a brief look at the source, but unless I am missing something there doesn’t appear to be any way to do it.
Any option that you can set on the command line you can set either through a setup.cfg file or in your setup.py file.
-dis a shortcut for--dist-dirwhich you can add to the py2xe dict in the dictionary passed to the options keyword param of setup as'dist_dir':You could also put setup.cfg next to your setup.py file:
The build directory (
--build-base) is an option of the build command so you can add it to one of the config files (or the setup.py) as: