|
16 | 16 | # |
17 | 17 |
|
18 | 18 | # For Makefiles |
19 | | -set(CMAKE_VERBOSE_MAKEFILE ON) |
20 | | - |
| 19 | +# set(CMAKE_VERBOSE_MAKEFILE ON) |
21 | 20 | # For MSBuild (Visual Studio) |
22 | | -set(CMAKE_MSBUILD_FLAGS "/verbosity:detailed") |
| 21 | +# set(CMAKE_MSBUILD_FLAGS "/verbosity:detailed") |
23 | 22 |
|
24 | 23 | macro(get_python_pre_command) |
25 | 24 |
|
@@ -59,21 +58,23 @@ macro(get_python_pre_command) |
59 | 58 | endforeach() |
60 | 59 |
|
61 | 60 | # 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 |
63 | 62 | # double semicolons at the end and that seems to crash the conversion to |
64 | 63 | # absolute path at one point in Python 3.11+. |
65 | 64 | # I'm not sure who converts %PYTHONPATH% to empty string, this is a |
66 | 65 | # 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 : |
71 | 71 |
|
72 | 72 | # 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 |
73 | 73 |
|
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%. |
77 | 78 | list(APPEND _WIN_PATHS "%%PYTHONPATH%%") |
78 | 79 |
|
79 | 80 | string(JOIN "\\\\;" _PYTHONPATH_VALUE ${_WIN_PATHS}) |
|
0 commit comments