cx_Freezed application's library.zip contains importlib/__init__.py twice.

Issue #79 resolved
Jurko Gospodnetić
created an issue

When freezing a simple application with the following content:

File: aaa.py

print("Hello world")
import asyncio
import sys
print(sys.version_info)

File: setup.py

from cx_Freeze import setup, Executable

setup(name="hhh",
      version="1.0",
      description="Haleluja!",
      options=dict(build_exe=dict(packages=[], excludes=[])),
      executables=[Executable("aaa.py", base="Console")])

The resulting library.zip archive contains the file importlib/__init__.pyc twice. To see this you can use any zip archive viewer (e.g. 7-zip) or Python code similar to the following:

File: report.py

from zipfile import ZipFile
from collections import Counter
zippy = ZipFile("build/exe.win-amd64-3.4/library.zip")
counted_names = Counter(zippy.namelist())
print(counted_names.most_common(1))

which when run reports the following:

D:\Workspace>py3 report.py
[('importlib/__init__.pyc', 2)]

Environment:

This does not seem to affect the final application at run-time but still seems smelly.

This issue has been extracted from comment 1415039 in pull request #47.

Comments (2)

  1. Log in to comment