Skip to content

Commit 93819da

Browse files
authored
Unify OTIO versions, pin to 0.18.1 (#982)
### Pin OTIO to 0.18.1 ### Summarize your change. Currently OTIO is 0.16 on Window debug and the latest main branch for everything else. This branch does two things: - unify the version between all OSes - pin the version to 0.18.1. Windows debug builds the OTIO wheel from source since there are no pre-built debug Windows wheels available in pypi, and we can't use the release one since Windows doesn't allow mixing release and debug libraries. As a result, it's version was specified outside of the requirements.txt file we use for everything else to install from pypi. It's version was far behind the other OSes likely because whenever we updated it, we thought doing so in a single place would take care of everything. To remove the chance of this happening again, I removed the requirements.txt file we use for installing our python build dependencies and instead auto-generated it from a template, using the opentimelineio version as an input variable from CMake so the version is now shared between all builds. Lastly, I pinned the OTIO version to 0.18.1 which was just released this week. It's risky to use the latest main branch since one bad commit could break OpenRV. ### Describe the reason for the change. Build stability and consistency. ### Describe what you have tested and on which operating system. Building on Windows + Linux --------- Signed-off-by: Roger Nelson <[email protected]>
1 parent 9fec424 commit 93819da

File tree

2 files changed

+27
-12
lines changed

2 files changed

+27
-12
lines changed

cmake/dependencies/python3.cmake

Lines changed: 23 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,12 @@ SET(RV_DEPS_PYTHON_VERSION_SHORT
3333
"${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}"
3434
)
3535

36+
# This version is used for:
37+
# 1. Building OpenTimelineIO from source for Windows debug builds
38+
# 2. Generating src/build/requirements.txt from requirements.txt.in template
39+
# (used by all other platforms/builds to install from PyPI)
3640
SET(_opentimelineio_version
37-
"0.16.0"
41+
"0.18.1"
3842
)
3943

4044
RV_VFX_SET_VARIABLE(_pyside_version CY2023 "5.15.10" CY2024 "6.5.3")
@@ -249,8 +253,18 @@ ELSE() # Not WINDOWS
249253
)
250254
ENDIF()
251255

252-
SET(_requirements_file
253-
"${PROJECT_SOURCE_DIR}/src/build/requirements.txt"
256+
# Generate requirements.txt from template with the OpenTimelineIO version substituted
257+
SET(_requirements_input_file
258+
"${PROJECT_SOURCE_DIR}/src/build/requirements.txt.in"
259+
)
260+
SET(_requirements_output_file
261+
"${CMAKE_BINARY_DIR}/requirements.txt"
262+
)
263+
264+
CONFIGURE_FILE(
265+
${_requirements_input_file}
266+
${_requirements_output_file}
267+
@ONLY
254268
)
255269

256270
IF(RV_TARGET_WINDOWS)
@@ -269,18 +283,18 @@ IF(RV_TARGET_WINDOWS)
269283
${CMAKE_COMMAND} -E env
270284
"OTIO_CXX_DEBUG_BUILD=1"
271285
"CMAKE_ARGS=-DPYTHON_LIBRARY=${_python3_implib} -DPYTHON_INCLUDE_DIR=${_include_dir} -DPYTHON_EXECUTABLE=${_python3_executable}"
272-
"${_python3_executable}" -m pip install --upgrade -r "${_requirements_file}"
286+
"${_python3_executable}" -m pip install --upgrade -r "${_requirements_output_file}"
273287
)
274288
ELSE()
275289
SET(_requirements_install_command
276290
${CMAKE_COMMAND} -E env
277291
"CMAKE_ARGS=-DPYTHON_LIBRARY=${_python3_implib} -DPYTHON_INCLUDE_DIR=${_include_dir} -DPYTHON_EXECUTABLE=${_python3_executable}"
278-
"${_python3_executable}" -m pip install --upgrade -r "${_requirements_file}"
292+
"${_python3_executable}" -m pip install --upgrade -r "${_requirements_output_file}"
279293
)
280294
ENDIF()
281295
ELSE()
282296
SET(_requirements_install_command
283-
"${_python3_executable}" -m pip install --upgrade -r "${_requirements_file}"
297+
"${_python3_executable}" -m pip install --upgrade -r "${_requirements_output_file}"
284298
)
285299
ENDIF()
286300

@@ -359,11 +373,11 @@ SET(${_python3_target}-requirements-flag
359373
)
360374

361375
ADD_CUSTOM_COMMAND(
362-
COMMENT "Installing requirements from ${_requirements_file}"
376+
COMMENT "Installing requirements from ${_requirements_output_file}"
363377
OUTPUT ${${_python3_target}-requirements-flag}
364378
COMMAND ${_requirements_install_command}
365379
COMMAND cmake -E touch ${${_python3_target}-requirements-flag}
366-
DEPENDS ${_python3_target} ${_requirements_file}
380+
DEPENDS ${_python3_target} ${_requirements_output_file} ${_requirements_input_file}
367381
)
368382

369383
IF(RV_TARGET_WINDOWS
@@ -375,7 +389,7 @@ IF(RV_TARGET_WINDOWS
375389
POST_BUILD
376390
COMMENT "Copying Debug Python lib as a unversionned file for Debug"
377391
COMMAND cmake -E copy_if_different ${_python3_implib} ${_python_release_libpath}
378-
COMMAND cmake -E copy_if_different ${_python3_implib} ${_python_release_in_bin_libpath} DEPENDS ${_python3_target} ${_requirements_file}
392+
COMMAND cmake -E copy_if_different ${_python3_implib} ${_python_release_in_bin_libpath} DEPENDS ${_python3_target} ${_requirements_output_file} ${_requirements_input_file}
379393
)
380394
ENDIF()
381395

src/build/requirements.txt renamed to src/build/requirements.txt.in

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
# This file contains all the packages that will be packaged with RV. Please add the license next to the package.
2+
# NOTE: This is a CMake template file. The actual requirements.txt is generated during CMake configuration.
3+
# To update OpenTimelineIO version, edit _opentimelineio_version in cmake/dependencies/python3.cmake
24

35
pip # License: MIT License (MIT)
46
setuptools # License: MIT License
5-
# We need to use the main branch of the OTIO Github repo since the latest release available as a Pypi package is missing some features we need for Live Review
6-
# Using the latest from main branch.
7-
git+https://github.com/AcademySoftwareFoundation/OpenTimelineIO@main#egg=OpenTimelineIO # License: Other/Proprietary License (Modified Apache 2.0 License)
7+
OpenTimelineIO==@_opentimelineio_version@ # License: Other/Proprietary License (Modified Apache 2.0 License)
88
PyOpenGL # License: BSD License (BSD)
99

1010
# MacOS only - PyOpenGL_accelerate is built from source in python3.cmake as a workaround until the fix
@@ -24,3 +24,4 @@ packaging # License: Apache Software License, BSD License
2424
requests # License: Apache Software License (Apache 2.0)
2525
cryptography # License: Apache Software License, BSD License ((Apache-2.0 OR BSD-3-Clause) AND PSF-2.0)
2626
pydantic # License: MIT License (MIT)
27+

0 commit comments

Comments
 (0)