[Commits] (markie) Grabbed some stuff from hardhat.py to setup
hardhatlib
commits at osafoundation.org
commits at osafoundation.org
Mon Apr 26 12:56:34 PDT 2004
Commit by: markie
Modified files:
osaf/hardhat/buildscripts/new-chandler.py 1.14 1.15
Log message:
Grabbed some stuff from hardhat.py to setup hardhatlib
ViewCVS links:
http://cvs.osafoundation.org/index.cgi/osaf/hardhat/buildscripts/new-chandler.py.diff?r1=text&tr1=1.14&r2=text&tr2=1.15
Index: osaf/hardhat/buildscripts/new-chandler.py
diff -u osaf/hardhat/buildscripts/new-chandler.py:1.14 osaf/hardhat/buildscripts/new-chandler.py:1.15
--- osaf/hardhat/buildscripts/new-chandler.py:1.14 Mon Apr 26 12:40:44 2004
+++ osaf/hardhat/buildscripts/new-chandler.py Mon Apr 26 12:56:03 2004
@@ -20,9 +20,46 @@
mainModule = 'chandler'
logPath = 'hardhat.log'
+# Here is a trick to figure out what directory hardhat lives in, even if
+# we were called found by the user's PATH
+whereAmI = os.path.dirname(os.path.abspath(hardhatlib.__file__))
+
def Start(hardhatScript, workingDir, cvsVintage, buildVersion, clobber, log):
global ret
+
+ try:
+ buildenv = hardhatlib.defaults
+ buildenv['root'] = workingDir
+ buildenv['hardhatroot'] = whereAmI
+ hardhatlib.init(buildenv)
+
+ except hardhatlib.HardHatMissingCompilerError:
+ print "Could not locate compiler. Exiting."
+ sys.exit(1)
+
+ except hardhatlib.HardHatUnknownPlatformError:
+ print "Unsupported platform, '" + os.name + "'. Exiting."
+ sys.exit(1)
+
+ except hardhatlib.HardHatRegistryError:
+ print
+ print "Sorry, I am not able to read the windows registry to find"
+ print "the necessary VisualStudio complier settings. Most likely you"
+ print "are running the Cygwin python, which will hopefully be supported"
+ print "soon. Please download a windows version of python from:\n"
+ print "http://www.python.org/download/"
+ print
+ sys.exit(1)
+
+ except Exception, e:
+ print "Could not initialize hardhat environment. Exiting."
+ print "Exception:", e
+ traceback.print_exc()
+ raise e
+ sys.exit(1)
+
+ hardhatlib.log_rotate(buildenv)
# find path to buildscripts
# thisScriptDir = buildenv['hardhatroot'] + os.sep + "buildscripts"
More information about the Commits
mailing list