Fix BIP-39 wordlist not found when installed via pip/AUR

Move bip39-words.txt into package data directory and use
importlib.resources for reliable path resolution. The wordlist
was previously only included in sdist but not in wheel builds.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
adlee-was-taken
2026-01-24 01:12:45 -05:00
parent 398a359778
commit 9f0e0afeb6
4 changed files with 2079 additions and 5 deletions

View File

@@ -114,6 +114,13 @@ include = [
[tool.hatch.build.targets.wheel]
packages = ["src/stegasoo", "frontends"]
[tool.hatch.build.targets.wheel.sources]
"src" = ""
# Include data files in the wheel
[tool.hatch.build.targets.wheel.force-include]
"src/stegasoo/data/bip39-words.txt" = "stegasoo/data/bip39-words.txt"
[tool.pytest.ini_options]
testpaths = ["tests"]
python_files = ["test_*.py"]