Skip to content

Commit 6fa40a4

Browse files
remiadoug-walker
andauthored
Fix Python wheel macOS workflow and make OCIO_PYTHON_LOAD_DLLS_FROM_PATH opt-in (#2106)
Signed-off-by: Rémi Achard <remiachard@gmail.com> Co-authored-by: Doug Walker <doug.walker@autodesk.com>
1 parent 1890b7d commit 6fa40a4

File tree

3 files changed

+15
-13
lines changed

3 files changed

+15
-13
lines changed

.github/workflows/wheel_workflow.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ jobs:
174174
platforms: all
175175

176176
- name: Build wheels
177-
uses: pypa/cibuildwheel@v2.21.1
177+
uses: pypa/cibuildwheel@v2.22.0
178178
env:
179179
CIBW_BUILD: ${{ matrix.python }}
180180
CIBW_ARCHS: ${{ matrix.arch }}
@@ -192,7 +192,7 @@ jobs:
192192

193193
macos:
194194
name: Build wheels on macOS
195-
runs-on: macos-12
195+
runs-on: macos-13
196196
# Don't run on OCIO forks
197197
if: |
198198
github.event_name != 'schedule' ||
@@ -231,7 +231,7 @@ jobs:
231231
python-version: '3.9'
232232

233233
- name: Build wheels
234-
uses: pypa/cibuildwheel@v2.21.1
234+
uses: pypa/cibuildwheel@v2.22.0
235235
env:
236236
CIBW_BUILD: ${{ matrix.python }}
237237
CIBW_ARCHS: ${{ matrix.arch }}
@@ -286,7 +286,7 @@ jobs:
286286
python-version: '3.9'
287287

288288
- name: Build wheels
289-
uses: pypa/cibuildwheel@v2.21.1
289+
uses: pypa/cibuildwheel@v2.22.0
290290
env:
291291
CIBW_BUILD: ${{ matrix.python }}
292292
CIBW_ARCHS: ${{ matrix.arch }}
@@ -341,7 +341,7 @@ jobs:
341341
python-version: '3.9'
342342

343343
- name: Build wheels
344-
uses: pypa/cibuildwheel@v2.21.1
344+
uses: pypa/cibuildwheel@v2.22.0
345345
env:
346346
CIBW_BUILD: ${{ matrix.python }}
347347
CIBW_ARCHS: ${{ matrix.arch }}

docs/quick_start/installation.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ Required components:
126126
- CMake >= 3.14
127127
- \*Expat >= 2.4.1 (XML parser for CDL/CLF/CTF)
128128
- \*yaml-cpp >= 0.7.0 (YAML parser for Configs)
129-
- \*Imath >= 3.0 (for half domain LUTs)
129+
- \*Imath >= 3.1.1 (for half domain LUTs)
130130
- \*pystring >= 1.1.3
131131
- \*minizip-ng >= 3.0.7 (for config archiving)
132132
- \*ZLIB >= 1.2.13 (for config archiving)
@@ -135,14 +135,14 @@ Optional OCIO functionality also depends on:
135135

136136
- \*Little CMS >= 2.2 (for ociobakelut ICC profile baking)
137137
- \*OpenGL GLUT & GLEW (for ociodisplay)
138-
- \*OpenEXR >= 3.0 (for apps including ocioconvert)
139-
- OpenImageIO >= 2.1.9 (for apps including ocioconvert)
138+
- \*OpenEXR >= 3.0.5 (for apps including ocioconvert)
139+
- OpenImageIO >= 2.2.14 (for apps including ocioconvert)
140140
- \*OpenFX >= 1.4 (for the OpenFX plug-ins)
141141
- OpenShadingLanguage >= 1.11 (for the OSL unit tests)
142142
- Doxygen (for the docs)
143143
- NumPy (optionally used in the Python test suite)
144144
- \*pybind11 >= 2.9.2 (for the Python binding)
145-
- Python >= 2.7 (for the Python binding only)
145+
- Python >= 3.7 (for the Python binding only)
146146
- Python 3.7 - 3.9 (for building the documentation)
147147

148148
Building the documentation requires the following packages, available via PyPI:

src/bindings/python/package/__init__.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,15 @@
2424
# 2 - Checking that the directories exist and are not "."
2525
# 3 - Add them to the DLL load path.
2626
#
27-
# The behavior described above is opt-out which means that it is activated by default.
28-
# A user can opt-out and use the default behavior of Python 3.8+ by setting OCIO_PYTHON_LOAD_DLLS_FROM_PATH
29-
# environment variable to 0.
27+
# The behavior described above is opt-in which means that it is deactivated by default.
28+
# A user can opt-in by setting OCIO_PYTHON_LOAD_DLLS_FROM_PATH environment variable to 1.
29+
# Please note that OCIO 2.4.0 and earlier had this behavior opt-out but it was changed
30+
# in 2.4.1 after it was found problematic in uncontrolled environment (causing segfault
31+
# on PyOpenColorIO import) as well as for security reasons.
3032
#
3133

3234
if sys.version_info >= (3, 8) and platform.system() == "Windows":
33-
if os.getenv("OCIO_PYTHON_LOAD_DLLS_FROM_PATH", "1") == "1":
35+
if os.getenv("OCIO_PYTHON_LOAD_DLLS_FROM_PATH", "0") == "1":
3436
for path in os.getenv("PATH", "").split(os.pathsep):
3537
if os.path.exists(path) and path != ".":
3638
os.add_dll_directory(path)

0 commit comments

Comments
 (0)