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

MAYA-105232 - misc fixes for python3 #622

Merged
merged 1 commit into from
Jul 6, 2020

Conversation

seando-adsk
Copy link
Collaborator

No description provided.

@@ -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+)",
Copy link
Collaborator Author

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.

Copy link
Contributor

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
Copy link
Collaborator Author

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.

Copy link
Contributor

Choose a reason for hiding this comment

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

Makes sense.

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.

Lgtm! Thank you Sean.

@seando-adsk seando-adsk requested a review from robthebloke July 3, 2020 21:07
@kxl-adsk kxl-adsk added the build Related to building maya-usd repository label Jul 6, 2020
@kxl-adsk kxl-adsk merged commit a2a3414 into dev Jul 6, 2020
@kxl-adsk kxl-adsk deleted the donnels/MAYA-105232/misc_fixes_for_python3 branch July 6, 2020 14:33
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