From efd17eecacd99ac03b945c522d1c7571c9c65c37 Mon Sep 17 00:00:00 2001 From: Murray Stevenson <50844517+murraystevenson@users.noreply.github.com> Date: Tue, 30 Apr 2024 15:44:52 -0700 Subject: [PATCH] SConstruct : Call `usdGenSchema` directly from `commandEnv` This is a little simpler than using `gaffer env usdGenSchema` and solves an issue where the `gaffer` wrapper didn't exist when calling `gaffer env usdGenSchema` from a clean build. --- Changes.md | 5 +++++ SConstruct | 8 +++----- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/Changes.md b/Changes.md index f98bb44f44a..2340c5fe1a2 100644 --- a/Changes.md +++ b/Changes.md @@ -21,6 +21,11 @@ API - SceneAlgo : Added mechanism for scoping render adaptors to specific clients and/or renderers. +Build +----- + +- Fixed issue where `gaffer` wrapper may not exist when calling `usdGenSchema` from a clean build. + 1.4.2.0 (relative to 1.4.1.0) ======= diff --git a/SConstruct b/SConstruct index a3ff0c205d8..9df7e5b8d5b 100644 --- a/SConstruct +++ b/SConstruct @@ -764,7 +764,7 @@ elif commandEnv["PLATFORM"] == "win32" : else: commandEnv["ENV"]["LD_LIBRARY_PATH"] = commandEnv.subst( ":".join( [ "$BUILD_DIR/lib" ] + split( commandEnv["LOCATE_DEPENDENCY_LIBPATH"] ) ) ) -commandEnv["ENV"]["PYTHONPATH"] = commandEnv.subst( os.path.pathsep.join( split( commandEnv["LOCATE_DEPENDENCY_PYTHONPATH"] ) ) ) +commandEnv["ENV"]["PYTHONPATH"] = commandEnv.subst( os.path.pathsep.join( [ "$BUILD_DIR/python" ] + split( commandEnv["LOCATE_DEPENDENCY_PYTHONPATH"] ) ) ) # SIP on MacOS prevents DYLD_LIBRARY_PATH being passed down so we make sure # we also pass through to gaffer the other base vars it uses to populate paths @@ -1861,12 +1861,10 @@ for libraryName, libraryDef in libraries.items() : subprocess.check_call( [ - shutil.which( "gaffer.cmd" if sys.platform == "win32" else "gaffer", path = env["ENV"]["PATH"] ), - "env", - "usdGenSchema.cmd" if sys.platform == "win32" else "usdGenSchema", + shutil.which( "usdGenSchema.cmd" if sys.platform == "win32" else "usdGenSchema", path = commandEnv["ENV"]["PATH"] ), str( source[0] ), targetDir ], - env = env["ENV"] + env = commandEnv["ENV"] ) schemaSource = os.path.join( "usdSchemas", libraryName + ".usda" )