René's URL Explorer Experiment


Title: dev_environment.py: detect Blender's bundled Python from disk instead of a hardcoded version boundary · Issue #9227 · IfcOpenShell/IfcOpenShell · GitHub

Open Graph Title: dev_environment.py: detect Blender's bundled Python from disk instead of a hardcoded version boundary · Issue #9227 · IfcOpenShell/IfcOpenShell

X Title: dev_environment.py: detect Blender's bundled Python from disk instead of a hardcoded version boundary · Issue #9227 · IfcOpenShell/IfcOpenShell

Description: src/bonsai/scripts/dev_environment.py derives the site-packages path from a hardcoded Blender→Python version boundary: BLENDER_VERSION_INT = tuple(map(int, BLENDER_VERSION.split("."))) PYTHON_VERSION = "3.13" if BLENDER_VERSION_INT >= (5...

Open Graph Description: src/bonsai/scripts/dev_environment.py derives the site-packages path from a hardcoded Blender→Python version boundary: BLENDER_VERSION_INT = tuple(map(int, BLENDER_VERSION.split("."))) PYTHON_VERSI...

X Description: src/bonsai/scripts/dev_environment.py derives the site-packages path from a hardcoded Blender→Python version boundary: BLENDER_VERSION_INT = tuple(map(int, BLENDER_VERSION.split("."))) PY...

Opengraph URL: https://github.com/IfcOpenShell/IfcOpenShell/issues/9227

X: @github

direct link

Domain: github.com

IPv4 address: 140.82.112.3


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"dev_environment.py: detect Blender's bundled Python from disk instead of a hardcoded version boundary","articleBody":"`src/bonsai/scripts/dev_environment.py` derives the site-packages path from a hardcoded Blender→Python version boundary:\n\n```python\nBLENDER_VERSION_INT = tuple(map(int, BLENDER_VERSION.split(\".\")))\nPYTHON_VERSION = \"3.13\" if BLENDER_VERSION_INT >= (5, 1) else \"3.11\"\nPACKAGE_PATH = BLENDER_PATH / rf\"extensions/.local/lib/python{PYTHON_VERSION}/site-packages\"\n```\n\nd30c25010 already fixed the immediate breakage (before it, only an exact `== \"5.1\"` match got 3.13, so Blender 5.2 fell through to 3.11 and the script aborted). This issue is about the remaining structural problem rather than a current failure.\n\n### Problem\n\nThe boundary has to be hand-edited every time Blender bumps its bundled Python. The current form is correct only until Blender ships 3.14 — at that point every 5.1+ user gets `python3.13`, the path doesn't exist, and the script dies on:\n\n```\nAssertionError: Path 'PACKAGE_PATH=...\\extensions\\.local\\lib\\python3.13\\site-packages' doesn't exist, ensure variable is set correctly.\n```\n\nThat is the same failure mode this script has already produced twice (7e1843b96 for 5.1, d30c25010 for 5.2). Each occurrence blocks new contributors setting up a dev environment, and the error message doesn't hint at the real cause.\n\n### Proposal\n\nThe information is already on disk — read it instead of predicting it. Glob `extensions/.local/lib/python*/site-packages` and take the highest match, keeping the version mapping only as a fallback so the existing assertion still prints a sensible path:\n\n```python\ndef find_package_path() -> Path:\n    extensions_lib = BLENDER_PATH / \"extensions/.local/lib\"\n    candidates = sorted(extensions_lib.glob(\"python*/site-packages\"))\n    if candidates:\n        # Highest Python version wins if there are leftovers from an older Blender.\n        return candidates[-1]\n    # Fallback so the assert below reports a sensible path.\n    blender_version_int = tuple(map(int, BLENDER_VERSION.split(\".\")))\n    fallback = \"3.13\" if blender_version_int >= (5, 1) else \"3.11\"\n    return extensions_lib / f\"python{fallback}/site-packages\"\n```\n\nThis is self-maintaining across future Blender releases and needs no change when 3.14 lands.\n\nTwo details worth deciding on:\n\n- `sorted()` on the glob is string ordering, so `python3.9` would sort above `python3.13`. Blender has been on 3.10+ for a while so it doesn't bite today, but a numeric key on the version parts would be more honest if you'd rather not rely on that.\n- Picking the highest match assumes a stale folder from an older Blender is never the correct target. That holds because `BLENDER_PATH` is already version-scoped, so the folder only contains one Blender's extensions.\n\n### Related: print `PACKAGE_PATH`\n\nIndependent of the above — `PACKAGE_PATH` is the one path the script asserts on but never shows in its \"Script settings\" block, so the failure appears without context. Adding it next to `REPO_PATH`/`BLENDER_PATH`/`BONSAI_PATH` makes the assertion self-explanatory.\n\nI have both changes locally and can open a PR.\n","author":{"url":"https://github.com/theoryshaw","@type":"Person","name":"theoryshaw"},"datePublished":"2026-08-02T13:43:30Z","url":"https://github.com/IfcOpenShell/IfcOpenShell/issues/9227"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:bceaa150-f3ff-9847-9c9b-a292ebcbcd04
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idD8C8:3670FE:655D91:89792A:6B04CA22
html-safe-nonceb16e3ba6d657606c37ec1a70217e2c7e3c549a9556daf71effcea29d197f4c4e
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEOEM4OjM2NzBGRTo2NTVEOTE6ODk3OTJBOjZCMDRDQTIyIiwidmlzaXRvcl9pZCI6Ijg3MDgwODcxODU2MDMzNDkwMjYiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmacf58da6d6edd832620946e06e48942af61ec138ce7849689f563c0b2ed80929b8
hovercard-subject-tagissue:5042694820
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/IfcOpenShell/IfcOpenShell/9227/issue_layout
twitter:imagehttps://opengraph.githubassets.com/626a08e56504eaefd015c336e4e5aa7c65ed05660e151a21c5cedcf83a26899e/IfcOpenShell/IfcOpenShell/issues/9227
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/626a08e56504eaefd015c336e4e5aa7c65ed05660e151a21c5cedcf83a26899e/IfcOpenShell/IfcOpenShell/issues/9227
og:image:altsrc/bonsai/scripts/dev_environment.py derives the site-packages path from a hardcoded Blender→Python version boundary: BLENDER_VERSION_INT = tuple(map(int, BLENDER_VERSION.split("."))) PYTHON_VERSI...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernametheoryshaw
hostnamegithub.com
expected-hostnamegithub.com
None85dd75377eb77313206b8fc108bcee6a3a029286d94bf32bf9b4426e4d92e0c4
turbo-cache-controlno-preview
go-importgithub.com/IfcOpenShell/IfcOpenShell git https://github.com/IfcOpenShell/IfcOpenShell.git
octolytics-dimension-user_id13692563
octolytics-dimension-user_loginIfcOpenShell
octolytics-dimension-repository_id40473201
octolytics-dimension-repository_nwoIfcOpenShell/IfcOpenShell
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id40473201
octolytics-dimension-repository_network_root_nwoIfcOpenShell/IfcOpenShell
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release0d64fa748a2bab9a5b587a967ac4da1cfa8da6dd
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/IfcOpenShell/IfcOpenShell/issues/9227#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FIfcOpenShell%2FIfcOpenShell%2Fissues%2F9227
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FIfcOpenShell%2FIfcOpenShell%2Fissues%2F9227
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=IfcOpenShell%2FIfcOpenShell
Reloadhttps://github.com/IfcOpenShell/IfcOpenShell/issues/9227
Reloadhttps://github.com/IfcOpenShell/IfcOpenShell/issues/9227
Reloadhttps://github.com/IfcOpenShell/IfcOpenShell/issues/9227
IfcOpenShellhttps://github.com/IfcOpenShell
IfcOpenShellhttps://github.com/IfcOpenShell/IfcOpenShell
Codehttps://github.com/IfcOpenShell/IfcOpenShell
Issues1.2k (1.2k)https://github.com/IfcOpenShell/IfcOpenShell/issues
Pull requests938 (938)https://github.com/IfcOpenShell/IfcOpenShell/pulls
Discussionshttps://github.com/IfcOpenShell/IfcOpenShell/discussions
Actionshttps://github.com/IfcOpenShell/IfcOpenShell/actions
Projectshttps://github.com/IfcOpenShell/IfcOpenShell/projects
Wikihttps://github.com/IfcOpenShell/IfcOpenShell/wiki
Security and qualityhttps://github.com/IfcOpenShell/IfcOpenShell/security
Insightshttps://github.com/IfcOpenShell/IfcOpenShell/insights
https://github.com/IfcOpenShell/IfcOpenShell
New issuehttps://github.com/login?return_to=https://github.com/IfcOpenShell/IfcOpenShell/issues/9227
New issuehttps://github.com/login?return_to=https://github.com/IfcOpenShell/IfcOpenShell/issues/9227
dev_environment.py: detect Blender's bundled Python from disk instead of a hardcoded version boundaryhttps://github.com/IfcOpenShell/IfcOpenShell/issues/9227#top
Bonsaihttps://github.com/IfcOpenShell/IfcOpenShell/issues?q=state%3Aopen%20label%3A%22Bonsai%22
PR Proposedhttps://github.com/IfcOpenShell/IfcOpenShell/issues?q=state%3Aopen%20label%3A%22PR%20Proposed%22
Severity:Minorhttps://github.com/IfcOpenShell/IfcOpenShell/issues?q=state%3Aopen%20label%3A%22Severity%3AMinor%22
https://github.com/theoryshaw
theoryshawhttps://github.com/theoryshaw
on Aug 2, 2026https://github.com/IfcOpenShell/IfcOpenShell/issues/9227#issue-5042694820
d30c250https://github.com/IfcOpenShell/IfcOpenShell/commit/d30c25010c115f2849b611012048f0899280bcc3
7e1843bhttps://github.com/IfcOpenShell/IfcOpenShell/commit/7e1843b96224cd195ac7bcc79ddaa4efbd928083
d30c250https://github.com/IfcOpenShell/IfcOpenShell/commit/d30c25010c115f2849b611012048f0899280bcc3
theoryshawhttps://github.com/theoryshaw
Bonsaihttps://github.com/IfcOpenShell/IfcOpenShell/issues?q=state%3Aopen%20label%3A%22Bonsai%22
on Aug 2, 2026https://github.com/IfcOpenShell/IfcOpenShell/issues/9227#event-28848999851
theoryshawhttps://github.com/theoryshaw
on Aug 2, 2026https://github.com/IfcOpenShell/IfcOpenShell/issues/9227#event-28849183343
theoryshawhttps://github.com/theoryshaw
Severity:Minorhttps://github.com/IfcOpenShell/IfcOpenShell/issues?q=state%3Aopen%20label%3A%22Severity%3AMinor%22
on Aug 2, 2026https://github.com/IfcOpenShell/IfcOpenShell/issues/9227#event-28849183345
https://github.com/theoryshaw
theoryshawhttps://github.com/theoryshaw
on Aug 2, 2026https://github.com/IfcOpenShell/IfcOpenShell/issues/9227#issuecomment-5158323646
d30c250https://github.com/IfcOpenShell/IfcOpenShell/commit/d30c25010c115f2849b611012048f0899280bcc3
theoryshawhttps://github.com/theoryshaw
PR Proposedhttps://github.com/IfcOpenShell/IfcOpenShell/issues?q=state%3Aopen%20label%3A%22PR%20Proposed%22
on Aug 2, 2026https://github.com/IfcOpenShell/IfcOpenShell/issues/9227#event-28849534766
theoryshawhttps://github.com/theoryshaw
on Sep 20, 2026https://github.com/IfcOpenShell/IfcOpenShell/issues/9227#event-31489461204
dev_environment.py: detect Blender's bundled Python from diskhttps://github.com/theoryshaw/IfcOpenShell/commit/6411562b13844e88142a24b66df2a65ff1c948f5
https://docs.github.com/articles/closing-issues-via-commit-messages
6411562https://github.com/theoryshaw/IfcOpenShell/commit/6411562b13844e88142a24b66df2a65ff1c948f5
theoryshawhttps://github.com/theoryshaw
on Oct 2, 2026https://github.com/IfcOpenShell/IfcOpenShell/issues/9227#event-32360176980
dev_environment.py: detect Blender's bundled Python from diskhttps://github.com/theoryshaw/IfcOpenShell/commit/e7c53f1416ac43c4f2a093f2a1bf851fc724a717
https://docs.github.com/articles/closing-issues-via-commit-messages
e7c53f1https://github.com/theoryshaw/IfcOpenShell/commit/e7c53f1416ac43c4f2a093f2a1bf851fc724a717
Sign up for freehttps://github.com/signup?return_to=https://github.com/IfcOpenShell/IfcOpenShell/issues/9227
Sign in to commenthttps://github.com/login?return_to=https://github.com/IfcOpenShell/IfcOpenShell/issues/9227
Bonsaihttps://github.com/IfcOpenShell/IfcOpenShell/issues?q=state%3Aopen%20label%3A%22Bonsai%22
PR Proposedhttps://github.com/IfcOpenShell/IfcOpenShell/issues?q=state%3Aopen%20label%3A%22PR%20Proposed%22
Severity:Minorhttps://github.com/IfcOpenShell/IfcOpenShell/issues?q=state%3Aopen%20label%3A%22Severity%3AMinor%22
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Response headers:
Servergithub.com
Content-Typetext/html; charset=utf-8
Cache-Controlmax-age=0, private, must-revalidate

Viewport: width=device-width


URLs of crawlers that visited me.