bdist_msi fails when packages are given as argument to cx_Freeze.setup()
VegarS opened this issue · 2 comments
VegarS commented
Describe the bug
After upgrading from 6.15.13 to 6.15.14 the bdist_msi command fails if setup() is called with a non-empty packages argument.
To Reproduce
- Download attached simple.zip, which is a minimally modified copy of samples/simple from the main branch.
- I have copied hello.py into a subdirectory (pkg) and added the subdirectory to the packages argument in setup.py:
setup(..., packages=["pkg"])
- I have copied hello.py into a subdirectory (pkg) and added the subdirectory to the packages argument in setup.py:
- Run
python.exe setup.py bdist_msi
- Build fails when trying to copy a license file to a directory that was deleted two log lines above (see screenshot below)
Expected behavior
Build should succeed like it does with 6.15.13, or give an appropriate error message if I am using the packages argument incorrectly.
Screenshots
Here the build for some reason tries to copy frozen_application_license.txt to build\bdist.win-amd64\msi after deleting the directory:
Desktop:
- Platform information: Windows 11
- OS architecture: amd64
- cx_Freeze version: 6.15.14
- Python version: 3.11
marcelotduarte commented
The setup packages option should not used in cx_Freeze.
Probably you want to use packages.
from cx_Freeze import Executable, setup
executables = [Executable("hello.py")]
options = {
"build_exe": {
"packages": ["pkg"],
},
}
setup(
name="hello",
version="0.1.2.3",
description="Sample cx_Freeze script",
executables=executables,
options=options,
)
Naturally, what you reported also seems like a bug, I'll check it out.
marcelotduarte commented
Release 6.15.15 is out!