From c487c3a16baf1e92b5aaa6e28e324d2e3210297e Mon Sep 17 00:00:00 2001 From: Petru Ciobanu Date: Fri, 22 Mar 2024 15:05:29 -0700 Subject: [PATCH 1/2] Install : don't check inkscape capabilities if disableGraphics is True MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit There is a way to disable the generation of some graphics, like for example when Inkscape is not available. This is done by providing the INKSCAPE argument to the build command and setting it to “disableGraphics”. However this was still running Inkscape, and in our case it was failing. Changes in this commit should avoid that. --- SConstruct | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/SConstruct b/SConstruct index 5e368c0fad1..8ec88b6482f 100644 --- a/SConstruct +++ b/SConstruct @@ -722,8 +722,9 @@ if not haveInkscape and env["INKSCAPE"] != "disableGraphics" : sys.stderr.write( "ERROR : Inkscape not found. Check INKSCAPE build variable.\n" ) Exit( 1 ) -inkscapeHelp = subprocess.check_output( [ env["INKSCAPE"], "--help" ], universal_newlines=True ) -env["INKSCAPE_USE_EXPORT_FILENAME"] = True if "--export-filename" in inkscapeHelp else False +if haveInkscape: + inkscapeHelp = subprocess.check_output( [ env["INKSCAPE"], "--help" ], universal_newlines=True ) + env["INKSCAPE_USE_EXPORT_FILENAME"] = True if "--export-filename" in inkscapeHelp else False haveSphinx = conf.checkSphinx() From a92ecf7f545067c2270df584d7932471d441c1e1 Mon Sep 17 00:00:00 2001 From: Petru Ciobanu Date: Fri, 22 Mar 2024 15:14:52 -0700 Subject: [PATCH 2/2] IE install : build Gaffer on and for current platform We used to validate the current platform against a hard-coded list. But now we decided to rely on the build environment to define and use the correct platform. --- config/ie/installAll | 66 ++++++++++++++++++++------------------------ 1 file changed, 30 insertions(+), 36 deletions(-) diff --git a/config/ie/installAll b/config/ie/installAll index d8adf564c51..717fd228f0e 100755 --- a/config/ie/installAll +++ b/config/ie/installAll @@ -145,40 +145,34 @@ for app, minimumVersion in appInfos : # Loop over all builds ########################################################################## -if platform in ( "cent7.x86_64" ) : - - for cortexCompatibilityVersion, cortexReg in cortexInfo.items() : - - # standalone builds - compilerVersion = cortexReg.get( "compilerVersion", defaultCompilerVersion ) - appleseedVersion = appleseedCompilerMap[compilerVersion].get( cortexCompatibilityVersion, "UNDEFINED" ) - baseArgs = [ - "COMPILER_VERSION={}".format( compilerVersion ), - "CORTEX_VERSION={}".format( cortexCompatibilityVersion ), - "APPLESEED_VERSION={}".format( appleseedVersion ), - "DL_VERSION={}".format( dlVersion ), - ] - for variant, variantInfo in variantReg.items() : +for cortexCompatibilityVersion, cortexReg in cortexInfo.items() : + + # standalone builds + compilerVersion = cortexReg.get( "compilerVersion", defaultCompilerVersion ) + appleseedVersion = appleseedCompilerMap[compilerVersion].get( cortexCompatibilityVersion, "UNDEFINED" ) + baseArgs = [ + "COMPILER_VERSION={}".format( compilerVersion ), + "CORTEX_VERSION={}".format( cortexCompatibilityVersion ), + "APPLESEED_VERSION={}".format( appleseedVersion ), + "DL_VERSION={}".format( dlVersion ), + ] + for variant, variantInfo in variantReg.items() : + for arnoldVersion in arnoldVersions : + variantArgs = [ "GAFFER_BUILD_VARIANT={}".format( variant ) ] + [ "=".join( x ) for x in variantInfo.items() ] + arnoldArgs = [ "ARNOLD_VERSION={}".format( arnoldVersion ) ] + build( baseArgs + variantArgs + arnoldArgs ) + + # app specific builds + for app, appVersions in appVersionsDict.items() : + for appVersion in appVersions : + compilerVersion = IEEnv.registry["apps"][app][appVersion][platform]["compilerVersion"] + appleseedVersion = appleseedCompilerMap[compilerVersion].get( cortexCompatibilityVersion, "UNDEFINED" ) for arnoldVersion in arnoldVersions : - variantArgs = [ "GAFFER_BUILD_VARIANT={}".format( variant ) ] + [ "=".join( x ) for x in variantInfo.items() ] - arnoldArgs = [ "ARNOLD_VERSION={}".format( arnoldVersion ) ] - build( baseArgs + variantArgs + arnoldArgs ) - - # app specific builds - for app, appVersions in appVersionsDict.items() : - for appVersion in appVersions : - compilerVersion = IEEnv.registry["apps"][app][appVersion][platform]["compilerVersion"] - appleseedVersion = appleseedCompilerMap[compilerVersion].get( cortexCompatibilityVersion, "UNDEFINED" ) - for arnoldVersion in arnoldVersions : - build( [ - "APP={}".format( app ), - "APP_VERSION={}".format( appVersion ), - "CORTEX_VERSION={}".format( cortexCompatibilityVersion ), - "APPLESEED_VERSION={}".format( appleseedVersion ), - "ARNOLD_VERSION={}".format( arnoldVersion ), - "DL_VERSION={}".format( dlVersion ), - ] ) - -else : - - raise RuntimeError( "Unknown platform" ) + build( [ + "APP={}".format( app ), + "APP_VERSION={}".format( appVersion ), + "CORTEX_VERSION={}".format( cortexCompatibilityVersion ), + "APPLESEED_VERSION={}".format( appleseedVersion ), + "ARNOLD_VERSION={}".format( arnoldVersion ), + "DL_VERSION={}".format( dlVersion ), + ] )