-
Notifications
You must be signed in to change notification settings - Fork 202
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
MAYA-105232 - misc fixes for python3 #622
Conversation
@@ -99,7 +99,7 @@ def GetVisualStudioCompilerAndVersion(): | |||
# VisualStudioVersion environment variable should be set by the | |||
# Visual Studio Command Prompt. | |||
match = re.search( | |||
"(\d+).(\d+)", | |||
r"(\d+)\.(\d+)", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When using python 3 this gives the following warning:
build.py:102: DeprecationWarning: invalid escape sequence \d
"(\d+).(\d+)",
I believe you got this function from the USD build script. I checked and they made this fix a while ago. The env var has something like "15.0" in it. The r tells python this is a raw string which should not be interpreted. And you need . to find the . otherwise that is the regex matching any char.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ugh I see. Great find. Didn't realize that.
@@ -34,7 +34,6 @@ foreach(INPUT_FILE ${PY_INIT_FILES}) | |||
get_filename_component(OUTPUT_PATH ${OUTPUT_FILE} DIRECTORY) | |||
install(FILES | |||
${INPUT_FILE} # .py files | |||
${INPUT_FILE}c # .pyc files |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should not install .pyc files. They are not needed and they aren't there in python3 anyways.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lgtm! Thank you Sean.
No description provided.