/[ascend]/trunk/models/SConscript
ViewVC logotype

Annotation of /trunk/models/SConscript

Parent Directory Parent Directory | Revision Log Revision Log


Revision 811 - (hide annotations) (download)
Thu Aug 10 17:08:16 2006 UTC (17 years, 10 months ago) by johnpye
File size: 860 byte(s)
Added vim 'syntax=python' comments to many SConscript files.
Lots more work on the datareader extfn.
The testtmy.a4c file requires the file obtained here ('gzip -d' before use)
http://rredc.nrel.gov/solar/old_data/nsrdb/tmy2/unix/23161.tm2.Z
1 johnpye 449 Import('env')
2    
3 johnpye 811 env.SConscript(['johnpye/SConscript'],['env'])
4    
5 johnpye 561 import os, os.path
6 johnpye 449
7 johnpye 561 modelfiles = []
8 johnpye 449
9 johnpye 561 excludedirs = ['.svn','CVS']
10 johnpye 568 excludefiles = ['Makefile.in','SConscript','update-Makefile.pl']
11 johnpye 449
12 johnpye 561 modeldir = env.Dir(".").abspath
13 johnpye 449
14 johnpye 561 cwd = os.getcwd()
15     os.chdir(modeldir)
16     for root,dirs,files in os.walk("."):
17     for d in dirs:
18     if d in excludedirs:
19     dirs.remove(d)
20     for f in files:
21     if f in excludefiles:
22     continue
23     modelfiles.append( os.path.normpath(os.path.join(root,f)) )
24     os.chdir(cwd)
25 johnpye 449
26 johnpye 721 modelsroot = env['INSTALL_ROOT']+env['INSTALL_MODELS']
27 johnpye 561
28     installeddirs = []
29    
30     for f in modelfiles:
31     head,tail = os.path.split(f)
32     targetdir = os.path.join(modelsroot,head)
33     if not targetdir in installeddirs:
34     installeddirs.append(targetdir)
35 johnpye 629 env.InstallShared(targetdir,f)
36 johnpye 561
37     #print "MODEL INSTALLED DIRS =",installeddirs
38     Return('installeddirs')
39 johnpye 811
40     # vim: set syntax=python:
41    

john.pye@anu.edu.au
ViewVC Help
Powered by ViewVC 1.1.22