Update nanobind pin to most recent version (#2896)

This commit is contained in:
Nathan Goldbaum
2025-12-11 07:07:36 -07:00
committed by GitHub
parent 3c8ce9b00e
commit e1fee0074b
9 changed files with 10 additions and 10 deletions

View File

@@ -11,7 +11,7 @@ runs:
shell: bash -l {0} shell: bash -l {0}
run: | run: |
pip install --upgrade pip pip install --upgrade pip
pip install cmake setuptools nanobind==2.4.0 pip install cmake setuptools nanobind==2.10.2
pip install -e . -v pip install -e . -v
- name: Generate package stubs - name: Generate package stubs

View File

@@ -36,7 +36,7 @@ runs:
run: | run: |
python -m venv .venv python -m venv .venv
source .venv/bin/activate source .venv/bin/activate
pip install setuptools cmake nanobind==2.4.0 pip install setuptools cmake nanobind==2.10.2
echo PATH=$PATH >> $GITHUB_ENV echo PATH=$PATH >> $GITHUB_ENV
# Make cmake search .venv for nanobind # Make cmake search .venv for nanobind
echo PYTHONPATH=`python -c 'import sys; print(sys.path[-1])'` >> $GITHUB_ENV echo PYTHONPATH=`python -c 'import sys; print(sys.path[-1])'` >> $GITHUB_ENV

View File

@@ -95,7 +95,7 @@ jobs:
shell: bash -l {0} shell: bash -l {0}
run: | run: |
pip install --upgrade pip pip install --upgrade pip
pip install cmake setuptools nanobind==2.4.0 pip install cmake setuptools nanobind==2.10.2
pip install -e . -v pip install -e . -v
- name: Generate package stubs - name: Generate package stubs
shell: bash -l {0} shell: bash -l {0}

View File

@@ -3,6 +3,6 @@ requires = [
"setuptools>=42", "setuptools>=42",
"cmake>=3.25", "cmake>=3.25",
"mlx>=0.18.0", "mlx>=0.18.0",
"nanobind==2.4.0", "nanobind==2.10.2",
] ]
build-backend = "setuptools.build_meta" build-backend = "setuptools.build_meta"

View File

@@ -1,4 +1,4 @@
setuptools>=42 setuptools>=42
cmake>=3.25 cmake>=3.25
mlx>=0.21.0 mlx>=0.21.0
nanobind==2.4.0 nanobind==2.10.2

View File

@@ -1,7 +1,7 @@
[build-system] [build-system]
requires = [ requires = [
"setuptools>=80", "setuptools>=80",
"nanobind==2.4.0", "nanobind==2.10.2",
"cmake>=3.25", "cmake>=3.25",
] ]
build-backend = "setuptools.build_meta" build-backend = "setuptools.build_meta"

View File

@@ -89,7 +89,8 @@ static PyType_Spec gc_func_spec = {
/* .name = */ "mlx.gc_func", /* .name = */ "mlx.gc_func",
/* .basicsize = */ (int)sizeof(gc_func), /* .basicsize = */ (int)sizeof(gc_func),
/* .itemsize = */ 0, /* .itemsize = */ 0,
/* .flags = */ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | NB_HAVE_VECTORCALL, /* .flags = */ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC |
Py_TPFLAGS_HAVE_VECTORCALL,
/* .slots = */ gc_func_slots}; /* .slots = */ gc_func_slots};
static PyTypeObject* gc_func_tp = nullptr; static PyTypeObject* gc_func_tp = nullptr;

View File

@@ -16,8 +16,7 @@ struct type_caster<mlx::core::SmallVector<Type, Size, Alloc>> {
NB_TYPE_CASTER( NB_TYPE_CASTER(
List, List,
const_name(NB_TYPING_TUPLE "[") + make_caster<Type>::Name + const_name("tuple[") + make_caster<Type>::Name + const_name(", ...]"))
const_name(", ...]"))
bool from_python(handle src, uint8_t flags, cleanup_list* cleanup) noexcept { bool from_python(handle src, uint8_t flags, cleanup_list* cleanup) noexcept {
size_t size; size_t size;

View File

@@ -255,7 +255,7 @@ if __name__ == "__main__":
extras = { extras = {
"dev": [ "dev": [
"nanobind==2.4.0", "nanobind==2.10.2",
"numpy", "numpy",
"pre-commit", "pre-commit",
"setuptools>=80", "setuptools>=80",