Let's say numpy_example.py is:
import numpy as np
a = np.array([1, 2, 3])
print(a)
With Python 2.7.9, generating an executable from this with cxFreeze 4.3.3, with:
"C:\python27\python.exe" "C:\python27\Scripts\cxfreeze" numpy_example.py --target-dir=.\cxfreeze_x64_py2 --base-name=Win32GUI --target-name=test.exe --exclude-modules=Tkinter,scipy,Crypto,_ssl,bz2,_yaml --include-modules=lxml._elementpathgave 25 files (only
.dll,.pydand.exefiles) for a total of 71 MB, with no subfolder:With Python 3.7.6, generating an executable with cxFreeze 6, with the same command-line command gives a total of 8533 files for a total of 374 MB!
In particular, there is the
Libsubfolder containing many libraries unused for this project:Also, with the Python 2 version, Numpy was packed into 9
.pydfiles (and nothing else), whereas here in the Python 3 version it's split in many files and subfolders.
Question: what has changed in cx_freeze, resulting in this less efficient packing?
And how to get a similar packing with cx_freeze for Python 3 than with Python 2?

