ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/build_utils/vstamp.py
Revision: 1.1
Committed: Sun Jul 4 12:08:47 2004 UTC (19 years, 9 months ago) by schorsch
Content type: text/x-python
Branch: MAIN
CVS Tags: rad4R2P2, rad5R0, rad5R1, rad3R7P2, rad3R7P1, rad4R2, rad4R1, rad4R0, rad3R6, rad3R6P1, rad3R8, rad3R9, rad4R2P1
Log Message:
Updated SCons build environment to work with a fresh download and on OS X, as suggested by Randolph Fritz.

File Contents

# User Rev Content
1 schorsch 1.1
2     import getpass
3     import socket
4     import string
5     import time
6    
7     # create a version stamp
8     def build_version_c(target, source, env):
9     s = open (str(source[0]), 'r')
10     radver = string.strip (s.readline ())
11     s.close()
12     date = time.ctime (time.time())
13     user = getpass.getuser()
14     sysname = socket.gethostname()
15     t = open (str(target[0]), 'w')
16     t.write (
17     'char VersionID[]="%s lastmod %s by %s on %s";\n' %
18     (radver, date, user, sysname))
19     t.close()
20