Skip to content

Commit f66cffa

Browse files
authored
Use uv cache to trigger rebuilds on change (#106)
1 parent 3c42dec commit f66cffa

3 files changed

Lines changed: 6 additions & 2 deletions

File tree

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
cmake_minimum_required(VERSION 3.15...3.27)
1+
cmake_minimum_required(VERSION 3.15)
22
project(${SKBUILD_PROJECT_NAME} LANGUAGES C)
33

44
# Find Python

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ Conversion is handled by a [Rust binary](https://github.com/urschrei/rust_bng) u
1313
1. Ensure you have a copy of `liblonlat_bng` and `header.h` from https://github.com/urschrei/lonlat_bng/releases, and it's in the `src/convertbng` subdir
1414
2. run `uv sync --dev`
1515
3. run `pytest .`
16-
4. If you make changes, you must rebuild the extension: `uv sync --reinstall`
16+
17+
Changes in `pyx` and `pxd` files, and the Rust library and header will bust the cache, triggering a rebuild when `uv` commands are run.
1718

1819
### Supported Python Versions
1920
Simplification supports all [_currently_ supported Python versions](https://devguide.python.org/versions/).

pyproject.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,9 @@ requires = [
4747
]
4848
build-backend = "scikit_build_core.build"
4949

50+
[tool.uv]
51+
cache-keys = [{ file = "pyproject.toml" }, { file = "src/**/*.{h,c,pyx,pxd,dylib,so,dll}" }, { file = "CMakeLists.txt" }]
52+
5053
[tool.pytest.ini_options]
5154
minversion = "8.4.1"
5255
addopts = [

0 commit comments

Comments
 (0)