-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[USD] On macOS, use the current Python context to determine version o…
…f Python to build against This change modifies the mechanism used on macOS for finding Python paths to use the currently running Python interpreter and environment rather than relying on the version of Python on the user's PATH. In addition to the header include and library paths, we also collect and set the path to the Python executable. All code that previously tested Python module availability by shelling out to a new Python process now instead tests importing modules directly. Maya ships and runs using its own version of Python, so it is important that USD and the plugins for Maya are built using Maya's version of Python and not the system version. With this change, that can now be done by running build_usd.py using the 'mayapy' Python interpreter that ships with Maya. For example, to build USD and the Maya plugins on macOS for Maya 2019, run: /Applications/Autodesk/maya2019/Maya.app/Contents/bin/mayapy build_usd.py --maya --no-usdview ... When building USD for Maya, Maya does not provide access to the OpenGL module in Python. As a result, usdview cannot be built when building for Maya, so the --no-usdview option should be used. This should not pose a problem though, since Maya USD builds are only intended to be used from inside Maya. Note that this is primarily an issue on macOS, where a DCC's version of Python is likely to conflict with the version provided by the system. On other platforms, build_usd.py *should* be run using the system Python and *should not* be run using the DCC's Python. Fixes #10 (Internal change: 1938908)
- Loading branch information
Showing
1 changed file
with
89 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters