@@ -47,7 +47,7 @@ def configure(packageName, versionString=None, eupsProduct=None, eupsProductPath
4747 """
4848
4949 if not state .env .GetOption ("no_progress" ):
50- state .log .info ("Setting up environment to build package '%s '." % packageName )
50+ state .log .info (f "Setting up environment to build package '{ packageName } '." )
5151 if eupsProduct is None :
5252 eupsProduct = packageName
5353 if versionString is None :
@@ -65,8 +65,8 @@ def configure(packageName, versionString=None, eupsProduct=None, eupsProductPath
6565 state .env .linkFarmDir = os .path .abspath (os .path .expanduser (state .env .linkFarmDir ))
6666 prefix = installation .setPrefix (state .env , versionString , eupsProductPath )
6767 state .env ["prefix" ] = prefix
68- state .env ["libDir" ] = "%s /lib" % prefix
69- state .env ["pythonDir" ] = "%s /python" % prefix
68+ state .env ["libDir" ] = f" { prefix } /lib"
69+ state .env ["pythonDir" ] = f" { prefix } /python"
7070 #
7171 # Process dependencies
7272 #
@@ -97,7 +97,7 @@ def configure(packageName, versionString=None, eupsProduct=None, eupsProductPath
9797 state .env ["XCPPPATH" ] = []
9898
9999 if use_conda_compilers ():
100- state .env .Append (XCPPPATH = ["%s /include" % _conda_prefix ])
100+ state .env .Append (XCPPPATH = [f" { _conda_prefix } /include" ])
101101
102102 # XCPPPPREFIX is a replacement for SCons' built-in INCPREFIX. It is used
103103 # when compiling headers in XCPPPATH directories. Here, we set it to
@@ -242,10 +242,10 @@ def __init__(
242242 self .root = os .path .realpath (productDir )
243243 self .doxygen = {
244244 # Doxygen tag files generated by this package
245- "tags" : ([os .path .join (self .root , "doc" , "%s.tag" % self .name )] if hasDoxygenTag else []),
245+ "tags" : ([os .path .join (self .root , "doc" , f" { self .name } .tag" )] if hasDoxygenTag else []),
246246 # Doxygen include files to include in the configuration of
247247 # dependent products
248- "includes" : ([os .path .join (self .root , "doc" , "%s.inc" % self .name )] if hasDoxygenInclude else []),
248+ "includes" : ([os .path .join (self .root , "doc" , f" { self .name } .inc" )] if hasDoxygenInclude else []),
249249 }
250250 if libs is None :
251251 self .libs = {
@@ -320,7 +320,7 @@ def configure(self, conf, packages, check=False, build=True):
320320 """
321321 assert not (check and build )
322322 conf .env .PrependUnique (** self .paths )
323- state .log .info ("Configuring package '%s'." % self .name )
323+ state .log .info (f "Configuring package '{ self .name } '." )
324324 conf .env .doxygen ["includes" ].extend (self .doxygen ["includes" ])
325325 if not build :
326326 conf .env .doxygen ["tags" ].extend (self .doxygen ["tags" ])
@@ -558,7 +558,7 @@ def __init__(self, primaryName, noCfgFile=False):
558558
559559 self .primary = self ._tryImport (primaryName )
560560 if self .primary is None :
561- state .log .fail ("Failed to load primary package configuration for %s." % primaryName )
561+ state .log .fail (f "Failed to load primary package configuration for { primaryName } ." )
562562
563563 missingDeps = []
564564 for dependency in self .primary .dependencies .get ("required" , ()):
@@ -588,10 +588,10 @@ def configure(self, env, check=False):
588588 conf = env .Configure (custom_tests = self .customTests )
589589 for name , module in self .packages .items ():
590590 if module is None :
591- state .log .info ("Skipping missing optional package %s." % name )
591+ state .log .info (f "Skipping missing optional package { name } ." )
592592 continue
593593 if not module .config .configure (conf , packages = self .packages , check = check , build = False ):
594- state .log .fail ("%s was found but did not pass configuration checks." % name )
594+ state .log .fail (f" { name } was found but did not pass configuration checks." )
595595 if self .primary :
596596 self .primary .config .configure (conf , packages = self .packages , check = False , build = True )
597597 env .AppendUnique (SWIGPATH = env ["CPPPATH" ])
@@ -648,15 +648,15 @@ def _tryImport(self, name):
648648 continue
649649 state .log .info (f"Using configuration for package '{ name } ' at '{ filename } '." )
650650 if not hasattr (module , "dependencies" ) or not isinstance (module .dependencies , dict ):
651- state .log .warn ("Configuration module for package '%s ' lacks a dependencies dict." % name )
651+ state .log .warn (f "Configuration module for package '{ name } ' lacks a dependencies dict." )
652652 return None
653653 if not hasattr (module , "config" ) or not isinstance (module .config , Configuration ):
654- state .log .warn ("Configuration module for package '%s ' lacks a config object." % name )
654+ state .log .warn (f "Configuration module for package '{ name } ' lacks a config object." )
655655 return None
656656 else :
657657 module .config .addCustomTests (self .customTests )
658658 return module
659- state .log .info ("Failed to import configuration for optional package '%s '." % name )
659+ state .log .info (f "Failed to import configuration for optional package '{ name } '." )
660660
661661 def _recurse (self , name ):
662662 """Recursively load a dependency.
@@ -672,7 +672,7 @@ def _recurse(self, name):
672672 Was the dependency loaded?
673673 """
674674 if name in self ._current :
675- state .log .fail ("Detected recursive dependency involving package '%s'" % name )
675+ state .log .fail (f "Detected recursive dependency involving package '{ name } '" )
676676 else :
677677 self ._current .add (name )
678678 if name in self .packages :
0 commit comments