PixarAnimationStudios / OpenUSD

Universal Scene Description
http://www.openusd.org
Other
5.45k stars 1.13k forks source link

Ensure that command wrapping only runs on Windows #3056

Open nvmkuruc opened 3 weeks ago

nvmkuruc commented 3 weeks ago

Description of Change(s)

The shebang.py script has two modes, one which does substitution of \pxrpythonsubst, the other which generates a wrapper command for Windows. The mode is argument dependent. However, if cmake fails to set PXR_PYTHON_SHEBANG, the wrong mode can get executed and a build with errors will silently be installed.

This change separates the unrelated windows only components out of shebang.py into a sibling winpycmd.py script. It also adds a warning to winpycmd to alert users that it's being run on a non-Windows platform.

With this fix, the build will now fail (instead of silently installing a build with errors) when PXR_PYTHON_SHEBANG cannot be correctly set.

Fixes Issue(s)

jesschimein commented 3 weeks ago

Filed as internal issue #USD-9591

jesschimein commented 3 weeks ago

/AzurePipelines run

azure-pipelines[bot] commented 3 weeks ago
Azure Pipelines successfully started running 1 pipeline(s).