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)
3047
[ ] I have verified that all unit tests pass with the proposed changes
[x] I have submitted a signed Contributor License Agreement
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, ifcmake
fails to setPXR_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 siblingwinpycmd.py
script. It also adds a warning towinpycmd
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)
3047