Skip to content

Commit

Permalink
python: Fix incorrect handling of PXR_PY_UNDEFINED_DYNAMIC_LOOKUP
Browse files Browse the repository at this point in the history
pxr_boost::python was bypassing this setting by specifying
Python3::Python as a dependency instead of PYTHON_LIBRARIES,
which the build system sets up while taking the above setting
into account.

PYTHON_INCLUDE_DIRS must also be specified as an include
directory so that Python headers are still picked up
during the build, even if we're not linking against the
Python shared library.

This fixes crashes when using the usd-core Python module
from PyPI on MacOS.

(Internal change: 2343414)
  • Loading branch information
sunyab authored and pixar-oss committed Oct 3, 2024
1 parent 124c6ce commit d56f1d7
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pxr/external/boost/python/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,11 @@ set(cppfiles "")
# Otherwise, this library is just a pass-through for boost::python.
if (PXR_USE_INTERNAL_BOOST_PYTHON)
set(libs
Python3::Python
${PYTHON_LIBRARIES}
)

set(include_dirs
${PYTHON_INCLUDE_DIRS}
)

set(cppfiles
Expand Down

0 comments on commit d56f1d7

Please sign in to comment.