Skip to content

Commit 6a11468

Browse files
traversaropixar-oss
authored andcommitted
cmake: Do not pin exact Python patch version in pxrConfig.cmake
In `pxrConfig.cmake.in`, CMake was looking for exactly the same Python version used to build OpenUSD, so if a OpenUSD was built against Python 3.11.3, `find_package(pxr REQUIRED)` would fail on a machine with Python 3.11.5, even if different patch versions of Python are ABI compatible if the minor version is the same, see https://docs.python.org/3/c-api/stable.html . This PR fixes downstream problems such as OpenMoonRay/openmoonray#141 and conda-forge/openusd-feedstock#11 . Closes PixarAnimationStudios#3759 (Internal change: 2409381)
1 parent 1924d61 commit 6a11468

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

pxr/pxrConfig.cmake.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ if(@PXR_ENABLE_PYTHON_SUPPORT@)
4343
endif()
4444

4545
if (NOT DEFINED Python3_VERSION)
46-
find_dependency(Python3 "@Python3_VERSION@" EXACT COMPONENTS Development)
46+
find_dependency(Python3 "@Python3_VERSION_MAJOR@.@Python3_VERSION_MINOR@" EXACT COMPONENTS Development)
4747
else()
4848
find_dependency(Python3 COMPONENTS Development)
4949
endif()

0 commit comments

Comments
 (0)