Repository navigation
Bundle py_ecc metadata and pyunormalize tables in the frozen build - #100
Merged
Merged
Conversation
py_ecc 7 and later read their version from the package metadata when imported, so the executable needs the dist-info; hooks-contrib before 2026.8 has no hook that copies it, and info on a card then crashed with "No package metadata was found for py_ecc". pyunormalize 18 loads its Unicode tables with importlib.import_module, which the analysis cannot follow, so they are collected explicitly. The six hidden import is dropped: nothing installs or imports it any more. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Three changes to
setup.spec, the PyInstaller spec of the Windows executable:copy_metadata('py_ecc')indatas. py_ecc 7 and later read their own version from the package metadata at import time (web3→eth_account→eth_keyfile→py_ecc). A build with pyinstaller-hooks-contrib before 2026.8 has no hook for it, andinfoon a card then ends in the crash handler withNo package metadata was found for py_ecc.dev-requirements.txtpins 2026.9, which has the hook; the entry makes the build independent of it.collect_submodules('pyunormalize')inhiddenimports. pyunormalize 18 loads its eight Unicode table modules throughimportlib.import_module, so the analysis leaves them out and web3's ENS name handling would end inModuleNotFoundErrorin the executable. No CLI argument reaches that path today, since addresses are checked to be hex first.sixremoved fromhiddenimports: no dependency installs it and nothing imports it; it only producedERROR: Hidden import 'six' not foundin every build.Checked on Windows (main
ea38046, Python 3.12, PyInstaller 6.11.1, hooks-contrib 2024.10):infoon a card crashed as described, and ran withcopy_metadata('py_ecc')added; that executable passed the card-less checks, the demo-card commands, the PIN prompt test in both consoles and the NSIS installer. Checked on Linux (PyInstaller 6.22.3, hooks-contrib 2026.9) with this spec: the eightpyunormalize._internalmodules andpy_ecc-8.0.0.dist-infoare in the bundle, the onlyERRORlines are the Windows-onlywinsdkimports, and the 15 card-less checks and the license-file check pass.🤖 Generated with Claude Code