[Numpy-svn] r4711 - branches/build_with_scons/numpy/core

numpy-svn@scip... numpy-svn@scip...
Tue Jan 8 07:49:43 CST 2008


Author: cdavid
Date: 2008-01-08 07:49:39 -0600 (Tue, 08 Jan 2008)
New Revision: 4711

Modified:
   branches/build_with_scons/numpy/core/SConstruct
   branches/build_with_scons/numpy/core/scons_support.py
Log:
Remove deprecated builder for config.h

Modified: branches/build_with_scons/numpy/core/SConstruct
===================================================================
--- branches/build_with_scons/numpy/core/SConstruct	2008-01-08 13:46:46 UTC (rev 4710)
+++ branches/build_with_scons/numpy/core/SConstruct	2008-01-08 13:49:39 UTC (rev 4711)
@@ -11,7 +11,6 @@
 from numscons import write_info
 
 from scons_support import CheckBrokenMathlib, define_no_smp, \
-    generate_config_header, generate_config_header_emitter, \
     check_mlib, check_mlibs, is_npy_no_signal
 
 env = GetNumpyEnvironment(ARGUMENTS)
@@ -213,14 +212,10 @@
 umath_bld = Builder(action = generate_umath, 
                     emitter = generate_umath_emitter)
 
-config_h_bld = Builder(action = generate_config_header, 
-                       emitter = generate_config_header_emitter)
-
 env.Append(BUILDERS = {'GenerateMultiarrayApi' : array_api_gen_bld,
                        'GenerateUfuncApi' : ufunc_api_gen_bld,
                        'GenerateFromTemplate' : template_bld,
-                       'GenerateUmath' : umath_bld,
-                       'GenerateConfigHeader' : config_h_bld})
+                       'GenerateUmath' : umath_bld})
 
 #------------------------
 # Generate generated code
@@ -230,8 +225,6 @@
 # option ?)
 from os.path import join as pjoin
 
-#config_header = env.GenerateConfigHeader(pjoin(env['build_dir'], 'config.h'), [])
-
 scalartypes_src = env.GenerateFromTemplate(
                     pjoin(env['build_dir'], 'src', 'scalartypes'), 
                     pjoin(env['src_dir'], 'src', 'scalartypes.inc.src'))

Modified: branches/build_with_scons/numpy/core/scons_support.py
===================================================================
--- branches/build_with_scons/numpy/core/scons_support.py	2008-01-08 13:46:46 UTC (rev 4710)
+++ branches/build_with_scons/numpy/core/scons_support.py	2008-01-08 13:49:39 UTC (rev 4711)
@@ -93,43 +93,6 @@
     t = str(target[0]) + '.c'
     return ([t], source)
     
-#-------------------
-# Generate config.h 
-#-------------------
-def generate_config_header(target, source, env):
-    t = open(str(target[0]), 'w')
-    if not env.has_key('CONFIG_H_GEN'):
-        # XXX
-        assert 0 == 1
-    sym = env['CONFIG_H_GEN']
-    def write_symbol(define, value):
-        if value == 1:
-            return "#define %s\n\n" % define
-        elif value == 0:
-            return "/* #undef %s */\n\n" % define
-        elif isstring(value):
-            return "#define %s %s\n\n" % (define, value)
-        else:
-            return "#define %s %s\n\n" % (define, ','.join(value))
-    t.writelines([write_symbol(i[0], i[1]) for i in sym])
-    t.write('\n')
-    t.close()
-
-    print 'File: %s' % target[0]
-    target_f = open(str(target[0]))
-    print target_f.read()
-    target_f.close()
-    print 'EOF'
-    return 0
-
-def generate_config_header_emitter(target, source, env):
-    """Add dependency from config list  CONFIG_H_GEN to target.  Returns
-    original target, source tuple unchanged.  """
-    from SCons.Script import Depends
-    d = deepcopy(env['CONFIG_H_GEN']) # copy it
-    Depends(target, SCons.Node.Python.Value(d))
-    return target, source
-
 #-----------------------------------------
 # Other functions related to configuration
 #-----------------------------------------



More information about the Numpy-svn mailing list