Skip to content

Conversation

@lgritz
Copy link
Collaborator

@lgritz lgritz commented Jul 20, 2025

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.

lgritz added 2 commits July 20, 2025 07:48
Add pybind 3.0 to the CI test matrix.

Found a place where we defined a python method wice, 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]>
Signed-off-by: Larry Gritz <[email protected]>
@lgritz
Copy link
Collaborator Author

lgritz commented Jul 23, 2025

I will merge this change tomorrow unless there are objections -- it's needed to fix a CI break.

@lgritz
Copy link
Collaborator Author

lgritz commented Jul 24, 2025

No objections -> merging to fix broken Mac CI.

@lgritz lgritz merged commit d6e4979 into AcademySoftwareFoundation:main Jul 24, 2025
24 of 26 checks passed
@lgritz lgritz deleted the lg-pybind11 branch July 25, 2025 16:19
lgritz added a commit to lgritz/OpenShadingLanguage that referenced this pull request Jul 25, 2025
…ation#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]>
@lgritz lgritz added the build / testing / port / CI Affecting the build system, tests, platform support, porting, or continuous integration. label Oct 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build / testing / port / CI Affecting the build system, tests, platform support, porting, or continuous integration.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant