Changeset 98 for trunk/SConstruct

Show
Ignore:
Timestamp:
11/29/05 19:25:45 (3 years ago)
Author:
pavlenko
Message:

extra option EXTENSIONS (defaults to none)

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/SConstruct

    r93 r98  
    2929opts.Add(PathOption('PYTHON_ROOT','python root directory','/opt/python')) 
    3030opts.Add('PYTHON_VERSION','python version','2.4') 
    31 opts.Add(ListOption('DATASOURCES','list of available datasources','shape',['postgis','shape','raster']))  
     31opts.Add(ListOption('DATASOURCES','list of available datasources','all',['postgis','shape','raster']))  
     32opts.Add(ListOption('EXTENSIONS','list of available extensions','none',['python'])) 
    3233opts.Add('POSTGRESQL_ROOT','path to postgresql prefix','/usr/local') 
    3334     
     
    8788SConscript('src/SConscript') 
    8889 
    89 #python ext 
    90 SConscript('python/SConscript') 
     90import string 
     91 
     92#python bindings 
     93 
     94if 'python' in [string.strip(m) for m in Split(env['EXTENSIONS'])]: 
     95    SConscript('python/SConscript') 
    9196 
    9297#shapeindex 
     
    9499 
    95100#datasources 
    96 for datasource in Split(env['DATASOURCES']): 
    97     env.BuildDir('build/datasources/'+datasource,'src/datasources/'+datasource,duplicate=0) 
    98     SConscript('datasources/'+datasource+'/SConscript') 
     101def build_datasource(name): 
     102    env.BuildDir('build/datasources/' + name,'src/datasources/'+name,duplicate=0) 
     103    SConscript('datasources/' + name + '/SConscript') 
     104     
     105[build_datasource(name) for name in Split(env['DATASOURCES'])] 
    99106 
    100107 
    101108 
     109