Python bindings for the wood C++ library using nanobind.
| CI | status |
|---|---|
| Build | |
| Release |
pip install wood_nanoimport wood_nano as m
print(m.add(1, 2))All C++ dependencies (CGAL, Boost, Eigen, etc.) are downloaded automatically by CMake.
git clone --recursive https://github.com/petrasvestartas/wood_nano.git
cd wood_nano
pip install uv
uv venv .venv
.venv\Scripts\activate
uv pip install -r requirements-dev.txt
uv pip install --no-build-isolation -ve .git clone --recursive https://github.com/petrasvestartas/wood_nano.git
cd wood_nano
pip install uv
uv venv .venv
source .venv/bin/activate
uv pip install -r requirements-dev.txt
uv pip install --no-build-isolation -ve .git clone --recursive https://github.com/petrasvestartas/wood_nano.git
cd wood_nano
pip install uv
uv venv .venv
source .venv/bin/activate
uv pip install -r requirements-dev.txt
uv pip install --no-build-isolation -ve .python -c "import wood_nano as m; print(m.add(1, 2))"Releases are automated via GitHub Actions using trusted publishing.
One-time setup (PyPI):
- Go to https://pypi.org/manage/account/publishing/
- Add pending publisher:
- Project:
wood_nano - Owner:
petrasvestartas - Repository:
wood_nano - Workflow:
release.yml
- Project:
To publish a new version:
-
Update the version number in
src/wood_nano/__init__.py:__version__ = "0.3.0" # Change to new version
-
Commit the version change:
git add src/wood_nano/__init__.py git commit -m "Bump version to 0.3.0" git push -
Create and push the tag:
git tag v0.3.0 git push origin v0.3.0
This triggers the release workflow which builds wheels for all platforms and publishes to PyPI.
Update wood submodule:
git submodule update --init --recursiveClean rebuild:
rm -rf build .deps
pip install --no-build-isolation -ve .