Title: identify build platform and python version from _ifcopenshell_wrapper.pyd/.so · Issue #4686 · IfcOpenShell/IfcOpenShell · GitHub
Open Graph Title: identify build platform and python version from _ifcopenshell_wrapper.pyd/.so · Issue #4686 · IfcOpenShell/IfcOpenShell
X Title: identify build platform and python version from _ifcopenshell_wrapper.pyd/.so · Issue #4686 · IfcOpenShell/IfcOpenShell
Description: Any ideas if it's possible to identify build's python version and platform from _ifcopenshell_wrapper.pyd on Windows or _ifcopenshell_wrapper.so on Mac/Linux)? The idea is to get more descriptive error messages instead of ImportError: If...
Open Graph Description: Any ideas if it's possible to identify build's python version and platform from _ifcopenshell_wrapper.pyd on Windows or _ifcopenshell_wrapper.so on Mac/Linux)? The idea is to get more descriptive e...
X Description: Any ideas if it's possible to identify build's python version and platform from _ifcopenshell_wrapper.pyd on Windows or _ifcopenshell_wrapper.so on Mac/Linux)? The idea is to get more descr...
Opengraph URL: https://github.com/IfcOpenShell/IfcOpenShell/issues/4686
X: @github
Domain: github.com
IPv4 address: 140.82.114.3
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"identify build platform and python version from _ifcopenshell_wrapper.pyd/.so","articleBody":"Any ideas if it's possible to identify build's python version and platform from `_ifcopenshell_wrapper.pyd` on Windows or `_ifcopenshell_wrapper.so` on Mac/Linux)?\r\n\r\nThe idea is to get more descriptive error messages instead of `ImportError: IfcOpenShell not built for 'windows\\64bit\\python3.11'` to guide non-advanced BlenderBIM users who can e.g. download macos instead of macom1 builds or try to use wrong python version.\r\n\r\nThe error importing wrong python version module doesn't have that information:\r\n\r\n```python\r\nimport importlib.util\r\nimport sys\r\n\r\nspec = importlib.util.spec_from_file_location(\"_ifcopenshell_wrapper\", r\"py310\\_ifcopenshell_wrapper.pyd\")\r\nfoo = importlib.util.module_from_spec(spec)\r\nsys.modules[\"module.name\"] = foo\r\n# ImportError: DLL load failed while importing _ifcopenshell_wrapper: The specified module could not be found.\r\nspec.loader.exec_module(foo)\r\n```\r\n\r\nOr maybe just add this information to `ifcopenshell/__init__.py` (or save it to a separate file) during build?\r\n\r\nI was thinking that maybe we could just add it to `bl_info` for BlenderBIM during the build but it seems that it should be stored somewhere with ifcopenshell.\r\n\r\nhttps://github.com/IfcOpenShell/IfcOpenShell/blob/8662e20c58a824f1ba6d8a6d7928b4284e41766f/src/blenderbim/blenderbim/__init__.py#L34","author":{"url":"https://github.com/Andrej730","@type":"Person","name":"Andrej730"},"datePublished":"2024-05-17T13:11:35Z","url":"https://github.com/IfcOpenShell/IfcOpenShell/issues/4686"}
| react-profiling | 0 |
| react-import-map | react,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-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:48f1ec2d-923a-51cf-53b1-f39e144f7491 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B164:E63B3:693F3:9136C:6B04AEA2 |
| html-safe-nonce | d166435194af57950d252b4d3a64248a89549e259969166d8b977180c9ef666d |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCMTY0OkU2M0IzOjY5M0YzOjkxMzZDOjZCMDRBRUEyIiwidmlzaXRvcl9pZCI6IjQ0ODMzODc2OTA4MjI0MTYyIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | bb9a1299d6719db4e47358f0d23b27b57d9391e9dde01f3f83c8438e369467f7 |
| hovercard-subject-tag | issue:2302718949 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/IfcOpenShell/IfcOpenShell/4686/issue_layout |
| twitter:image | https://opengraph.githubassets.com/02988bb67d3298e27c4e1bb65e13ee50ec006c1a9a864128ceb85ffb0c0d4160/IfcOpenShell/IfcOpenShell/issues/4686 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/02988bb67d3298e27c4e1bb65e13ee50ec006c1a9a864128ceb85ffb0c0d4160/IfcOpenShell/IfcOpenShell/issues/4686 |
| og:image:alt | Any ideas if it's possible to identify build's python version and platform from _ifcopenshell_wrapper.pyd on Windows or _ifcopenshell_wrapper.so on Mac/Linux)? The idea is to get more descriptive e... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | Andrej730 |
| hostname | github.com |
| expected-hostname | github.com |
| None | f1d110ea058a0915c1d8aa3fc2069fa15801e128f591e5762525abe77490ecb1 |
| turbo-cache-control | no-preview |
| go-import | github.com/IfcOpenShell/IfcOpenShell git https://github.com/IfcOpenShell/IfcOpenShell.git |
| octolytics-dimension-user_id | 13692563 |
| octolytics-dimension-user_login | IfcOpenShell |
| octolytics-dimension-repository_id | 40473201 |
| octolytics-dimension-repository_nwo | IfcOpenShell/IfcOpenShell |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 40473201 |
| octolytics-dimension-repository_network_root_nwo | IfcOpenShell/IfcOpenShell |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | ffa22a65e4c46d376940fe34b05e6a7e9c7fdb9b |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width