[cig-commits] commit: Remove configure.py and scons.py since they need subprocess. Also build Gale and not StGermain
Mercurial
hg at geodynamics.org
Thu Apr 1 08:40:01 PDT 2010
changeset: 276:4c99349a001b
user: Walter Landry <wlandry at caltech.edu>
date: Thu Apr 01 07:09:07 2010 -0700
files: SConfigure SConstruct configure.py configure.sh scons scons.py
description:
Remove configure.py and scons.py since they need subprocess. Also build Gale and not StGermain
diff -r 8fb4d7491dd4 -r 4c99349a001b SConfigure
--- a/SConfigure Thu Apr 01 07:07:42 2010 -0700
+++ b/SConfigure Thu Apr 01 07:09:07 2010 -0700
@@ -208,6 +208,6 @@ print
print
print '***************************************'
print '* Successfully configured. *'
-print '* Now run \'./scons.py\' to build. *'
+print '* Now run \'./scons\' to build. *'
print '***************************************'
print
diff -r 8fb4d7491dd4 -r 4c99349a001b SConstruct
--- a/SConstruct Thu Apr 01 07:07:42 2010 -0700
+++ b/SConstruct Thu Apr 01 07:09:07 2010 -0700
@@ -1,4 +1,4 @@ import sys, os, subprocess, platform
-import sys, os, subprocess, platform
+import sys, os, platform
EnsureSConsVersion(0, 98)
@@ -34,6 +34,7 @@ env["INST_PREFIX"] = env["prefix"]
env["INST_PREFIX"] = env["prefix"]
env.Default(env["build_dir"])
+
# Add the build directory's include path.
env.AppendUnique(CPPPATH=env['build_dir'] + '/include')
@@ -53,18 +54,7 @@ if not env['shared_libs']:
env.AppendUnique(CPPDEFINES=['NOSHARED'])
# Need to extract some kind of hg version number.
-subp = subprocess.Popen("hg identify",
- stdout=subprocess.PIPE,
- stderr=subprocess.PIPE,
- shell=True)
-out, err = subp.communicate()
-res = subp.wait()
-if res:
- print "Failed to extract hg revision number."
- hg_ver = 'unknown'
-else:
- hg_ver = out.split()[0].strip()
-env.AppendUnique(CPPDEFINES=[("VERSION", env["ESCAPE"]('"' + hg_ver + '"'))])
+env.AppendUnique(CPPDEFINES=[("VERSION", env["ESCAPE"]('"' + 'unknown' + '"'))])
# Need to insert some 'HAVE_*' definitions based on what packages we
# found during configuration.
@@ -126,7 +116,7 @@ if env['with_glucifer']:
#
if env['static_libs']:
- env.Program('bin/StGermain',
+ env.Program('bin/Gale',
['StGermain/src/main.c',
File(env['build_dir'] + '/StGermain/stg_static_modules.c').abspath])
diff -r 8fb4d7491dd4 -r 4c99349a001b configure.py
--- a/configure.py Thu Apr 01 07:07:42 2010 -0700
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,6 +0,0 @@
-#!/usr/bin/env python
-import sys, subprocess, shutil, os
-subp = subprocess.Popen(
- 'config/scons/scons.py --config=force -f SConfigure ' + ' '.join(sys.argv[1:]), shell=True
-)
-subp.wait()
diff -r 8fb4d7491dd4 -r 4c99349a001b configure.sh
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/configure.sh Thu Apr 01 07:09:07 2010 -0700
@@ -0,0 +1,2 @@
+#!/bin/sh
+config/scons/scons.py --config=force -f SConfigure "$@"
diff -r 8fb4d7491dd4 -r 4c99349a001b scons
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/scons Thu Apr 01 07:09:07 2010 -0700
@@ -0,0 +1,2 @@
+#!/bin/sh
+config/scons/scons.py "$@"
diff -r 8fb4d7491dd4 -r 4c99349a001b scons.py
--- a/scons.py Thu Apr 01 07:07:42 2010 -0700
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,20 +0,0 @@
-#!/usr/bin/env python
-import os, sys, subprocess
-subp = subprocess.Popen(
- 'config/scons/scons.py ' + ' '.join(sys.argv[1:]), shell=True
-)
-subp.wait()
-
-# A manual way of displaying the result of the integration and
-# convergence tests from ./scons.py check*.
-if len( sys.argv ) > 1:
- if sys.argv[1] >= "check":
- filename = "summary.dat"
- if os.path.exists( filename ):
- FILE = open( filename, "r" )
- print "--------------------------------------------------------\n" + \
- "[SYS] SYSTEM TESTS SUMMARY \n" + \
- "--------------------------------------------------------"
- print FILE.read()
- FILE.close()
- os.remove( filename )
More information about the CIG-COMMITS
mailing list