diff --git a/cmake/dependencies/python3.cmake b/cmake/dependencies/python3.cmake index f3cb2e3c1..6730d9832 100644 --- a/cmake/dependencies/python3.cmake +++ b/cmake/dependencies/python3.cmake @@ -31,7 +31,6 @@ SET(RV_DEPS_PYTHON_VERSION_SHORT ) # This version is used for generating src/build/requirements.txt from requirements.txt.in template -# All platforms install OpenTimelineIO from git to ensure consistent source builds. SET(_opentimelineio_version "${RV_DEPS_OTIO_VERSION}" ) @@ -39,11 +38,6 @@ SET(_opentimelineio_version SET(_pyside_version "${RV_DEPS_PYSIDE_VERSION}" ) -# Construct the full git URL for pip to use in requirements.txt -# Using this avoids @ symbol conflicts in CONFIGURE_FILE -SET(_opentimelineio_pip_url - "git+https://github.com/AcademySoftwareFoundation/OpenTimelineIO@v${_opentimelineio_version}#egg=OpenTimelineIO" -) SET(_python3_download_url "https://github.com/python/cpython/archive/refs/tags/v${_python3_version}.zip" @@ -79,9 +73,6 @@ SET(_build_dir ${RV_DEPS_BASE_DIR}/${_python3_target}/build ) -# Note: OpenTimelineIO is now installed via requirements.txt from git URL for all platforms. -# This ensures consistent source builds across Windows, Mac, and Linux. - FETCHCONTENT_DECLARE( ${_pyside_target} URL ${_pyside_archive_url} @@ -283,12 +274,13 @@ ELSE() SET(_otio_debug_env "") ENDIF() -# Single unified command for all platforms and build types +# Using --no-binary :all: to ensure all packages with native extensions are built from source +# against our custom Python build, preventing ABI compatibility issues. SET(_requirements_install_command ${CMAKE_COMMAND} -E env ${_otio_debug_env} "CMAKE_ARGS=-DPYTHON_LIBRARY=${_python3_cmake_library} -DPYTHON_INCLUDE_DIR=${_include_dir} -DPYTHON_EXECUTABLE=${_python3_executable}" - "${_python3_executable}" -m pip install --upgrade --no-cache-dir --force-reinstall -r "${_requirements_output_file}" + "${_python3_executable}" -m pip install --upgrade --no-cache-dir --force-reinstall --no-binary :all: -r "${_requirements_output_file}" ) IF(RV_TARGET_WINDOWS) diff --git a/src/build/requirements.txt.in b/src/build/requirements.txt.in index d354ac868..2be3bf364 100644 --- a/src/build/requirements.txt.in +++ b/src/build/requirements.txt.in @@ -1,10 +1,11 @@ # This file contains all the packages that will be packaged with RV. Please add the license next to the package. # NOTE: This is a CMake template file. The actual requirements.txt is generated during CMake configuration. # To update OpenTimelineIO version, edit _opentimelineio_version in cmake/dependencies/python3.cmake +# NOTE: Using --no-binary :all: in pip install ensures all packages are built from source against our custom Python. pip # License: MIT License (MIT) setuptools # License: MIT License -@_opentimelineio_pip_url@ # License: Other/Proprietary License (Modified Apache 2.0 License) +opentimelineio==@_opentimelineio_version@ # License: Other/Proprietary License (Modified Apache 2.0 License) PyOpenGL # License: BSD License (BSD) # MacOS only - PyOpenGL_accelerate is built from source in python3.cmake as a workaround until the fix