Skip to content

Commit 87aab13

Browse files
committed
deps: test against pybind11 3.0 and minor fixes (#2007)
Add pybind11 3.0 to the CI test matrix. Found a place where we defined a python method twice, fixed that. Ran into some trouble where the Mac runners which used a pre-built OIIO supplied by Homebrew, and apparently compiled against pybind11 2.x. I think maybe there are some corner cases where if you have two python modules that share types (TypeDesc and a few more, in this case), they should not be built with pre-3.0 and post-3.0 versions of pybind11? The quick fix was to switch to having OSL CI on Mac just build an OIIO from scratch to ensure that it was using the same pybind11. But that identified yet another problem (which I also think is a runner issue) that required some minor adjustment to how OIIO auto-builds libpng. There is a patch in review on the OIIO side for this. But since that's not merged yet, I have doctored this PR to pull OIIO from my own fork, the branch containing the fix, just to show that it works. After the merge on the OIIO side, I will remove those customizations from here before this PR is merged. (And delete this paragraph.) --------- Signed-off-by: Larry Gritz <[email protected]>
1 parent 29cd6ee commit 87aab13

File tree

4 files changed

+8
-9
lines changed

4 files changed

+8
-9
lines changed

.github/workflows/ci.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -424,7 +424,7 @@ jobs:
424424
opencolorio_ver: v2.4.2
425425
openexr_ver: v3.3.3
426426
openimageio_ver: release
427-
pybind11_ver: v2.13.6
427+
pybind11_ver: v3.0.0
428428
python_ver: "3.12"
429429
simd: avx2,f16c
430430
batched: b8_AVX2,b8_AVX512,b16_AVX512
@@ -460,7 +460,7 @@ jobs:
460460
opencolorio_ver: v2.2.1
461461
openexr_ver: v3.1.11
462462
openimageio_ver: release
463-
pybind11_ver: v2.9.2
463+
pybind11_ver: v2.13.6
464464
python_ver: "3.10"
465465
simd: avx2,f16c
466466
batched: b8_AVX2,b8_AVX512,b16_AVX512
@@ -532,22 +532,23 @@ jobs:
532532
cc_compiler: clang
533533
cxx_compiler: clang++
534534
cxx_std: 17
535+
openimageio_ver: dev-3.0
535536
python_ver: "3.13"
536537
aclang: 14
537538
ctest_test_timeout: 120
538539
setenvs: export HOMEBREW_PREFIX=/usr/local
539-
EXTRA_BREW_PACKAGES="openimageio"
540540
LLVMBREWVER="@17"
541+
USE_OPENVDB=0
541542
- desc: MacOS-14-ARM llvm19 oiio-release
542543
runner: macos-14
543544
nametag: macos14-arm-p313
544545
cc_compiler: clang
545546
cxx_compiler: clang++
546547
cxx_std: 17
548+
openimageio_ver: main
547549
python_ver: "3.13"
548550
aclang: 15
549-
setenvs: export EXTRA_BREW_PACKAGES="openimageio"
550-
LLVMBREWVER="@19"
551+
setenvs: export LLVMBREWVER="@19"
551552
- desc: MacOS-15-ARM aclang16/C++17/py3.13 llvm19 oiio-main
552553
runner: macos-15
553554
nametag: macos15-arm-py313

INSTALL.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ NEW or CHANGED minimum dependencies since the last major release are **bold**.
7070
* (optional) Python: If you are building the Python bindings or running the
7171
testsuite:
7272
* **Python >= 3.7** (tested through 3.13)
73-
* **pybind11 >= 2.7** (tested through 2.13)
73+
* **pybind11 >= 2.7** (tested through 3.0)
7474
* NumPy (tested through 2.2.4)
7575
* (optional) Qt5 >= 5.6 or Qt6 (tested Qt5 through 5.15 and Qt6 through 6.8).
7676
If not found at build time, the `osltoy` application will be disabled.

src/build-scripts/build_openimageio.bash

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ OPENIMAGEIO_CXXFLAGS=${OPENIMAGEIO_CXXFLAGS:=""}
2222
BASEDIR=$PWD
2323

2424
pwd
25-
echo "Building OpenImageIO ${OPENIMAGEIO_VERSION}"
2625
echo "OpenImageIO build dir will be: ${OPENIMAGEIO_BUILD_DIR}"
2726
echo "OpenImageIO install dir will be: ${OPENIMAGEIO_INSTALL_DIR}"
2827
echo "OpenImageIO Build type is ${OPENIMAGEIO_BUILD_TYPE}"
@@ -39,7 +38,7 @@ mkdir -p ${OPENIMAGEIO_BUILD_DIR} && true
3938
pushd $OPENIMAGEIO_SOURCE_DIR
4039
git fetch --all -p
4140
git checkout $OPENIMAGEIO_VERSION --force
42-
echo "Building OpenImageIO from commit" `git rev-parse --short HEAD`
41+
echo "Building OpenImageIO from ${OPENIMAGEIO_REPO} / ${OPENIMAGEIO_VERSION} @ commit" `git rev-parse --short HEAD`
4342

4443
if [[ "$USE_SIMD" != "" ]] ; then
4544
OPENIMAGEIO_CMAKE_FLAGS+=" -DUSE_SIMD=$USE_SIMD"

src/liboslquery/py_osl.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ declare_oslqueryparam(py::module& m)
3030
.def_readwrite("varlenarray", &Parameter::varlenarray)
3131
.def_readwrite("isstruct", &Parameter::isstruct)
3232
.def_readwrite("isclosure", &Parameter::isclosure)
33-
.def_readwrite("type", &Parameter::type)
3433
.def_property_readonly(
3534
"value",
3635
[](const Parameter& p) {

0 commit comments

Comments
 (0)