File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1010from contextlib import contextmanager
1111from pathlib import Path
1212
13+ import nanobind
14+
1315
1416# https://github.com/diegoferigo/cmake-build-extension/blob/master/src/cmake_build_extension/__init__.py
1517@contextmanager
@@ -76,7 +78,5 @@ def __generate_si():
7678
7779__version__ = importlib .metadata .version (__package__ )
7880
79- import nanobind
80-
81- meta_cls = type (_PyPartMC .AeroData )
82- setattr (nanobind , "nb_type_0" , meta_cls )
81+ # walkaround for MATLAB bindings
82+ setattr (nanobind , "nb_type_0" , type (_PyPartMC .AeroData ))
Original file line number Diff line number Diff line change 1212#include " nanobind/stl/tuple.h"
1313#include " nanobind/stl/detail/nb_optional.h"
1414#include " nanobind/ndarray.h"
15- #undef snprintf
15+ #undef snprintf // required to fix an issue with std::snprintf in nlohmann::json
1616#include " nlohmann/json.hpp"
1717#include " nanobind_json/nanobind_json.hpp"
1818#include " sundials/sundials_config.h"
You can’t perform that action at this time.
0 commit comments