[MOAB-dev] r3025 - in MOAB/trunk: . tools/iMesh tools/iMesh/python tools/iMesh/python/doc
jvporter at mcs.anl.gov
jvporter at mcs.anl.gov
Fri Jul 17 14:30:21 CDT 2009
Author: jvporter
Date: 2009-07-17 14:30:21 -0500 (Fri, 17 Jul 2009)
New Revision: 3025
Added:
MOAB/trunk/tools/iMesh/python/Makefile
MOAB/trunk/tools/iMesh/python/setup.cfg.in
Modified:
MOAB/trunk/configure.ac
MOAB/trunk/tools/iMesh/Makefile.am
MOAB/trunk/tools/iMesh/iMesh-Defs.inc.in
MOAB/trunk/tools/iMesh/python/doc/build.rst
MOAB/trunk/tools/iMesh/python/setup.py
Log:
* Begin integration of Python interface into autotools build system
* Minor adjustment to Python's lookup of iMesh-Defs.inc (see build.rst
for info)
Modified: MOAB/trunk/configure.ac
===================================================================
--- MOAB/trunk/configure.ac 2009-07-17 04:03:34 UTC (rev 3024)
+++ MOAB/trunk/configure.ac 2009-07-17 19:30:21 UTC (rev 3025)
@@ -42,6 +42,31 @@
################################################################################
+# PyTAPS
+################################################################################
+AC_ARG_ENABLE([pytaps],[
+AC_HELP_STRING([--enable-pytaps],[Build Python iMesh interface.])
+AC_HELP_STRING([--disable-pytaps],[Don't build Python iMesh interface.])
+],
+[ENABLE_pytaps=yes],
+[ENABLE_pytaps=no]
+)
+
+case $ENABLE_pytaps in
+ yes)
+ if test "x$with_pic" != "xyes"; then
+ AC_MSG_ERROR([Need PIC support for PyTAPS])
+ fi
+ ;;
+ no)
+ ;;
+ *)
+ AC_MSG_ERROR([Invalid argument to --enable-pytaps : $ENABLE_pytaps])
+ ;;
+esac
+AM_CONDITIONAL([ENABLE_pytaps],[test "xyes" == "x$ENABLE_pytaps"])
+
+################################################################################
# Compilers
################################################################################
@@ -268,7 +293,7 @@
# Optional Tools
###############################################################################
# Define a macro to avoid typing this for each individual tool
- # Usage: MB_OPTIOANL_TOOL( name, default )
+ # Usage: MB_OPTIONAL_TOOL( name, default )
# name - name of option
# default - yes/no, $ENABLE_TOOLS overrides this if set
# Actions:
@@ -900,6 +925,19 @@
fi
AM_CONDITIONAL(USE_BABEL, [test "xno" != "x$USE_BABEL"])
+################################################################################
+# PyTAPS libraries (Python/Numpy)
+################################################################################
+if test "x$ENABLE_pytaps" = "xyes"; then
+ AC_ARG_WITH(python,[AC_HELP_STRING([--with-python=DIR],
+ [Specify directory containing Python headers])],
+ [PYTHON_DIR=$withval])
+ AC_ARG_WITH(numpy,[AC_HELP_STRING([--with-numpy=DIR],
+ [Specify directory containing Numpy headers])],
+ [NUMPY_DIR=$withval])
+ AC_SUBST(PYTHON_DIR)
+ AC_SUBST(NUMPY_DIR)
+fi
################################################################################
# Output Files
@@ -923,7 +961,7 @@
AC_CONFIG_FILES([Makefile
moab.make
testdir.h
- parallel/Makefile
+ parallel/Makefile
mhdf/Makefile
test/Makefile
test/h5file/Makefile
@@ -931,17 +969,18 @@
test/obb/Makefile
test/perf/Makefile
tools/Makefile
- tools/iMesh/Makefile
- tools/iMesh/iMesh-Defs.inc
- tools/iMesh/SIDL/iMesh-SIDL-Defs.inc
- tools/iMesh/SIDL/Makefile
+ tools/iMesh/Makefile
+ tools/iMesh/iMesh-Defs.inc
+ tools/iMesh/SIDL/iMesh-SIDL-Defs.inc
+ tools/iMesh/SIDL/Makefile
tools/iMesh/SIDL/common.make
+ tools/iMesh/python/setup.cfg
tools/mbperf/Makefile
tools/mbchaco/Makefile
tools/mbcoupler/Makefile
- tools/mbzoltan/Config.moab
- tools/mbzoltan/Makefile
- tools/mcnpmit/Makefile
+ tools/mbzoltan/Config.moab
+ tools/mbzoltan/Makefile
+ tools/mcnpmit/Makefile
tools/qvdual/Makefile
tools/dagmc/Makefile
doc/Makefile
Modified: MOAB/trunk/tools/iMesh/Makefile.am
===================================================================
--- MOAB/trunk/tools/iMesh/Makefile.am 2009-07-17 04:03:34 UTC (rev 3024)
+++ MOAB/trunk/tools/iMesh/Makefile.am 2009-07-17 19:30:21 UTC (rev 3025)
@@ -5,10 +5,16 @@
babel_DIR = SIDL
else
babel_DIR =
-endif
+endif
-SUBDIRS = . $(babel_DIR)
+if ENABLE_pytaps
+ pytaps_DIR = python
+else
+ pytaps_DIR =
+endif
+SUBDIRS = . $(babel_DIR) $(pytaps_DIR)
+
INCLUDES = -I$(top_srcdir) -I$(top_builddir) -I.
DEFS += $(DEFINES) -DSRCDIR=$(srcdir)
Modified: MOAB/trunk/tools/iMesh/iMesh-Defs.inc.in
===================================================================
--- MOAB/trunk/tools/iMesh/iMesh-Defs.inc.in 2009-07-17 04:03:34 UTC (rev 3024)
+++ MOAB/trunk/tools/iMesh/iMesh-Defs.inc.in 2009-07-17 19:30:21 UTC (rev 3025)
@@ -12,7 +12,7 @@
IMESH_INCLUDES = -I$(IMESH_INCLUDEDIR)
IMESH_LIBS = $(IMESH_LDFLAGS) -L$(MOAB_LIBDIR) \
- -L${IMESH_LIBDIR} -liMesh -lMOAB \
+ -L$(IMESH_LIBDIR) -liMesh -lMOAB \
@NETCDF_LIBS@ @HDF5_LIBS@ @LIBS@ \
$(IMESH_CXX_LDFLAGS) $(IMESH_CXX_LIBS) \
@CGM_LDFLAGS@ @CGM_LIBS@
Added: MOAB/trunk/tools/iMesh/python/Makefile
===================================================================
--- MOAB/trunk/tools/iMesh/python/Makefile (rev 0)
+++ MOAB/trunk/tools/iMesh/python/Makefile 2009-07-17 19:30:21 UTC (rev 3025)
@@ -0,0 +1,5 @@
+all:
+ python setup.py build
+
+install-exec:
+ python setup.py install
Modified: MOAB/trunk/tools/iMesh/python/doc/build.rst
===================================================================
--- MOAB/trunk/tools/iMesh/python/doc/build.rst 2009-07-17 04:03:34 UTC (rev 3024)
+++ MOAB/trunk/tools/iMesh/python/doc/build.rst 2009-07-17 19:30:21 UTC (rev 3025)
@@ -12,7 +12,8 @@
options ``--imesh-dir=PATH`` to the `build_ext` and `perf_build` commands. For
example, if your `iMesh-Defs.inc` is located in
`/usr/local/iMesh/lib/iMesh-Defs.inc`, then ``--imesh-dir`` should be
-`/usr/local/iMesh`. This options may also be specified in the `setup.cfg` file:
+`/usr/local/iMesh/lib`. This options may also be specified in the `setup.cfg`
+file:
.. literalinclude:: ../setup.cfg.example
:language: ini
@@ -70,7 +71,7 @@
+--------------------------+--------+---------------------------------------+
| ``--libraries=LIBS`` | ``-l`` | list of libraries to link to |
+--------------------------+--------+---------------------------------------+
-| ``--imesh-dir=PATH`` | N/A | root location of iMesh implementation |
+| ``--imesh-dir=PATH`` | N/A | root location of iMesh libraries |
+--------------------------+--------+---------------------------------------+
Running the Performance Test
Added: MOAB/trunk/tools/iMesh/python/setup.cfg.in
===================================================================
--- MOAB/trunk/tools/iMesh/python/setup.cfg.in (rev 0)
+++ MOAB/trunk/tools/iMesh/python/setup.cfg.in 2009-07-17 19:30:21 UTC (rev 3025)
@@ -0,0 +1,3 @@
+[build_ext]
+imesh-dir = @abs_srcdir@/..
+include-dirs = @PYTHON_DIR@:@NUMPY_DIR@:@abs_top_srcdir@
Modified: MOAB/trunk/tools/iMesh/python/setup.py
===================================================================
--- MOAB/trunk/tools/iMesh/python/setup.py 2009-07-17 04:03:34 UTC (rev 3024)
+++ MOAB/trunk/tools/iMesh/python/setup.py 2009-07-17 19:30:21 UTC (rev 3025)
@@ -14,7 +14,7 @@
return tmp
def add_imesh_defs(imesh_dir, self):
- defs = parse_makefile( os.path.join(imesh_dir, 'lib/iMesh-Defs.inc') )
+ defs = parse_makefile( os.path.join(imesh_dir, 'iMesh-Defs.inc') )
lib_match = re.compile(r'(?:(?<=\s)|^)-([lL])\s*(\S*)')
for match in lib_match.finditer( defs['IMESH_LIBS'] ):
More information about the moab-dev
mailing list