Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A couple of minor fixes for python3 support. #564

Merged
merged 1 commit into from
Jun 5, 2020

Conversation

seando-adsk
Copy link
Collaborator

No description provided.

Comment on lines +194 to +198
if(IS_WINDOWS AND DEFINED ENV{PYTHONHOME})
# If the environment contains a PYTHONHOME, also set the path to
# that folder so that we can find the python DLLs.
list(APPEND mayaUsd_varname_PATH $ENV{PYTHONHOME})
endif()
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@HamedSabri-adsk As we discussed, when the PYTHONHOME env var is set (which we'll do from our internal builds) we also add that to the path. This is so the tests can find the python37.dll

@@ -68,7 +68,7 @@ function(mayaUsd_find_python_module module)
set(${module}_FIND_REQUIRED TRUE)
endif()
execute_process(COMMAND "${Python_EXECUTABLE}" "-c"
"import re, ${module}; print re.compile('/__init__.py.*').sub('',${module}.__file__)"
"from __future__ import print_function; import re, ${module}; print(re.compile('/__init__.py.*').sub('',${module}.__file__))"
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The python code is used to determine if a given module (such as jinja2) exists. It needed to be made python3 compatible.

Copy link
Contributor

@HamedSabri-adsk HamedSabri-adsk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks.

@kxl-adsk kxl-adsk merged commit 2345647 into dev Jun 5, 2020
@kxl-adsk kxl-adsk deleted the donnels/python3_support branch June 5, 2020 00:53
@kxl-adsk kxl-adsk added the build Related to building maya-usd repository label Jul 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build Related to building maya-usd repository
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants