Repository navigation
feat(skills): extension-runtime-and-packaging skill, snippet and example - #445
Merged
Merged
Conversation
Nothing covered what breaks an extension after its first run. New skill extension-runtime-and-packaging covers: - bundled wheels instead of pip, matched to Python 3.11 (4.5) and 3.13 (5.2) - user data in bpy.utils.extension_path_user, never beside __file__ - the network permission plus bpy.app.online_access - bl_ext package names and relative imports - blender --command extension validate/build/server-generate in CI Every claim is measured on 4.5.11, 5.1.2 and 5.2.1 in a throwaway BLENDER_USER_RESOURCES: - validate passes a manifest whose wheel file is missing (also an unknown platform name and schema_version 9.9.9); only build fails it. - An upgrade replaces the install tree but keeps extensions/.user/...; extension remove deletes it. - extension_path_user raises ValueError for a non-bl_ext package. - Wheels land in extensions/.local/lib/pythonX.Y/site-packages, which is already on sys.path. New snippet snippets/extension-user-data.py, and new check-only example examples/extension-package-lifecycle. The example builds, lists, installs, upgrades and removes the repo's extension template, with falsifiers --validate-only (exit 4) and --data-next-to-file (exit 7). Counts move to 17 skills, 28 snippets and 65 examples (9 check-only). The example maps to the new skill and headless-batch-scripting in examples/skills.json. build_examples_index.py now drops the backticks from a stripped link whose text is a path, so a README lead such as [`templates/...`](...) no longer leaves a bare repo path in a skill. Closes #380 Signed-off-by: TMHSDigital <154358121+TMHSDigital@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Owner
Author
|
CI evidence before merge: all checks pass ( 13 pass ). Blender Smoke on PR head: Blender 5.2.2 LTS / Blender 4.5.14 LTS. Summaries (happy path; falsifiers) per leg: 144 passed, 1 skipped, 0 failed;164 passed, 0 skipped, 0 failed;142 passed, 3 skipped, 0 failed;149 passed, 15 skipped, 0 failed; |
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 #380.
What ships
extension-runtime-and-packagingcovers what breaks an extension after its first run:pip;extension_path_userinstead of beside__file__;networkpermission plusbpy.app.online_access;bl_ext.<repo>.<id>package names;blender --command extension validate / build / server-generatein CI.snippets/extension-user-data.py: a settings file in the extension's user directory, plus anonline_accessguard.examples/extension-package-lifecycle: builds, lists, installs, upgrades (0.1.0 → 0.2.0) and removes the repo's extension template. Every step runs in a throwawayBLENDER_USER_RESOURCES. Falsifiers:--validate-only(exit 4) and--data-next-to-file(exit 7).examples/skills.jsonentry (→ this skill and headless-batch-scripting); Cursor manifest; counts (17 skills, 28 snippets, 65 examples, 9 check-only).build_examples_index.pynow unquotes a stripped link whose text is a path. This example's README lead madecheck_skill_refsfail on a baretemplates/...path in the generated section.Measured facts the skill relies on
All on local 4.5.11 LTS, 5.1.2 and 5.2.1 LTS, unless a row says otherwise:
validate/buildwith awheelsentry whose file is missingvalidatewithplatforms = ["win64"], orschema_version = "9.9.9"validatewith noid,version = "one",type = "plugin", permissionteleport,blender_version_min = "4"__package__bl_ext.user_default.example_addonextension_path_user(__package__)extensions/.user/user_default/example_addon, beside the install treeextension_path_user("probe_ext")(a bare name)ValueError: The "package" does not name an extension(4.5.11 and 5.2.1)__file__is gone); user data keptextension removepy3-none-any)extensions/.local/lib/python3.11/site-packages(4.5.11) orpython3.13(5.2.1), already onsys.pathbpy.app.online_access--online-modeEvidence
Live run:
tests/smoke/run_catalog.pyover the new row; all PASS.--validate-only--data-next-to-fileLocal checks:
tests/run_all.py31 passed, 0 failed (counts, frontmatter, skill refs, examples index, exit-code README, catalog).Inspection only:
pip download … --python-version 3.11 --platform win_amd64line follows the Blender manual's wheels page; it was not run here.--split-platformsis described fromextension build --helpand the manual; it was not run.The example starts about a dozen child Blenders, so expect it to be one of the slower smoke rows.
🤖 Generated with Claude Code