bugBos Wars - Bugs: bug #24221, env.Copy is deprecated (Scons)

 
 

bug #24221: env.Copy is deprecated (Scons)

Submitted by:  Loïs Taulelle <GruiicK>
Submitted on:  Mon 08 Sep 2008 09:32:55 AM UTC  
 
Severity: 2 - MinorItem Group: Bug
Status: FixedPrivacy: Public
Assigned to: François Beerten <feb>Open/Closed: Closed

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Thu 23 Jul 2009 06:37:20 PM UTC, comment #1:

Fixed in the development version. This change now requires to use a newer version of SCons.

Thanks for the report.

François Beerten <feb>
Project AdministratorIn charge of this item.
Mon 08 Sep 2008 09:32:55 AM UTC, original submission:

On a Debian testing uptodate (2008/09/08), Scons tells us :

scons: warning: The env.Copy() method is deprecated; use the env.Clone() method instead.

The proposed patch seems to correct the problem:
svn diff
Index: SConstruct
===================================================================
--- SConstruct (r�ision 9568)
+++ SConstruct (copie de travail)
@@ -52,7 +52,7 @@
env = Environment(ENV = {'PATH':os.environ['PATH']}) # for an unknown reason Environment(options=opts) doesnt work well
opts.Update(env) # Needed as Environment(options=opts) doesnt seem to work
Help(opts.GenerateHelpText(env))
-mingw = env.Copy()
+mingw = env.Clone()
optionsChanged = True
if os.path.exists('build_options.py'):
os.rename('build_options.py', 'build_options_OLD_FOR_CHECK.py')
@@ -264,7 +264,7 @@
addBosWarsPaths(env)

# define the different build environments (variants)
-release = env.Copy()
+release = env.Clone()
release.Append(CCFLAGS = Split('-O2 -pipe -fomit-frame-pointer -fexpensive-optimizations -ffast-math'))

if mingw['extrapath']:
@@ -283,17 +283,17 @@
else:
mingw = None

-debug = env.Copy()
+debug = env.Clone()
debug.Append(CPPDEFINES = 'DEBUG')
debug.Append(CCFLAGS = Split('-g -Wsign-compare -Wall -Werror'))

-profile = debug.Copy()
+profile = debug.Clone()
profile.Append(CCFLAGS = Split('-pg'))
profile.Append(LINKFLAGS = Split('-pg'))

staticenv = None
if sys.platform.startswith('linux'):
- staticenv = release.Copy()
+ staticenv = release.Clone()
staticlibs = 'lua lua50 lua5.0 lua5.1 lua51 lualib lualib50 lualib5.0 vorbis theora ogg'
staticlibs = staticlibs.split(' ')
linkflags = '-L. -static-libgcc -Wl,-Bstatic -lstdc++ '

Loïs Taulelle <GruiicK>
Project Member

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by feb (Posted a comment)
  • -unavailable- added by GruiicK (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu 23 Jul 2009 06:37:20 PM UTCfebSeverity3 - Normal=>2 - Minor
      StatusNone=>Fixed
      Open/ClosedOpen=>Closed
    Wed 12 Nov 2008 11:13:13 PM UTCjsalmon3Assigned toNone=>feb

    Back to the top


    Powered by Savane 3.1-cleanup1