Repository navigation
Expand file tree
/
Copy pathmcpp.toml
More file actions
75 lines (61 loc) · 2.36 KB
/
Copy pathmcpp.toml
File metadata and controls
75 lines (61 loc) · 2.36 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
73
74
75
# Module wrapper; upstream API preserved. Policy: mcpp-index/docs/mwrap.md.
[package]
namespace = "mcpplibs.mwrap"
name = "nanobind"
version = "3.1.0"
description = "nanobind 3.1.0 C++ modules for mcpp (import mcpplibs.mwrap.nanobind;): the binding API, its STL casters, ndarray/DLPack support and operator helpers over compat.nanobind"
license = "Apache-2.0"
authors = ["mcpp-community"]
repo = "https://github.com/mcpplibs/nanobind-m"
platforms = ["linux", "macos", "windows"]
[targets.nanobind]
kind = "lib"
[modules]
exports = [
"mcpplibs.mwrap.nanobind",
"mcpplibs.mwrap.nanobind._core",
"mcpplibs.mwrap.nanobind.macros",
"mcpplibs.mwrap.nanobind.stl",
"mcpplibs.mwrap.nanobind.ndarray",
]
[features]
default = ["runtime"]
# The one translation unit compat.nanobind documents: its generated forwarder
# includes the matching upstream src/nb_combined.cpp.
runtime = { sources = ["src/nb_runtime.cpp"], description = "Compile the nanobind runtime into this package" }
# Compile-time only: the package's own tests are embedded executables, so they
# link the Python SDK here without ever adding a link edge to a consumer. The
# support module lives outside src/ so [build] sources never scans it.
tests = { sources = ["tests/support/python_embed.cppm"], description = "Build and link this package's embedded-Python tests" }
[test]
features = ["tests"]
[build]
sources = ["src/*.cppm"]
# <mwrap/nanobind/macros.hpp>: the upstream macros a named module cannot export.
include_dirs = ["include"]
[dependencies]
compat.nanobind = "3.1.0"
[dev-dependencies]
mcpplibs.mtest = "0.11.3"
[package.metadata.mwrap]
upstream-version = "3.1.0"
# The Python SDK used to compile the module interface and the runtime. A
# consumer's nearer declaration wins; MCPP_PYTHON_INCLUDE_DIR overrides this
# discovery entirely (see docs/usage.md).
[xlings.workspace]
"xim:python" = "3.13.12"
[[runtime.deploy]]
from = "LICENSE"
to = "licenses/nanobind"
[[runtime.deploy]]
from = "NOTICE"
to = "licenses/nanobind"
[[runtime.deploy]]
from = "upstream/nanobind/README.md"
to = "licenses/nanobind/upstream/nanobind"
[[runtime.deploy]]
from = "upstream/nanobind/LICENSE"
to = "licenses/nanobind/upstream/nanobind"
# <windows.h> reaches the Python SDK headers with min/max macros otherwise.
[target.'cfg(windows)'.build]
cxxflags = ["-DNOMINMAX", "-DWIN32_LEAN_AND_MEAN"]