[cig-commits] r5696 - in short/3D/PyLith/branches/pylith-0.8: .
pylith3d
leif at geodynamics.org
leif at geodynamics.org
Mon Jan 8 15:27:14 PST 2007
Author: leif
Date: 2007-01-08 15:27:14 -0800 (Mon, 08 Jan 2007)
New Revision: 5696
Modified:
short/3D/PyLith/branches/pylith-0.8/configure.ac
short/3D/PyLith/branches/pylith-0.8/pylith3d/Makefile.am
short/3D/PyLith/branches/pylith-0.8/setup.py
Log:
Issue32: "make install" is now optional. Users can now simply
"configure", "make", and then add the "pylith3d" subdirectory of the
source/build directory to their PATH.
In this mode, changes to C++ simply require a "make" from the
top-level directory. Changes to the Python code do not require you to
run "make" at all -- simply re-run 'pylith3dapp.py'.
Also: Changed the 'configure' option '--with-embedding' to
'--enable-embedding', for consistency with CitcomS.
Note: when configured with '--disable-embedding', "make install" is
NOT optional. This is because the PyLith extension module has the
same name as the top-level package ('pylith3d'). The extension module
must be installed under the package directory in order for everything
to work. There are two possible fixes: 1) tweak the build so that
'pylith3dmodule.so' lands under 'pylith3d'; or 2) rename the extension
module.
Modified: short/3D/PyLith/branches/pylith-0.8/configure.ac
===================================================================
--- short/3D/PyLith/branches/pylith-0.8/configure.ac 2007-01-08 23:09:47 UTC (rev 5695)
+++ short/3D/PyLith/branches/pylith-0.8/configure.ac 2007-01-08 23:27:14 UTC (rev 5696)
@@ -13,10 +13,10 @@
# 'configure' options
AC_ARG_VAR(PYTHON, [Python interpreter])
AC_ARG_VAR(PYTHONPATH, [Python module search path])
-AC_ARG_WITH([embedding],
- [AC_HELP_STRING([--with-embedding],
+AC_ARG_ENABLE([embedding],
+ [AC_HELP_STRING([--enable-embedding],
[embed Python with PyLith in a single executable @<:@default=yes@:>@])],
- [want_embedding="$withval"],
+ [want_embedding="$enableval"],
[want_embedding=yes])
AM_CONDITIONAL([COND_EMBEDDING], [test "$want_embedding" = yes])
Modified: short/3D/PyLith/branches/pylith-0.8/pylith3d/Makefile.am
===================================================================
--- short/3D/PyLith/branches/pylith-0.8/pylith3d/Makefile.am 2007-01-08 23:09:47 UTC (rev 5695)
+++ short/3D/PyLith/branches/pylith-0.8/pylith3d/Makefile.am 2007-01-08 23:27:14 UTC (rev 5696)
@@ -3,12 +3,19 @@
SUBDIRS = libpylith3d module utils
+abs_top_builddir = @abs_top_builddir@
+abs_builddir = @abs_builddir@
+
bin_PROGRAMS =
if COND_EMBEDDING
bin_PROGRAMS += pypylith3d
INTERPRETER = $(bindir)/pypylith3d
+ noinstINTERPRETER = $(abs_builddir)/pypylith3d
+ noinstPYTHONPATH = $(abs_top_builddir)/python
else
INTERPRETER = $(PYTHON)
+ noinstINTERPRETER = $(PYTHON)
+ noinstPYTHONPATH = $(abs_top_builddir)/python:$(abs_top_builddir)/pylith3d/module/.libs
endif
# pylith3d
@@ -50,14 +57,27 @@
$(PYTHON_LDLAST)
# applications
-nodist_bin_SCRIPTS = pylith3dapp.py
-do_subst = sed \
- -e 's|[@]INTERPRETER[@]|$(INTERPRETER)|g' \
- -e 's|[@]PYTHONPATH[@]|$(PYTHONPATH)|g'
-pylith3dapp.py: $(srcdir)/applications/pylith3dapp.py
- $(do_subst) < $(srcdir)/applications/pylith3dapp.py > $@ || (rm -f $@ && exit 1)
-CLEANFILES = $(nodist_bin_SCRIPTS)
+bin_SCRIPTS = pylith3dapp.py
+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
+pylith3dapp.py: $(srcdir)/applications/pylith3dapp.py Makefile
+ $(do_build) < $(srcdir)/applications/pylith3dapp.py > $@ || (rm -f $@ && exit 1)
+ chmod +x $@
+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 = applications/pylith3dapp.py
+CLEANFILES = $(bin_SCRIPTS)
# examples
EXTRA_DIST += \
Modified: short/3D/PyLith/branches/pylith-0.8/setup.py
===================================================================
--- short/3D/PyLith/branches/pylith-0.8/setup.py 2007-01-08 23:09:47 UTC (rev 5695)
+++ short/3D/PyLith/branches/pylith-0.8/setup.py 2007-01-08 23:27:14 UTC (rev 5696)
@@ -10,7 +10,8 @@
version = '0.8.2',
zip_safe = False,
- packages = find_packages(),
+ package_dir = { "":"pylith3d" },
+ packages = find_packages("pylith3d"),
install_requires = [
'pythia[mpi] >= 0.8.1.0, < 0.8.2a',
More information about the cig-commits
mailing list