Skip to content

Commit ab4eb61

Browse files
committed
- Commenting out some of the earlier printf-debugging attempts :)
Signed-off-by: cuneyt.ozdas <cuneyt.ozdas@autodesk.com>
1 parent 324509d commit ab4eb61

3 files changed

Lines changed: 16 additions & 16 deletions

File tree

docs/CMakeLists.txt

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,9 @@
22
# Copyright Contributors to the OpenColorIO Project.
33

44
# For Makefiles
5-
set(CMAKE_VERBOSE_MAKEFILE ON)
6-
5+
# set(CMAKE_VERBOSE_MAKEFILE ON)
76
# For MSBuild (Visual Studio)
8-
set(CMAKE_MSBUILD_FLAGS "/verbosity:detailed")
9-
7+
#set(CMAKE_MSBUILD_FLAGS "/verbosity:detailed")
108

119
###############################################################################
1210
### Python ###

share/cmake/macros/GetPythonPreCommand.cmake

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,9 @@
1616
#
1717

1818
# For Makefiles
19-
set(CMAKE_VERBOSE_MAKEFILE ON)
20-
19+
# set(CMAKE_VERBOSE_MAKEFILE ON)
2120
# For MSBuild (Visual Studio)
22-
set(CMAKE_MSBUILD_FLAGS "/verbosity:detailed")
21+
# set(CMAKE_MSBUILD_FLAGS "/verbosity:detailed")
2322

2423
macro(get_python_pre_command)
2524

@@ -59,21 +58,23 @@ macro(get_python_pre_command)
5958
endforeach()
6059

6160
# I think this supposed to add a literal %PYTHONPATH% at the end of the
62-
# list but instead somehow it's adding an empty entry which results
61+
# list but instead, somehow, it's adding an empty entry which results
6362
# double semicolons at the end and that seems to crash the conversion to
6463
# absolute path at one point in Python 3.11+.
6564
# I'm not sure who converts %PYTHONPATH% to empty string, this is a
6665
# python script launched by a cmd.exe command that's defined as a custom
67-
# build step in vcxproj file which is created by CMake ' but the command
68-
# and that cmd.exe is launched by MSBuild. :-o
69-
70-
# ... in src/bindings/python/CMakeList.txt:23 the command is:
66+
# build step in vcxproj file which is created by CMake, and that cmd.exe
67+
# is launched by MSBuild. :-o It's either CMake expanding it or the
68+
# vcxproj generator expanding it. I can't verify easily as it's hard to
69+
# see the generated vcxproj file. But the resulting string is this at
70+
# src/bindings/python/CMakeList.txt:23 :
7171

7272
# set;PYTHONPATH=D:\a\OpenColorIO\OpenColorIO\build\temp.win-amd64-cpython-311\Release\src\bindings\python\Release\;D:\a\OpenColorIO\OpenColorIO\share\docs\;; ;call C:\Users\runneradmin\AppData\Local\Temp\build-env-q0vk6lfr\Scripts\python.exe D:/a/OpenColorIO/OpenColorIO/share/docs/extract_docstrings.py xml docstrings.h
7373

74-
# This may be related to https://www.cve.news/cve-2023-41105/
75-
# Commenting out the below line seems to fix the Windows Wheels builds.
76-
# Trying with %%PYTHONPATH%% ...
74+
# The python issue with empty path may be related to
75+
# https://www.cve.news/cve-2023-41105/
76+
# Escaping it with %% as %%PYTHONPATH%% seems to wok fine, I think
77+
# cmd.exe will take it as %PYTHONPATH%.
7778
list(APPEND _WIN_PATHS "%%PYTHONPATH%%")
7879

7980
string(JOIN "\\\\;" _PYTHONPATH_VALUE ${_WIN_PATHS})

src/bindings/python/CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ if(OCIO_BUILD_DOCS)
2222
# Run docstring extraction if docstrings.h is behind doxygen XML
2323
add_custom_command(OUTPUT ${PYOCIO_DOCSTRINGS_H}
2424
COMMAND
25-
${Python_PRE_CMD} "${Python_EXECUTABLE}" -v -u -X dev "${EXTRACT_DOCSTRINGS_PY}" xml docstrings.h
25+
# ${Python_PRE_CMD} "${Python_EXECUTABLE}" -v -u -X dev "${EXTRACT_DOCSTRINGS_PY}" xml docstrings.h
26+
${Python_PRE_CMD} "${Python_EXECUTABLE}" "${EXTRACT_DOCSTRINGS_PY}" xml docstrings.h
2627
WORKING_DIRECTORY
2728
${PYOCIO_DOCSTRINGS_DIR}
2829
DEPENDS

0 commit comments

Comments
 (0)