Title: Fix/findpython development embed by RyanPaulMcKenna · Pull Request #565 · sofa-framework/SofaPython3 · GitHub
Open Graph Title: Fix/findpython development embed by RyanPaulMcKenna · Pull Request #565 · sofa-framework/SofaPython3
X Title: Fix/findpython development embed by RyanPaulMcKenna · Pull Request #565 · sofa-framework/SofaPython3
Description: Title: Fix Python::Python missing when building bindings via SP3_add_python_module (CMake FindPython Development.Embed) Summary This PR fixes a CMake configuration/build failure seen when downstream plugins (e.g. Cosserat) use SofaPython3’s SP3_add_python_module() helper and it internally calls python_add_library(). Problem On newer CMake/FindPython (observed with CMake 3.28 + Python 3.12 on Ubuntu), python_add_library() requires the imported target Python::Python to be defined. In some configurations, Python::Python is not created because find_package(Python … COMPONENTS Development.Embed …) was never requested, leading to: Python_ADD_LIBRARY: dependent target 'Python::Python' is not defined. Did you miss to request COMPONENT 'Development.Embed'? This then causes a cascade (e.g. missing CosseratBindings alias target). Solution Make SP3_add_python_module() self-contained by ensuring Python::Python exists before calling python_add_library(): If Python::Python is not already defined, explicitly call: find_package(Python REQUIRED COMPONENTS Interpreter Development Development.Module Development.Embed) This guarantees the required Python::Python target is present and prevents downstream projects from needing to add extra FindPython boilerplate. Testing Tested locally by building SOFA with SofaPython3 and the Cosserat plugin bindings enabled. After applying this change: CMake configure completes successfully (no Python::Python / Development.Embed error) Build and install succeed Example scenes run as expected.
Open Graph Description: Title: Fix Python::Python missing when building bindings via SP3_add_python_module (CMake FindPython Development.Embed) Summary This PR fixes a CMake configuration/build failure seen when downstrea...
X Description: Title: Fix Python::Python missing when building bindings via SP3_add_python_module (CMake FindPython Development.Embed) Summary This PR fixes a CMake configuration/build failure seen when downstrea...
Opengraph URL: https://github.com/sofa-framework/SofaPython3/pull/565
X: @github
Domain: patch-diff.githubusercontent.com
| route-pattern | /:user_id/:repository/pull/:id/checks(.:format) |
| route-controller | pull_requests |
| route-action | checks |
| fetch-nonce | v2:f362a865-72fe-8def-ff5c-5309db969c0c |
| current-catalog-service-hash | 87dc3bc62d9b466312751bfd5f889726f4f1337bdff4e8be7da7c93d6c00a25a |
| request-id | C86C:BD9D0:DC451A:1218BB7:697D3C38 |
| html-safe-nonce | dfaeb1c5d7c4d6c1e7bd817e65ce042d88bb25b9e6491ff9d7768a0802bf99cf |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDODZDOkJEOUQwOkRDNDUxQToxMjE4QkI3OjY5N0QzQzM4IiwidmlzaXRvcl9pZCI6IjE3MjYxNDkwNDE2NTkzOTUxMjgiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | c1b8e30e6988affcb9a6b4db5e083d58902814eb24788e09563c527256a5a4a5 |
| hovercard-subject-tag | pull_request:3178915453 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,checks,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/sofa-framework/SofaPython3/pull/565/checks |
| twitter:image | https://avatars.githubusercontent.com/u/13259735?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/13259735?s=400&v=4 |
| og:image:alt | Title: Fix Python::Python missing when building bindings via SP3_add_python_module (CMake FindPython Development.Embed) Summary This PR fixes a CMake configuration/build failure seen when downstrea... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 60279d4097367e16897439d16d6bbe4180663db828c666eeed2656988ffe59f6 |
| turbo-cache-control | no-preview |
| go-import | github.com/sofa-framework/SofaPython3 git https://github.com/sofa-framework/SofaPython3.git |
| octolytics-dimension-user_id | 11028508 |
| octolytics-dimension-user_login | sofa-framework |
| octolytics-dimension-repository_id | 260159147 |
| octolytics-dimension-repository_nwo | sofa-framework/SofaPython3 |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 260159147 |
| octolytics-dimension-repository_network_root_nwo | sofa-framework/SofaPython3 |
| turbo-body-classes | logged-out env-production page-responsive full-width full-width-p-0 |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | c2b1f969137add620c89ee43eff21bca11243467 |
| ui-target | canary-2 |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width