fix(sdk): include tools/*.md in Python wheel package data#2656
Merged
harbournick merged 1 commit intomainfrom Mar 31, 2026
Merged
fix(sdk): include tools/*.md in Python wheel package data#2656harbournick merged 1 commit intomainfrom
harbournick merged 1 commit intomainfrom
Conversation
The Python SDK wheel was missing system-prompt.md because pyproject.toml only included tools/*.json in package-data. This caused get_system_prompt() to throw TOOLS_ASSET_NOT_FOUND at runtime.
Contributor
|
🎉 This PR is included in superdoc-sdk v1.3.0-next.50 |
Contributor
|
🎉 This PR is included in superdoc-sdk v1.4.0 |
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.
Closes [SD-2424]
https://linear.app/superdocworkspace/issue/SD-2424/bug-python-sdk-120-wheel-omits-system-promptmd-and-breaks-get-system
Summary
system-prompt.md, causingget_system_prompt()to throwTOOLS_ASSET_NOT_FOUNDat runtimepyproject.tomlpackage-data only includedtools/*.json, nottools/*.md"tools/*.md"to the[tool.setuptools.package-data]glob listRoot cause
In
packages/sdk/langs/python/pyproject.toml, the package-data section was:The
skills/*.mdglob correctly includes markdown files from the skills directory (e.g.,editing-docx.md), buttools/*.jsononly matches JSON tool catalogs.tools/system-prompt.mdwas silently excluded from the built wheel.At runtime,
tools_api.py:201callsimportlib.resources.files('superdoc').joinpath('tools', 'system-prompt.md')which raisesFileNotFoundErrorbecause the file was never packaged.How to reproduce locally
Before fix: step 2 returns nothing, step 4 throws
SuperDocError: System prompt not found.After fix: step 2 shows
superdoc/tools/system-prompt.md, step 4 prints the prompt.Test plan
cd packages/sdk/langs/python && python3 -m build --wheelsystem-prompt.mdis in the wheel:unzip -l dist/*.whl | grep system-promptget_system_prompt()from outside the source treeunzip -l dist/*.whl | grep tools/