build: pybind11 via FetchContent + bindings/python/ module#29
Merged
Merged
Conversation
- Add OPENTRIM_BUILD_PYTHON option (default ON) - Fetch pybind11 v3.0.4 via FetchContent - Add bindings/python CMake module for _opentrim_core - Co-install libopentrim and xs_* into opentrim package under SKBUILD - Set $ORIGIN RPATH so packaged libs resolve from the package dir - Skeleton PYBIND11_MODULE reads version from mcdriver::version_info() - Add opentrim/__init__.py re-exporting __version__ - Add pyproject.toml with scikit-build-core backend - Print OPENTRIM_BUILD_PYTHON in CMake summary Tested: pip install -e . --no-build-isolation python -c "import opentrim; print(opentrim.__version__)" # 1.1.2 ldd: _opentrim_core -> libopentrim -> xs_* all resolve from site-packages/opentrim
Member
|
Nice work @dhanavanthesh ! Keep it up! |
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.
build: pybind11 via FetchContent + bindings/python module skeleton
Delivers A-1 from the GSoC2026 Python bindings plan.
What this adds
OPENTRIM_BUILD_PYTHONCMake option (default ON)bindings/python/directory with_opentrim_coreextension module skeletonpyproject.tomlfor pip installs via scikit-build-corelibopentrimandxs_*into the Python package dir with$ORIGINRPATH so private libs resolve fromsite-packages/opentrim/__version__reads frommcdriver::version_info(), giving the extension a real runtime dependency on libopentrimOPENTRIM_BUILD_PYTHONTested
Ubuntu 24.04, Python 3.12: