[Bf-committers] [Bf-blender-cvs] SVN commit: /data/svn/bf-blender [14364] trunk/blender/SConstruct: use mkdtemp for the scons tempfile path rather then '.sconf_temp', this way 2 blenders can be compiled at once from the same path.

Nathan Letwory jesterking at letwory.net
Tue Apr 8 19:17:00 CEST 2008


On Tue, Apr 8, 2008 at 8:01 PM, Campbell Barton <ideasman42 at gmail.com> wrote:
>  use mkdtemp for the scons tempfile path rather then '.sconf_temp', this way 2 blenders can be compiled at once from the same path. (debug and release for instance, as long as they build in their own dir)

>  +       sconf_temp = mkdtemp()
>  +        conf = Configure( env2, {'CheckFreeAlut' : CheckFreeAlut}, sconf_temp, '/dev/null' )
>          if conf.CheckFreeAlut( env2 ):
>              env['BF_OPENAL_LIB'] += ' alut'
>          del env2
>  -        for root, dirs, files in os.walk('.sconf_temp', topdown=False):
>  +        for root, dirs, files in os.walk(sconf_temp, topdown=False):
>              for name in files:
>                  os.remove(os.path.join(root, name))
>              for name in dirs:

>From http://docs.python.org/lib/module-tempfile.html: "The user of
mkdtemp() is responsible for deleting the temporary directory and its
contents when done with it."

/Nathan


More information about the Bf-committers mailing list