I am using cx_Freeze python exe creator. After running the setup.py script, it create the directory like this build/exe.win-amd64-3.8. I want to rename the directory exe.win-amd64-3.8 to runner. I tried with other options using os.rename, but it does not work if I write in setup.py and it gives error like Permission denied. I provide below my setup.py script below.
import shutil
from cx_Freeze import setup, Executable
includes = ["net_util","cx_Freeze","platform", "subprocess"]
excludes = ["tkinter", "test","unittest", "pydoc","http",'multiprocessing.Pool']
packages = ["os", "platform", "net_util","concurrent","subprocess","platform"]
build_exe_options = {"excludes": excludes,"optimize": 2}
mainScript = "main.py"
exeIcon = "icons/ping.ico"
exeName = "pingcheck.exe"
base = None
# if sys.platform == "win32":
# base = "Win32GUI"
exe = Executable(script=mainScript, base = base, icon=exeIcon,targetName=exeName)
shutil.rmtree('build', ignore_errors=True)
setup(name = "pingExe",
version = "0.1",
description = "My Ping Console application!",
options = {"build_exe": build_exe_options},
executables = [exe])
Please suggest me about how to rename when I run python setup.py build.