How do I change the directory where cx_Freeze creates the "build" and "dist" folders?
1 answer
There is an option; when you do a distutils script setup eg. python setup.py build
, you can specify the directory as python setup.py build -b ..\somewhere\else\
.
Alternatively, you can set it in code in the dict option. eg change
options = {
'includes': ['numpy.core._methods'],
'excludes': ['tkinter']
}
setup(name="Application", options=options, executables=[Executable("run.py", base=None)]
in script settings before
options = {
'includes': ['numpy.core._methods'],
'excludes': ['tkinter'],
'build_exe': '..\\somewhere\\else\\'
}
setup(name="Application", options=options, executables=[Executable("run.py", base=None)]
Note that I had somewhat different behavior with these two solutions; the first will put all files in a folder inside somewhere\else
, whereas the second will just put all files in somewhere\else
.
+2
source to share