[cig-commits] r6877 - in short/3D/PyLith/trunk: . applications
pylith
leif at geodynamics.org
leif at geodynamics.org
Mon May 14 16:05:07 PDT 2007
Author: leif
Date: 2007-05-14 16:05:07 -0700 (Mon, 14 May 2007)
New Revision: 6877
Added:
short/3D/PyLith/trunk/applications/pylith.in
Removed:
short/3D/PyLith/trunk/applications/pylithic.py.in
Modified:
short/3D/PyLith/trunk/applications/Makefile.am
short/3D/PyLith/trunk/configure.ac
short/3D/PyLith/trunk/pylith/PyLithApp.py
Log:
Use nemesis. Changed top-level command to simply 'pylith'.
Modified: short/3D/PyLith/trunk/applications/Makefile.am
===================================================================
--- short/3D/PyLith/trunk/applications/Makefile.am 2007-05-14 23:03:20 UTC (rev 6876)
+++ short/3D/PyLith/trunk/applications/Makefile.am 2007-05-14 23:05:07 UTC (rev 6877)
@@ -10,12 +10,29 @@
# ----------------------------------------------------------------------
#
-bin_SCRIPTS = pylithic.py
-do_build = sed -e s%[@]PYTHONPATH[@]%$(PYTHONPATH)%g
-pylithic.py: $(srcdir)/pylithic.py.in Makefile
- $(do_build) < $(srcdir)/pylithic.py.in > $@ || (rm -f $@ && exit 1)
+INTERPRETER = $(PYTHON)
+noinstINTERPRETER = $(PYTHON)
+
+bin_SCRIPTS = pylith
+do_build = sed -e s%[@]INTERPRETER[@]%$(noinstINTERPRETER)%g -e s%[@]PYTHONPATH[@]%$(noinstPYTHONPATH)%g
+do_install = sed -e s%[@]INTERPRETER[@]%$(INTERPRETER)%g -e s%[@]PYTHONPATH[@]%$(PYTHONPATH)%g
+pylith: $(srcdir)/pylith.in Makefile
+ $(do_build) < $(srcdir)/pylith.in > $@ || (rm -f $@ && exit 1)
chmod +x $@
-EXTRA_DIST = pylithic.py.in
+install-binSCRIPTS: $(bin_SCRIPTS)
+ @$(NORMAL_INSTALL)
+ test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)"
+ @list='$(bin_SCRIPTS)'; for p in $$list; do \
+ if test -f "$$p.in"; then d=; else d="$(srcdir)/"; fi; \
+ if test -f $$d$$p.in; then \
+ f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \
+ echo " $(do_install) '$$d$$p.in' > '$(DESTDIR)$(bindir)/$$f'"; \
+ $(do_install) "$$d$$p.in" > "$(DESTDIR)$(bindir)/$$f"; \
+ echo " chmod +x '$(DESTDIR)$(bindir)/$$f'"; \
+ chmod +x "$(DESTDIR)$(bindir)/$$f"; \
+ else :; fi; \
+ done
+EXTRA_DIST = pylith.in
CLEANFILES = $(bin_SCRIPTS)
# version
Copied: short/3D/PyLith/trunk/applications/pylith.in (from rev 6874, short/3D/PyLith/trunk/applications/pylithic.py.in)
===================================================================
--- short/3D/PyLith/trunk/applications/pylithic.py.in 2007-05-14 19:22:59 UTC (rev 6874)
+++ short/3D/PyLith/trunk/applications/pylith.in 2007-05-14 23:05:07 UTC (rev 6877)
@@ -0,0 +1,35 @@
+#!@INTERPRETER@
+# -*- Python -*-
+#
+# ----------------------------------------------------------------------
+#
+# Brad T. Aagaard
+# U.S. Geological Survey
+#
+# <LicenseText>
+#
+# ----------------------------------------------------------------------
+#
+
+## @file applications/pylith
+## @brief Python PyLith application driver
+
+__requires__ = "PyLith"
+
+if __name__ == "__main__":
+
+ # re-create the PYTHONPATH at 'configure' time
+ import os.path, sys, site
+ path = '@PYTHONPATH@'.split(':')
+ path.reverse()
+ for directory in path:
+ if directory:
+ directory = os.path.abspath(directory)
+ sys.path.insert(1, directory)
+ site.addsitedir(directory)
+
+ from pylith.PyLithApp import PyLithApp
+ from pyre.applications import start
+ start(applicationClass=PyLithApp)
+
+# End of file
Deleted: short/3D/PyLith/trunk/applications/pylithic.py.in
===================================================================
--- short/3D/PyLith/trunk/applications/pylithic.py.in 2007-05-14 23:03:20 UTC (rev 6876)
+++ short/3D/PyLith/trunk/applications/pylithic.py.in 2007-05-14 23:05:07 UTC (rev 6877)
@@ -1,39 +0,0 @@
-#!/usr/bin/env python
-#
-# ----------------------------------------------------------------------
-#
-# Brad T. Aagaard
-# U.S. Geological Survey
-#
-# <LicenseText>
-#
-# ----------------------------------------------------------------------
-#
-
-## @file applications/pylith.py
-## @brief Python PyLith application driver
-
-__requires__ = "PyLith"
-
-if __name__ == "__main__":
-
- # re-create the PYTHONPATH at 'configure' time
- import os.path, sys, site
- path = '@PYTHONPATH@'.split(':')
- path.reverse()
- for directory in path:
- if directory:
- directory = os.path.abspath(directory)
- sys.path.insert(1, directory)
- site.addsitedir(directory)
-
- from pylith.PyLithApp import PyLithApp
-
- app = PyLithApp()
- app.run()
-
- #from pyre.applications import start
- #start(applicationClass=PyLithApp)
-
-
-# End of file
Modified: short/3D/PyLith/trunk/configure.ac
===================================================================
--- short/3D/PyLith/trunk/configure.ac 2007-05-14 23:03:20 UTC (rev 6876)
+++ short/3D/PyLith/trunk/configure.ac 2007-05-14 23:05:07 UTC (rev 6877)
@@ -62,6 +62,7 @@
AC_PROG_INSTALL
# PYTHON
+CIT_PATH_NEMESIS
AM_PATH_PYTHON([2.3])
CIT_PYTHON_SYSCONFIG
Modified: short/3D/PyLith/trunk/pylith/PyLithApp.py
===================================================================
--- short/3D/PyLith/trunk/pylith/PyLithApp.py 2007-05-14 23:03:20 UTC (rev 6876)
+++ short/3D/PyLith/trunk/pylith/PyLithApp.py 2007-05-14 23:05:07 UTC (rev 6877)
@@ -14,8 +14,7 @@
##
## @brief Python PyLith application
-#from mpi.Application import Application
-from pyre.applications.Script import Script as Application
+from mpi import Application
# PyLithApp class
class PyLithApp(Application):
@@ -75,7 +74,7 @@
return
- def main(self):
+ def main(self, *args, **kwds):
"""
Run the application.
"""
More information about the cig-commits
mailing list