Join GitHub today
setuptools error when embbeding it into a frozen executable #841
We distribute our applications in Windows and Linux using cx-freeze.
Recently we upgraded
try: from win32com.client.gencache import GetGeneratePath _EXCEPTIONS.append(GetGeneratePath()) del GetGeneratePath except ImportError: # it appears pywin32 is not installed, so no need to exclude. pass
The problem is that
def GetGeneratePath(): """...""" assert not is_readonly, "Why do you want the genpath for a readonly store?"
As a workaround which seems to work for us, we monkeypatched
Any thoughts or advice on this issue would be really appreciated.
Looking at that original issue, I see that the WMI package has a setup.py with
Looking at the latest WMI, it no longer imports wmi but instead does the following:
Although hacky, this approach is preferable to invoking behavior in dependencies, especially behavior that might write outside the sandbox.
Since the latest version of WMI, released 5 years ago already works around the issue, let's drop support for win32com generating interfaces during the install step.