diff --git a/conda_recipes/maya-2027/recipe/build.sh b/conda_recipes/maya-2027/recipe/build.sh index b68300d2..0bec9190 100644 --- a/conda_recipes/maya-2027/recipe/build.sh +++ b/conda_recipes/maya-2027/recipe/build.sh @@ -85,9 +85,21 @@ mkdir -p $PREFIX/bin ln -r -s $PREFIX/$MAYA_ROOT/bin/maya$MAYA_VERSION $PREFIX/bin/maya$MAYA_VERSION ln -r -s $PREFIX/$MAYA_ROOT/bin/maya$MAYA_VERSION $PREFIX/bin/maya ln -r -s $PREFIX/$MAYA_ROOT/bin/mayapy.bin $PREFIX/bin/mayapy.bin -ln -r -s $PREFIX/$MAYA_ROOT/bin/mayapy $PREFIX/bin/mayapy ln -r -s $PREFIX/$MAYA_ROOT/bin/Render $PREFIX/bin/Render +# Expose mayapy through a wrapper script instead of a symlink. +# +# Autodesk's bin/mayapy looks for Maya's libraries in ../lib relative to the directory it +# was invoked from, so exec'ing a symlink in $PREFIX/bin sends the lookup to $PREFIX/lib, +# where mayapy can silently load another package's libpython3.13 (the maya-openjd adaptor +# stack installs one) and crash. Exec'ing the real path keeps the lookup inside the +# installation. +cat > $PREFIX/bin/mayapy <