Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
b761f0d
Build all python package dependencies
rogernelson Dec 1, 2025
2bc9483
ci
cedrik-fuoco-adsk Dec 3, 2025
8b79960
tentative fix
cedrik-fuoco-adsk Dec 3, 2025
9c1c7c1
try to fix rust for msys2
cedrik-fuoco-adsk Dec 3, 2025
7a53e94
try to fix rust for msys2
cedrik-fuoco-adsk Dec 3, 2025
d5d65a4
try to fix rust for msys2
cedrik-fuoco-adsk Dec 3, 2025
85386b6
fix crypography for openssl
cedrik-fuoco-adsk Dec 4, 2025
e7fed17
try to fix crypography build in windows debug
cedrik-fuoco-adsk Dec 4, 2025
8658b04
fix issue for rocky 8 2023 where the openssl comes from the system
cedrik-fuoco-adsk Dec 4, 2025
90afb09
remove debug steps
cedrik-fuoco-adsk Dec 4, 2025
e5b96fe
documentation
cedrik-fuoco-adsk Dec 16, 2025
c957a0f
fix windows doc
cedrik-fuoco-adsk Dec 17, 2025
a96eaf4
fix windows doc
cedrik-fuoco-adsk Dec 17, 2025
607f460
clean up packages installation in requirements.txt only and testing p…
cedrik-fuoco-adsk Dec 18, 2025
fec9b95
move numpy out of pyside script and build it from scratch
cedrik-fuoco-adsk Dec 18, 2025
322f330
small fix
cedrik-fuoco-adsk Dec 18, 2025
aeb7235
Merge branch 'main' into cleanup-make-python
cedrik-fuoco-adsk Dec 18, 2025
2f68b52
fix issue with sitecustomize.py during build of python dependencies b…
cedrik-fuoco-adsk Dec 18, 2025
01332eb
build known packages with c/c++/rust extension to prevent building pa…
cedrik-fuoco-adsk Dec 18, 2025
9813620
Merge branch 'main' into cleanup-make-python
cedrik-fuoco-adsk Dec 18, 2025
0962044
cffi
cedrik-fuoco-adsk Dec 19, 2025
58aa660
ruff
cedrik-fuoco-adsk Dec 19, 2025
8e29259
ruff formatting
cedrik-fuoco-adsk Dec 19, 2025
1e7d934
build from source by default and list the ones that dont need too
cedrik-fuoco-adsk Dec 19, 2025
bf6475d
add more packages
cedrik-fuoco-adsk Dec 19, 2025
1f2f811
move sitecustomize outside of make_python, small changes
cedrik-fuoco-adsk Dec 19, 2025
9fc73f2
Merge branch 'main' into cleanup-make-python
cedrik-fuoco-adsk Jan 7, 2026
08b7d64
formatting
cedrik-fuoco-adsk Jan 7, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions cmake/defaults/CY2023.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,10 @@ IF(RV_VFX_PLATFORM STREQUAL "CY2023")
"3_1"
)

# NumPy NumPY for CY2023 is 1.23.x series but Pyside2 requires < 1.23 So we comment this out and make_pyside.py hardcoded to use NumPy < 1.23
# SET(ENV{RV_DEPS_NUMPY_VERSION} "1.23.5")
# NumPy NumPy for CY2023 VFX platform is 1.23.x series, but PySide2 requires < 1.23 Using numpy 1.22.4 (last version before 1.23) for PySide2 compatibility
SET(RV_DEPS_NUMPY_VERSION
"1.22.4"
)

# OCIO https://github.com/AcademySoftwareFoundation/OpenColorIO
SET(RV_DEPS_OCIO_VERSION
Expand Down
2 changes: 1 addition & 1 deletion cmake/defaults/CY2024.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ IF(RV_VFX_PLATFORM STREQUAL "CY2024")
)

# NumPy https://numpy.org/doc/stable/release.html
SET(ENV{RV_DEPS_NUMPY_VERSION}
SET(RV_DEPS_NUMPY_VERSION
"1.24.4"
)

Expand Down
2 changes: 1 addition & 1 deletion cmake/defaults/CY2025.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ IF(RV_VFX_PLATFORM STREQUAL "CY2025")
)

# NumPy https://numpy.org/doc/stable/release.html
SET(ENV{RV_DEPS_NUMPY_VERSION}
SET(RV_DEPS_NUMPY_VERSION
"1.26.4"
)

Expand Down
2 changes: 1 addition & 1 deletion cmake/defaults/CY2026.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ IF(RV_VFX_PLATFORM STREQUAL "CY2026")
)

# NumPy https://numpy.org/doc/stable/release.html
SET(ENV{RV_DEPS_NUMPY_VERSION}
SET(RV_DEPS_NUMPY_VERSION
"2.3.0"
)

Expand Down
62 changes: 53 additions & 9 deletions cmake/dependencies/python3.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ SET(_pyside_version
"${RV_DEPS_PYSIDE_VERSION}"
)

SET(_numpy_version
"${RV_DEPS_NUMPY_VERSION}"
)

SET(_python3_download_url
"https://github.com/python/cpython/archive/refs/tags/v${_python3_version}.zip"
)
Expand Down Expand Up @@ -244,7 +248,7 @@ ELSE()
)
ENDIF()

# Generate requirements.txt from template with the OpenTimelineIO version substituted
# Generate requirements.txt from template with the OpenTimelineIO and NumPy versions substituted
SET(_requirements_input_file
"${PROJECT_SOURCE_DIR}/src/build/requirements.txt.in"
)
Expand All @@ -271,8 +275,27 @@ ELSE()
)
ENDIF()

# Using --no-binary :all: to ensure all packages with native extensions are built from source against our custom Python build, preventing ABI compatibility
# issues.
# List of packages that are safe to install from pre-built wheels. All other packages (those with C/C++/Rust extensions) will be built from source to ensure
# proper linking against our custom Python build. Packages are built from source unless explicitly listed here. This includes: pure Python packages, build tools
# that don't need ABI compatibility, and packages with data files only.
SET(RV_PYTHON_WHEEL_SAFE
"pip" # Package installer (pure Python)
"setuptools" # Build system (pure Python)
"wheel" # Wheel format support (pure Python)
"Cython" # Build tool (compiles Python to C, but the tool itself can use pre-built wheels)
"meson-python" # Build backend (pure Python)
"ninja" # Build tool (native but doesn't link to Python)
"PyOpenGL" # OpenGL bindings without acceleration (pure Python)
"certifi" # SSL certificate bundle (just data files)
"six" # Python 2/3 compatibility (pure Python)
"packaging" # Version parsing (pure Python)
"requests" # HTTP library (pure Python)
CACHE STRING "Packages safe to install from wheels (pure Python or build tools)"
)

# Convert list to comma-separated string for pip's --only-binary flag
STRING(REPLACE ";" "," _wheel_safe_packages "${RV_PYTHON_WHEEL_SAFE}")

SET(_requirements_install_command
${CMAKE_COMMAND} -E env ${_otio_debug_env}
)
Expand All @@ -282,6 +305,8 @@ IF(DEFINED RV_DEPS_OPENSSL_INSTALL_DIR)
LIST(APPEND _requirements_install_command "OPENSSL_DIR=${RV_DEPS_OPENSSL_INSTALL_DIR}")
ENDIF()

# Build all packages from source except those in RV_PYTHON_WHEEL_SAFE. Packages with native extensions (opentimelineio, numpy, PyOpenGL-accelerate,
# cryptography, pydantic, cffi, etc.) will be built from source for proper ABI compatibility.
LIST(
APPEND
_requirements_install_command
Expand All @@ -298,6 +323,8 @@ LIST(
--force-reinstall
--no-binary
:all:
--only-binary
${_wheel_safe_packages}
-r
"${_requirements_output_file}"
)
Expand Down Expand Up @@ -390,13 +417,30 @@ SET(${_python3_target}-requirements-flag
)

ADD_CUSTOM_COMMAND(
COMMENT "Installing requirements from ${_requirements_output_file}"
COMMENT "Installing requirements from ${_requirements_output_file} pyside and other dependencies"
OUTPUT ${${_python3_target}-requirements-flag}
COMMAND ${_requirements_install_command}
COMMAND cmake -E touch ${${_python3_target}-requirements-flag}
DEPENDS ${_python3_target} ${_requirements_output_file} ${_requirements_input_file}
)

# Test the Python distribution after requirements are installed
Comment thread
cedrik-fuoco-adsk marked this conversation as resolved.
SET(${_python3_target}-test-flag
${_install_dir}/${_python3_target}-test-flag
)

SET(_test_python_script
"${PROJECT_SOURCE_DIR}/src/build/test_python.py"
)

ADD_CUSTOM_COMMAND(
COMMENT "Testing Python distribution"
OUTPUT ${${_python3_target}-test-flag}
COMMAND python3 "${_test_python_script}" --python-home "${_install_dir}" --variant "${CMAKE_BUILD_TYPE}"
COMMAND cmake -E touch ${${_python3_target}-test-flag}
DEPENDS ${${_python3_target}-requirements-flag} ${_test_python_script}
)

IF(RV_TARGET_WINDOWS
AND CMAKE_BUILD_TYPE MATCHES "^Debug$"
)
Expand Down Expand Up @@ -427,7 +471,7 @@ IF(RV_VFX_PLATFORM STREQUAL CY2023)
${rv_deps_pyside2_SOURCE_DIR}/build_scripts/platforms/windows_desktop.py
COMMAND ${_pyside_make_command} --prepare --build
COMMAND cmake -E touch ${${_pyside_target}-build-flag}
DEPENDS ${_python3_target} ${_pyside_make_command_script} ${${_python3_target}-requirements-flag}
DEPENDS ${_python3_target} ${_pyside_make_command_script} ${${_python3_target}-requirements-flag} ${${_python3_target}-test-flag}
USES_TERMINAL
)

Expand All @@ -438,9 +482,9 @@ ELSEIF(RV_VFX_PLATFORM STRGREATER_EQUAL CY2024)
ADD_CUSTOM_COMMAND(
COMMENT "Building PySide6 using ${_pyside_make_command_script}"
OUTPUT ${${_pyside_target}-build-flag}
COMMAND ${CMAKE_COMMAND} -E env "RV_DEPS_NUMPY_VERSION=$ENV{RV_DEPS_NUMPY_VERSION}" ${_pyside_make_command} --prepare --build
COMMAND ${_pyside_make_command} --prepare --build
COMMAND cmake -E touch ${${_pyside_target}-build-flag}
DEPENDS ${_python3_target} ${_pyside_make_command_script} ${${_python3_target}-requirements-flag}
DEPENDS ${_python3_target} ${_pyside_make_command_script} ${${_python3_target}-requirements-flag} ${${_python3_target}-test-flag}
USES_TERMINAL
)

Expand Down Expand Up @@ -471,7 +515,7 @@ IF(RV_TARGET_WINDOWS)
ADD_CUSTOM_COMMAND(
COMMENT "Installing ${_python3_target}'s include and libs into ${RV_STAGE_LIB_DIR}"
OUTPUT ${RV_STAGE_BIN_DIR}/${_python3_lib_name} ${_copy_commands}
DEPENDS ${_python3_target} ${${_python3_target}-requirements-flag} ${_build_flag_depends}
DEPENDS ${_python3_target} ${${_python3_target}-requirements-flag} ${${_python3_target}-test-flag} ${_build_flag_depends}
)

ADD_CUSTOM_TARGET(
Expand All @@ -485,7 +529,7 @@ ELSE()
COMMAND ${CMAKE_COMMAND} -E copy_directory ${_install_dir}/lib ${RV_STAGE_LIB_DIR}
COMMAND ${CMAKE_COMMAND} -E copy_directory ${_install_dir}/include ${RV_STAGE_INCLUDE_DIR}
COMMAND ${CMAKE_COMMAND} -E copy_directory ${_install_dir}/bin ${RV_STAGE_BIN_DIR}
DEPENDS ${_python3_target} ${${_python3_target}-requirements-flag} ${_build_flag_depends}
DEPENDS ${_python3_target} ${${_python3_target}-requirements-flag} ${${_python3_target}-test-flag} ${_build_flag_depends}
)
ADD_CUSTOM_TARGET(
${_python3_target}-stage-target ALL
Expand Down
13 changes: 1 addition & 12 deletions src/build/make_pyside6.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,18 +159,7 @@ def get_fallback_clang_filename_suffix(version):
os.environ["LLVM_INSTALL_DIR"] = libclang_install_dir
os.environ["CLANG_INSTALL_DIR"] = libclang_install_dir

# PySide6 build requires numpy 1.26.3
numpy_version = os.environ.get("RV_DEPS_NUMPY_VERSION")
if not numpy_version:
raise ValueError("RV_DEPS_NUMPY_VERSION environment variable is not set.")
install_numpy_args = get_python_interpreter_args(PYTHON_OUTPUT_DIR, VARIANT) + [
"-m",
"pip",
"install",
f"numpy=={numpy_version}",
]
print(f"Installing numpy with {install_numpy_args}")
subprocess.run(install_numpy_args).check_returncode()
# Note: numpy is now installed via requirements.txt in python3.cmake before PySide6 builds.
Comment thread
cedrik-fuoco-adsk marked this conversation as resolved.

cmakelist_path = os.path.join(SOURCE_DIR, "sources", "shiboken6", "ApiExtractor", "CMakeLists.txt")
old_cmakelist_path = os.path.join(SOURCE_DIR, "sources", "shiboken6", "ApiExtractor", "CMakeLists.txt.old")
Expand Down
Loading
Loading