Skip to content

Commit 1dd1751

Browse files
tentative fix for macos by locking setuptools verision
Signed-off-by: Cédrik Fuoco <[email protected]>
1 parent d344142 commit 1dd1751

File tree

3 files changed

+49
-1
lines changed

3 files changed

+49
-1
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -470,7 +470,10 @@ jobs:
470470

471471
- name: Install Python dependencies
472472
run: |
473+
python3 --version
473474
python3 -m pip install --user --upgrade -r requirements.txt
475+
python3 -m pip install --user --upgrade pipdeptree
476+
python3 -m pipdeptree
474477
475478
- name: Install Homebrew dependencies
476479
# icu4c is needed for Qt UIC executable / AUTOUIC.

cmake/dependencies/python3.cmake

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -291,6 +291,45 @@ EXTERNALPROJECT_ADD(
291291
USES_TERMINAL_BUILD TRUE
292292
)
293293

294+
# ##############################################################################################################################################################
295+
# This is temporary until the patch gets into the official PyOpenGL repo. #
296+
# ##############################################################################################################################################################
297+
IF(NOT RV_TARGET_APPLE_ARM64)
298+
MESSAGE(STATUS "Patching PyOpenGL and building PyOpenGL from source")
299+
SET(_patch_pyopengl_command
300+
patch -p1 < ${CMAKE_CURRENT_SOURCE_DIR}/patch/pyopengl-accelerate.patch
301+
)
302+
303+
EXTERNALPROJECT_ADD(
304+
pyopengl_accelerate
305+
GIT_REPOSITORY https://github.com/mcfletch/pyopengl.git
306+
GIT_TAG master
307+
SOURCE_DIR ${CMAKE_BINARY_DIR}/pyopengl_accelerate
308+
PATCH_COMMAND ${_patch_pyopengl_command}
309+
CONFIGURE_COMMAND ""
310+
BUILD_COMMAND ""
311+
INSTALL_COMMAND ""
312+
BUILD_BYPRODUCTS ${CMAKE_BINARY_DIR}/pyopengl_accelerate/setup.py
313+
)
314+
315+
ADD_CUSTOM_COMMAND(
316+
OUTPUT ${CMAKE_BINARY_DIR}/pyopengl_accelerate/.pip_installed
317+
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/pyopengl_accelerate
318+
COMMAND "${_python3_executable}" -m pip install .
319+
COMMAND ${CMAKE_COMMAND} -E touch ${CMAKE_BINARY_DIR}/pyopengl_accelerate/.pip_installed
320+
DEPENDS pyopengl_accelerate ${_python3_target}
321+
COMMENT "Applying patch and installing patched PyOpenGL_accelerate"
322+
)
323+
324+
ADD_CUSTOM_TARGET(
325+
pyopengl_accelerate_pip_install
326+
DEPENDS ${CMAKE_BINARY_DIR}/pyopengl_accelerate/.pip_installed
327+
)
328+
329+
ADD_DEPENDENCIES(pyopengl_accelerate ${_python3_target})
330+
ENDIF()
331+
# ##############################################################################################################################################################
332+
294333
SET(${_python3_target}-requirements-flag
295334
${_install_dir}/${_python3_target}-requirements-flag
296335
)

src/build/requirements.txt

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,15 @@ setuptools # License: MIT License
55
# 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
66
git+https://github.com/AcademySoftwareFoundation/OpenTimelineIO@main#egg=OpenTimelineIO # License: Other/Proprietary License (Modified Apache 2.0 License)
77
PyOpenGL # License: BSD License (BSD)
8+
9+
# PyOpenGL_accelerate is COMMENTED OUT because of an issue with the main branch.
10+
# PyOpenGL_accelerate is built from source in python3.cmake as a workaround until the fix
11+
# is merged in the main branch.
12+
# See https://github.com/mcfletch/pyopengl/issues/147 and https://github.com/mcfletch/pyopengl/pull/146
13+
814
# PyOpenGL_accelerate as issue with native arm64 build on MacOS.
915
# Use PyOpenGL_accelerate only on x86_64 platform.
10-
PyOpenGL_accelerate ; platform_machine=='x86_64' # License: BSD License (BSD)
16+
# PyOpenGL_accelerate ; platform_machine=='x86_64' # License: BSD License (BSD)
1117

1218

1319
# Those are installed by the src/build/make_python.py script, adding them here to list their licenses.

0 commit comments

Comments
 (0)