File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 8888 type : string
8989 build_local_deps :
9090 type : string
91- # When set (e.g. `both`), CMake builds pybind11 and/or nanobind per OIIO
92- # docs; dependency scripts install the `nanobind` pip package when needed.
9391 oiio_python_bindings_backend :
9492 type : string
9593 default : ' '
Original file line number Diff line number Diff line change 1+ # CI-only: nanobind for CMake (`python -m nanobind --cmake_dir`). Used on Linux
2+ # (gh-installdeps) and Windows (gh-win-installdeps) with pip --require-hashes.
3+ # macOS CI uses `brew install nanobind` instead (install_homebrew_deps.bash).
4+ # When bumping pip pin: https://pypi.org/pypi/nanobind/<ver>/json → wheel sha256.
5+ nanobind==2.12.0 \
6+ --hash=sha256:a10d3d88e691dcdf22696f9acd893fda3c5a05635763aea238829d274fcad480
Original file line number Diff line number Diff line change @@ -231,11 +231,13 @@ df -h .
231231df -h /host/root || true
232232
233233# nanobind's CMake config is discovered via `python -m nanobind --cmake_dir`.
234+ # Version + wheel hash: src/build-scripts/ci-requirements-nanobind.txt (CodeQL / supply chain).
234235if [[ " ${OIIO_PYTHON_BINDINGS_BACKEND:- } " == " both" || " ${OIIO_PYTHON_BINDINGS_BACKEND:- } " == " nanobind" ]] ; then
236+ _oiio_nanobind_requirements_file=" $PWD /src/build-scripts/ci-requirements-nanobind.txt"
235237 if [[ " $ASWF_ORG " != " " ]] ; then
236- time pip3 install nanobind || true
238+ time pip3 install -r " $_oiio_nanobind_requirements_file " --require-hashes || true
237239 else
238- time pip3${PIP_SUFFIX} install nanobind
240+ time pip3${PIP_SUFFIX} install -r " $_oiio_nanobind_requirements_file " --require-hashes
239241 fi
240242fi
241243
Original file line number Diff line number Diff line change 4040pip install numpy
4141
4242if [[ " ${OIIO_PYTHON_BINDINGS_BACKEND:- } " == " both" || " ${OIIO_PYTHON_BINDINGS_BACKEND:- } " == " nanobind" ]] ; then
43- " ${Python_EXECUTABLE:- python} " -m pip install nanobind
43+ _oiio_nanobind_requirements_file=" $PWD /src/build-scripts/ci-requirements-nanobind.txt"
44+ " ${Python_EXECUTABLE:- python} " -m pip install -r " $_oiio_nanobind_requirements_file " --require-hashes
4445fi
4546
4647
Original file line number Diff line number Diff line change @@ -57,17 +57,16 @@ if [[ "$OIIO_BREW_INSTALL_PACKAGES" == "" ]] ; then
5757 if [[ " ${USE_QT:= 1} " != " 0" ]] && [[ " ${INSTALL_QT:= 1} " != " 0" ]] ; then
5858 OIIO_BREW_INSTALL_PACKAGES+=" qt${QT_VERSION} "
5959 fi
60+ if [[ " ${OIIO_PYTHON_BINDINGS_BACKEND:- } " == " both" || " ${OIIO_PYTHON_BINDINGS_BACKEND:- } " == " nanobind" ]] ; then
61+ OIIO_BREW_INSTALL_PACKAGES+=" nanobind"
62+ fi
6063fi
6164brew install --display-times -q $OIIO_BREW_INSTALL_PACKAGES $OIIO_BREW_EXTRA_INSTALL_PACKAGES || true
6265
6366echo " "
6467echo " After brew installs:"
6568brew list --versions
6669
67- if [[ " ${OIIO_PYTHON_BINDINGS_BACKEND:- } " == " both" || " ${OIIO_PYTHON_BINDINGS_BACKEND:- } " == " nanobind" ]] ; then
68- python3 -m pip install nanobind
69- fi
70-
7170# Set up paths. These will only affect the caller if this script is
7271# run with 'source' rather than in a separate shell.
7372export PATH=${HOMEBREW_PREFIX} /opt/qt5/bin:$PATH
You can’t perform that action at this time.
0 commit comments