Skip to content

Commit 02b1660

Browse files
authored
chore: advertise and enable the possibility of build caching (#28)
1 parent 7d9d00d commit 02b1660

File tree

3 files changed

+13
-3
lines changed

3 files changed

+13
-3
lines changed

CMakeLists.txt

+6-2
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,12 @@ if (NOT SKBUILD)
1717
in your environment once and use the following command that avoids
1818
a costly creation of a new virtual environment at every compilation:
1919
=====================================================================
20-
$ pip install --no-build-isolation -v .
21-
=====================================================================")
20+
$ pip install nanobind scikit-build-core[pyproject]
21+
$ pip install --no-build-isolation -ve .
22+
=====================================================================
23+
You can optionally add -Ceditable.rebuild=true to auto-rebuild when you
24+
import. Otherwise, you need to rerun the above command when you edit C++ files.
25+
")
2226
endif()
2327

2428
# Try to import all Python components potentially needed by nanobind

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ This repository contains a tiny project showing how to create C++ bindings
1616
using [nanobind](https://github.com/wjakob/nanobind) and
1717
[scikit-build-core](https://scikit-build-core.readthedocs.io/en/latest/index.html). It
1818
was derived from the corresponding _pybind11_ [example
19-
project](https://github.com/pybind/cmake_example/) developed by
19+
project](https://github.com/pybind/scikit_build_example/) developed by
2020
[@henryiii](https://github.com/henryiii).
2121

2222
Installation

pyproject.toml

+6
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,12 @@ Homepage = "https://github.com/wjakob/nanobind_example"
2020

2121

2222
[tool.scikit-build]
23+
# Protect the configuration against future changes in scikit-build-core
24+
minimum-version = "0.4"
25+
26+
# Setuptools-style build caching in a local directory
27+
build-dir = "build/{wheel_tag}"
28+
2329
# Build stable ABI wheels for CPython 3.12+
2430
wheel.py-api = "cp312"
2531

0 commit comments

Comments
 (0)