This repository was archived by the owner on Jun 19, 2026. It is now read-only.
Repository navigation
Expand file tree
/
Copy pathpyproject.toml
More file actions
72 lines (67 loc) · 2.34 KB
/
Copy pathpyproject.toml
File metadata and controls
72 lines (67 loc) · 2.34 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
[build-system]
requires = [
"scikit-build-core>=0.10",
"pybind11>=3.0.1",
# CasADi is pip-installable from PyPI on Windows, but finding the libcasadi.so path is
# finicky, so we prefer the vcpkg registry for Windows builds.
"casadi==3.7.2; platform_system!='Windows'",
# Note: the version of CasADi as a build-time dependency should be matched
# cross platforms, so updates to its minimum version here should be accompanied
# by a version bump in https://github.com/pybamm-team/casadi-vcpkg-registry.
]
build-backend = "scikit_build_core.build"
[project]
name = "pybammsolvers"
description = "Python interface for the IDAKLU solver"
requires-python = ">=3.10,<3.15"
license-files = ["LICENSE"]
readme = "README.md"
dynamic = ["version"]
dependencies = [
"casadi==3.7.2",
"numpy",
]
[project.optional-dependencies]
dev = [
"nox[uv]",
"pytest",
"pytest-cov",
"psutil>=7.1.0",
"wheel",
# Duplicated from [build-system].requires so editable.auto-rebuild has
# build tools available in the venv.
"scikit-build-core>=0.10",
"pybind11>=3.0.1",
"cmake>=3.13",
"ninja",
]
[tool.scikit-build]
cmake.version = ">=3.13"
build-dir = "build/{wheel_tag}"
wheel.packages = ["src/pybammsolvers"]
# C++ sources are compiled into the .so; they don't need to ship in the wheel.
wheel.exclude = ["pybammsolvers/idaklu.cpp", "pybammsolvers/idaklu_source/**"]
editable.mode = "redirect"
editable.rebuild = true
metadata.version.provider = "scikit_build_core.metadata.regex"
metadata.version.input = "src/pybammsolvers/version.py"
metadata.version.regex = '''__version__\s*=\s*["'](?P<value>[^"']+)["']'''
# SUNDIALS/SuiteSparse are NOT vendored (would add ~400MB); source installs
# need either system packages or `git submodule update --init`.
[tool.scikit-build.sdist]
include = [
"CMakeLists.txt",
"FindSuiteSparse.cmake",
"FindSUNDIALS.cmake",
"src/pybammsolvers/idaklu_source/**/*.hpp",
"src/pybammsolvers/idaklu_source/**/*.cpp",
"src/pybammsolvers/idaklu_source/**/*.inl",
"src/pybammsolvers/idaklu.cpp",
"install_KLU_Sundials.py",
"vcpkg.json",
"vcpkg-configuration.json",
]
# Prevent uv's ephemeral build venv from being torn down between CMake configure
# and auto-rebuild (which bakes absolute paths into CMakeCache.txt).
[tool.uv]
no-build-isolation-package = ["pybammsolvers"]