Commit a99edbc0 authored by Karl Wette's avatar Karl Wette
Browse files

Make Python an optional dependency for LALSuite packages

- Use LALSUITE_REQUIRE_PYTHON() to require a minimum Python version
- Use LALSUITE_CHECK_PYTHON() to check for Python
- Require python >= 2.6 for SWIG Python wrappings and wrapping generation
- Python-related rules must be surrounded by HAVE_PYTHON conditionals
Original: 6a7d85a73a7d6a3c04a0dd3a697c6256d1ff0c35
parent c8bb8732
# -*- mode: autoconf; -*- # -*- mode: autoconf; -*-
# lalsuite_build.m4 - top level build macros # lalsuite_build.m4 - top level build macros
# #
# serial 87 # serial 88
# not present in older versions of pkg.m4 # not present in older versions of pkg.m4
m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$]) m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$])
...@@ -182,7 +182,7 @@ AC_DEFUN([LALSUITE_ADD_PATH],[ ...@@ -182,7 +182,7 @@ AC_DEFUN([LALSUITE_ADD_PATH],[
AC_DEFUN([LALSUITE_CHECK_GIT_REPO],[ AC_DEFUN([LALSUITE_CHECK_GIT_REPO],[
# $0: check for git # $0: check for git
AC_PATH_PROGS(GIT,[git],[false]) AC_PATH_PROGS([GIT],[git],[false])
# check whether building from a git repository # check whether building from a git repository
have_git_repo=no have_git_repo=no
AS_IF([test "x${GIT}" != xfalse],[ AS_IF([test "x${GIT}" != xfalse],[
...@@ -196,7 +196,9 @@ AC_DEFUN([LALSUITE_CHECK_GIT_REPO],[ ...@@ -196,7 +196,9 @@ AC_DEFUN([LALSUITE_CHECK_GIT_REPO],[
AC_MSG_RESULT([${have_git_repo}]) AC_MSG_RESULT([${have_git_repo}])
]) ])
# conditional for git and building from a git repository # conditional for git and building from a git repository
AM_CONDITIONAL(HAVE_GIT_REPO,[test "x${have_git_repo}" = xyes]) AM_CONDITIONAL([HAVE_GIT_REPO],[test "x${have_git_repo}" = xyes])
# require Python for running generate_vcs_info.py
AM_COND_IF([HAVE_GIT_REPO],[LALSUITE_REQUIRE_PYTHON([2.6])])
# end $0 # end $0
]) ])
...@@ -325,6 +327,46 @@ AC_DEFUN([LALSUITE_PROG_COMPILERS],[ ...@@ -325,6 +327,46 @@ AC_DEFUN([LALSUITE_PROG_COMPILERS],[
# end $0 # end $0
]) ])
AC_DEFUN([LALSUITE_REQUIRE_PYTHON],[
# $0: require Python version $1 or later
AS_IF([test "x${lalsuite_require_pyvers}" = x],[
lalsuite_require_pyvers="$1"
],[
AS_VERSION_COMPARE([${lalsuite_require_pyvers}],[$1],[
lalsuite_require_pyvers="$1"
])
])
# end $0
])
AC_DEFUN([LALSUITE_CHECK_PYTHON],[
# $0: check for Python
lalsuite_pyvers="$1"
AS_IF([test "x${lalsuite_require_pyvers}" != x],[
AS_VERSION_COMPARE([${lalsuite_pyvers}],[${lalsuite_require_pyvers}],[
lalsuite_pyvers="${lalsuite_require_pyvers}"
])
])
AS_IF([test "x${PYTHON}" != xfalse],[
AM_PATH_PYTHON([${lalsuite_pyvers}],,[
AS_IF([test "x${lalsuite_require_pyvers}" = x],[
PYTHON=false
],[
AC_MSG_ERROR([Python version ${lalsuite_pyvers} or higher is required])
])
])
])
AM_CONDITIONAL([HAVE_PYTHON],[test "x${PYTHON}" != xfalse])
AM_COND_IF([HAVE_PYTHON],[
AC_SUBST([python_prefix], [`${PYTHON} -c 'import sys; print(sys.prefix)' 2>/dev/null`])
AC_SUBST([python_exec_prefix], [`${PYTHON} -c 'import sys; print(sys.exec_prefix)' 2>/dev/null`])
PYTHON_ENABLE_VAL=ENABLED
],[
PYTHON_ENABLE_VAL=DISABLED
])
# end $0
])
AC_DEFUN([LALSUITE_USE_LIBTOOL],[ AC_DEFUN([LALSUITE_USE_LIBTOOL],[
# $0: Generate a libtool script for use in configure tests # $0: Generate a libtool script for use in configure tests
AC_REQUIRE([LT_INIT]) AC_REQUIRE([LT_INIT])
......
SUFFIXES = .py SUFFIXES = .py
.PHONY: pymodule-all-local
.PHONY: pymodule-mostlyclean-local
.PHONY: pybin-clean-local
.PHONY: pybin-dist-hook
if HAVE_PYTHON
pybindir = $(bindir) pybindir = $(bindir)
BUILT_SOURCES += $(pymodule_PYTHON) $(pybin_SCRIPTS) BUILT_SOURCES += $(pymodule_PYTHON) $(pybin_SCRIPTS)
MOSTLYCLEANFILES += $(pybin_SCRIPTS) MOSTLYCLEANFILES += $(pybin_SCRIPTS)
...@@ -8,7 +16,6 @@ python_install_script = $(top_srcdir)/gnuscripts/lalsuite_python_install_script ...@@ -8,7 +16,6 @@ python_install_script = $(top_srcdir)/gnuscripts/lalsuite_python_install_script
INSTALL_SCRIPT = $(python_install_script) $(INSTALL) INSTALL_SCRIPT = $(python_install_script) $(INSTALL)
EXTRA_DIST += $(python_install_script) EXTRA_DIST += $(python_install_script)
.PHONY: pymodule-all-local
all-local: pymodule-all-local all-local: pymodule-all-local
pymodule-all-local: pymodule-mostlyclean-local pymodule-all-local: pymodule-mostlyclean-local
$(AM_V_at)if test "x$(builddir)" != "x$(srcdir)"; then \ $(AM_V_at)if test "x$(builddir)" != "x$(srcdir)"; then \
...@@ -19,7 +26,6 @@ pymodule-all-local: pymodule-mostlyclean-local ...@@ -19,7 +26,6 @@ pymodule-all-local: pymodule-mostlyclean-local
done; \ done; \
fi fi
.PHONY: pymodule-mostlyclean-local
mostlyclean-local: pymodule-mostlyclean-local mostlyclean-local: pymodule-mostlyclean-local
pymodule-mostlyclean-local: pymodule-mostlyclean-local:
$(AM_V_at)if test "x$(builddir)" != "x$(srcdir)"; then \ $(AM_V_at)if test "x$(builddir)" != "x$(srcdir)"; then \
...@@ -56,14 +62,22 @@ $(pybin_SCRIPTS): Makefile ...@@ -56,14 +62,22 @@ $(pybin_SCRIPTS): Makefile
chmod +x $@.tmp || exit 1; \ chmod +x $@.tmp || exit 1; \
mv -f $@.tmp $@ mv -f $@.tmp $@
.PHONY: pybin-clean-local
clean-local: pybin-clean-local clean-local: pybin-clean-local
pybin-clean-local: pybin-clean-local:
-rm -rf .pybin/ -rm -rf .pybin/
.PHONY: pybin-dist-hook
dist-hook: pybin-dist-hook dist-hook: pybin-dist-hook
pybin-dist-hook: pybin-dist-hook:
for file in $(pybin_SCRIPTS); do \ for file in $(pybin_SCRIPTS); do \
cp "$(srcdir)/$${file}.py" "$(distdir)"; \ cp "$(srcdir)/$${file}.py" "$(distdir)"; \
done done
else # !HAVE_PYTHON
pkgpython_PYTHON =
pymoduledir =
pymodule_PYTHON =
pybindir =
pybin_SCRIPTS =
endif # HAVE_PYTHON
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
# lalsuite_swig.m4 - SWIG configuration # lalsuite_swig.m4 - SWIG configuration
# Author: Karl Wette, 2011--2014 # Author: Karl Wette, 2011--2014
# #
# serial 64 # serial 65
AC_DEFUN([_LALSUITE_CHECK_SWIG_VERSION],[ AC_DEFUN([_LALSUITE_CHECK_SWIG_VERSION],[
# $0: check the version of $1, and store it in ${swig_version} # $0: check the version of $1, and store it in ${swig_version}
...@@ -60,9 +60,12 @@ AC_DEFUN([LALSUITE_ENABLE_SWIG],[ ...@@ -60,9 +60,12 @@ AC_DEFUN([LALSUITE_ENABLE_SWIG],[
] ]
) )
swig_build_any=false swig_build_any=false
python_min_version=
LALSUITE_ENABLE_SWIG_LANGUAGE([Octave],[false],[LALSUITE_REQUIRE_CXX]) LALSUITE_ENABLE_SWIG_LANGUAGE([Octave],[false],[LALSUITE_REQUIRE_CXX])
LALSUITE_ENABLE_SWIG_LANGUAGE([Python],[false]) LALSUITE_ENABLE_SWIG_LANGUAGE([Python],[false],[LALSUITE_REQUIRE_PYTHON([2.6])])
AS_IF([test "${swig_generate}" = true],[ AS_IF([test "${swig_generate}" = true],[
# require Python for running generate_swig_iface.py
LALSUITE_REQUIRE_PYTHON([2.6])
SWIG_GENERATE_ENABLE_VAL=ENABLED SWIG_GENERATE_ENABLE_VAL=ENABLED
],[ ],[
SWIG_GENERATE_ENABLE_VAL=DISABLED SWIG_GENERATE_ENABLE_VAL=DISABLED
...@@ -349,10 +352,6 @@ AC_DEFUN([LALSUITE_USE_SWIG_PYTHON],[ ...@@ -349,10 +352,6 @@ AC_DEFUN([LALSUITE_USE_SWIG_PYTHON],[
# $0: configure SWIG Python bindings # $0: configure SWIG Python bindings
LALSUITE_USE_SWIG_LANGUAGE([Python],[ LALSUITE_USE_SWIG_LANGUAGE([Python],[
# check for Python
python_min_version=2.5
AM_PATH_PYTHON([${python_min_version}])
# check for distutils # check for distutils
AC_MSG_CHECKING([for distutils]) AC_MSG_CHECKING([for distutils])
cat <<EOD | ${PYTHON} - 2>/dev/null cat <<EOD | ${PYTHON} - 2>/dev/null
......
...@@ -181,7 +181,7 @@ AC_PROG_INSTALL ...@@ -181,7 +181,7 @@ AC_PROG_INSTALL
AC_PROG_LN_S AC_PROG_LN_S
AC_PROG_AWK AC_PROG_AWK
AC_PROG_SED AC_PROG_SED
AM_PATH_PYTHON([2.6],,[AC_MSG_ERROR([Python-2.6, or higher, is required])]) LALSUITE_CHECK_PYTHON([2.6])
# check for supported mac os x version # check for supported mac os x version
LALSUITE_OSX_VERSION_CHECK LALSUITE_OSX_VERSION_CHECK
...@@ -364,6 +364,7 @@ AC_MSG_NOTICE([ ...@@ -364,6 +364,7 @@ AC_MSG_NOTICE([
================================================== ==================================================
LAL has now been successfully configured: LAL has now been successfully configured:
* Python support is $PYTHON_ENABLE_VAL
* CUDA support is $CUDA_ENABLE_VAL * CUDA support is $CUDA_ENABLE_VAL
* BOINC support is $BOINC_ENABLE_VAL * BOINC support is $BOINC_ENABLE_VAL
* SWIG binding generation is $SWIG_GENERATE_ENABLE_VAL * SWIG binding generation is $SWIG_GENERATE_ENABLE_VAL
......
...@@ -11,6 +11,8 @@ SUBDIRS = \ ...@@ -11,6 +11,8 @@ SUBDIRS = \
vcs_info_sources = git_version.py vcs_info_sources = git_version.py
if HAVE_PYTHON
pymoduledir = $(pkgpythondir) pymoduledir = $(pkgpythondir)
pymodule_PYTHON = \ pymodule_PYTHON = \
...@@ -19,3 +21,5 @@ pymodule_PYTHON = \ ...@@ -19,3 +21,5 @@ pymodule_PYTHON = \
gpstime.py \ gpstime.py \
series.py \ series.py \
$(END_OF_LIST) $(END_OF_LIST)
endif
...@@ -3,6 +3,8 @@ MOSTLYCLEANFILES = ...@@ -3,6 +3,8 @@ MOSTLYCLEANFILES =
EXTRA_DIST = EXTRA_DIST =
include $(top_srcdir)/gnuscripts/lalsuite_python.am include $(top_srcdir)/gnuscripts/lalsuite_python.am
if HAVE_PYTHON
pymoduledir = $(pkgpythondir)/spectrum pymoduledir = $(pkgpythondir)/spectrum
pymodule_PYTHON = \ pymodule_PYTHON = \
...@@ -10,3 +12,5 @@ pymodule_PYTHON = \ ...@@ -10,3 +12,5 @@ pymodule_PYTHON = \
averagespectrum.py \ averagespectrum.py \
distributions.py \ distributions.py \
$(END_OF_LIST) $(END_OF_LIST)
endif
...@@ -3,6 +3,8 @@ MOSTLYCLEANFILES = ...@@ -3,6 +3,8 @@ MOSTLYCLEANFILES =
EXTRA_DIST = EXTRA_DIST =
include $(top_srcdir)/gnuscripts/lalsuite_python.am include $(top_srcdir)/gnuscripts/lalsuite_python.am
if HAVE_PYTHON
pymoduledir = $(pkgpythondir)/utils pymoduledir = $(pkgpythondir)/utils
pymodule_PYTHON = \ pymodule_PYTHON = \
...@@ -10,3 +12,5 @@ pymodule_PYTHON = \ ...@@ -10,3 +12,5 @@ pymodule_PYTHON = \
cache.py \ cache.py \
series.py \ series.py \
$(END_OF_LIST) $(END_OF_LIST)
endif
...@@ -126,8 +126,7 @@ AC_PROG_INSTALL ...@@ -126,8 +126,7 @@ AC_PROG_INSTALL
AC_PROG_LN_S AC_PROG_LN_S
AC_PROG_AWK AC_PROG_AWK
AC_PROG_SED AC_PROG_SED
AM_PATH_PYTHON([2.6],,[:]) LALSUITE_CHECK_PYTHON([2.6])
AM_CONDITIONAL([HAVE_PYTHON],[test "$PYTHON" != :])
# check for condor_compile # check for condor_compile
AC_ENABLE_SHARED AC_ENABLE_SHARED
...@@ -426,6 +425,7 @@ AC_MSG_NOTICE([ ...@@ -426,6 +425,7 @@ AC_MSG_NOTICE([
================================================== ==================================================
LALApps has now been successfully configured: LALApps has now been successfully configured:
* Python support is $PYTHON_ENABLE_VAL
* FFTW library support is $FFTW_ENABLE_VAL * FFTW library support is $FFTW_ENABLE_VAL
* Frame library support is $FRAME_ENABLE_VAL * Frame library support is $FRAME_ENABLE_VAL
* MetaIO library support is $METAIO_ENABLE_VAL * MetaIO library support is $METAIO_ENABLE_VAL
......
...@@ -73,7 +73,7 @@ AC_PROG_INSTALL ...@@ -73,7 +73,7 @@ AC_PROG_INSTALL
AC_PROG_LN_S AC_PROG_LN_S
AC_PROG_AWK AC_PROG_AWK
AC_PROG_SED AC_PROG_SED
AM_PATH_PYTHON([2.6],,[AC_MSG_ERROR([Python-2.6, or higher, is required])]) LALSUITE_CHECK_PYTHON([2.6])
# check for supported mac os x version # check for supported mac os x version
LALSUITE_OSX_VERSION_CHECK LALSUITE_OSX_VERSION_CHECK
...@@ -156,6 +156,7 @@ AC_MSG_NOTICE([ ...@@ -156,6 +156,7 @@ AC_MSG_NOTICE([
================================================== ==================================================
LALBurst has now been successfully configured: LALBurst has now been successfully configured:
* Python support is $PYTHON_ENABLE_VAL
* SWIG binding generation is $SWIG_GENERATE_ENABLE_VAL * SWIG binding generation is $SWIG_GENERATE_ENABLE_VAL
* SWIG bindings for Octave are $SWIG_BUILD_OCTAVE_ENABLE_VAL * SWIG bindings for Octave are $SWIG_BUILD_OCTAVE_ENABLE_VAL
* SWIG bindings for Python are $SWIG_BUILD_PYTHON_ENABLE_VAL * SWIG bindings for Python are $SWIG_BUILD_PYTHON_ENABLE_VAL
......
...@@ -6,6 +6,8 @@ include $(top_srcdir)/gnuscripts/lalsuite_vcs_info.am ...@@ -6,6 +6,8 @@ include $(top_srcdir)/gnuscripts/lalsuite_vcs_info.am
vcs_info_sources = git_version.py vcs_info_sources = git_version.py
if HAVE_PYTHON
pymoduledir = $(pkgpythondir) pymoduledir = $(pkgpythondir)
pymodule_PYTHON = \ pymodule_PYTHON = \
...@@ -13,6 +15,8 @@ pymodule_PYTHON = \ ...@@ -13,6 +15,8 @@ pymodule_PYTHON = \
git_version.py \ git_version.py \
$(END_OF_LIST) $(END_OF_LIST)
endif
#pkgpython_LTLIBRARIES = \ #pkgpython_LTLIBRARIES = \
# cs_gamma.la # cs_gamma.la
#cs_gamma_la_SOURCES = cs_gamma.c #cs_gamma_la_SOURCES = cs_gamma.c
......
...@@ -78,7 +78,7 @@ AC_PROG_INSTALL ...@@ -78,7 +78,7 @@ AC_PROG_INSTALL
AC_PROG_LN_S AC_PROG_LN_S
AC_PROG_AWK AC_PROG_AWK
AC_PROG_SED AC_PROG_SED
AM_PATH_PYTHON([2.6],,[AC_MSG_ERROR([Python-2.6, or higher, is required])]) LALSUITE_CHECK_PYTHON([2.6])
# check for supported mac os x version # check for supported mac os x version
LALSUITE_OSX_VERSION_CHECK LALSUITE_OSX_VERSION_CHECK
...@@ -142,6 +142,7 @@ AC_MSG_NOTICE([ ...@@ -142,6 +142,7 @@ AC_MSG_NOTICE([
================================================== ==================================================
LALDetChar has now been successfully configured: LALDetChar has now been successfully configured:
* Python support is $PYTHON_ENABLE_VAL
* SWIG binding generation is $SWIG_GENERATE_ENABLE_VAL * SWIG binding generation is $SWIG_GENERATE_ENABLE_VAL
* SWIG bindings for Octave are $SWIG_BUILD_OCTAVE_ENABLE_VAL * SWIG bindings for Octave are $SWIG_BUILD_OCTAVE_ENABLE_VAL
* SWIG bindings for Python are $SWIG_BUILD_PYTHON_ENABLE_VAL * SWIG bindings for Python are $SWIG_BUILD_PYTHON_ENABLE_VAL
......
...@@ -5,8 +5,12 @@ include $(top_srcdir)/gnuscripts/lalsuite_python.am ...@@ -5,8 +5,12 @@ include $(top_srcdir)/gnuscripts/lalsuite_python.am
SUBDIRS = laldetchar SUBDIRS = laldetchar
if HAVE_PYTHON
pybin_SCRIPTS = \ pybin_SCRIPTS = \
laldetchar-hveto \ laldetchar-hveto \
laldetchar-hveto-summary-page \ laldetchar-hveto-summary-page \
laldetchar-segments-from-data \ laldetchar-segments-from-data \
$(END_OF_LIST) $(END_OF_LIST)
endif
...@@ -11,6 +11,8 @@ SUBDIRS = \ ...@@ -11,6 +11,8 @@ SUBDIRS = \
vcs_info_sources = git_version.py vcs_info_sources = git_version.py
if HAVE_PYTHON
pymoduledir = $(pkgpythondir) pymoduledir = $(pkgpythondir)
pymodule_PYTHON = \ pymodule_PYTHON = \
...@@ -18,3 +20,5 @@ pymodule_PYTHON = \ ...@@ -18,3 +20,5 @@ pymodule_PYTHON = \
dqsegs.py \ dqsegs.py \
git_version.py \ git_version.py \
$(END_OF_LIST) $(END_OF_LIST)
endif
...@@ -3,6 +3,8 @@ MOSTLYCLEANFILES = ...@@ -3,6 +3,8 @@ MOSTLYCLEANFILES =
EXTRA_DIST = EXTRA_DIST =
include $(top_srcdir)/gnuscripts/lalsuite_python.am include $(top_srcdir)/gnuscripts/lalsuite_python.am
if HAVE_PYTHON
pymoduledir = $(pkgpythondir)/hveto pymoduledir = $(pkgpythondir)/hveto
pymodule_PYTHON = \ pymodule_PYTHON = \
...@@ -10,3 +12,5 @@ pymodule_PYTHON = \ ...@@ -10,3 +12,5 @@ pymodule_PYTHON = \
glib_utils.py \ glib_utils.py \
plot_utils.py \ plot_utils.py \
$(END_OF_LIST) $(END_OF_LIST)
endif
...@@ -3,6 +3,8 @@ MOSTLYCLEANFILES = ...@@ -3,6 +3,8 @@ MOSTLYCLEANFILES =
EXTRA_DIST = EXTRA_DIST =
include $(top_srcdir)/gnuscripts/lalsuite_python.am include $(top_srcdir)/gnuscripts/lalsuite_python.am
if HAVE_PYTHON
pymoduledir = $(pkgpythondir)/triggers pymoduledir = $(pkgpythondir)/triggers
pymodule_PYTHON = \ pymodule_PYTHON = \
...@@ -17,3 +19,5 @@ pymodule_PYTHON = \ ...@@ -17,3 +19,5 @@ pymodule_PYTHON = \
trigfind.py \ trigfind.py \
utils.py \ utils.py \
$(END_OF_LIST) $(END_OF_LIST)
endif
...@@ -84,7 +84,7 @@ AC_PROG_INSTALL ...@@ -84,7 +84,7 @@ AC_PROG_INSTALL
AC_PROG_LN_S AC_PROG_LN_S
AC_PROG_AWK AC_PROG_AWK
AC_PROG_SED AC_PROG_SED
AM_PATH_PYTHON([2.6],,[AC_MSG_ERROR([Python-2.6, or higher, is required])]) LALSUITE_CHECK_PYTHON([2.6])
# check for supported mac os x version # check for supported mac os x version
LALSUITE_OSX_VERSION_CHECK LALSUITE_OSX_VERSION_CHECK
...@@ -169,6 +169,7 @@ AC_MSG_NOTICE([ ...@@ -169,6 +169,7 @@ AC_MSG_NOTICE([
================================================== ==================================================
LALFrame has now been successfully configured: LALFrame has now been successfully configured:
* Python support is $PYTHON_ENABLE_VAL
* using the $FRAME_LIBRARY frame library * using the $FRAME_LIBRARY frame library
* FrameC availability... ${FRAMEC_AVAILABLE} * FrameC availability... ${FRAMEC_AVAILABLE}
* FrameL availability... ${FRAMEL_AVAILABLE} * FrameL availability... ${FRAMEL_AVAILABLE}
......
...@@ -10,6 +10,8 @@ SUBDIRS = \ ...@@ -10,6 +10,8 @@ SUBDIRS = \
vcs_info_sources = git_version.py vcs_info_sources = git_version.py
if HAVE_PYTHON
pymoduledir = $(pkgpythondir) pymoduledir = $(pkgpythondir)
pymodule_PYTHON = \ pymodule_PYTHON = \
...@@ -17,3 +19,5 @@ pymodule_PYTHON = \ ...@@ -17,3 +19,5 @@ pymodule_PYTHON = \
frread.py \ frread.py \
git_version.py \ git_version.py \
$(END_OF_LIST) $(END_OF_LIST)
endif
...@@ -3,9 +3,13 @@ MOSTLYCLEANFILES = ...@@ -3,9 +3,13 @@ MOSTLYCLEANFILES =
EXTRA_DIST = EXTRA_DIST =
include $(top_srcdir)/gnuscripts/lalsuite_python.am include $(top_srcdir)/gnuscripts/lalsuite_python.am
if HAVE_PYTHON
pymoduledir = $(pkgpythondir)/utils pymoduledir = $(pkgpythondir)/utils
pymodule_PYTHON = \ pymodule_PYTHON = \
__init__.py \ __init__.py \
frtools.py \ frtools.py \
$(END_OF_LIST) $(END_OF_LIST)
endif
...@@ -81,7 +81,7 @@ AC_PROG_INSTALL ...@@ -81,7 +81,7 @@ AC_PROG_INSTALL
AC_PROG_LN_S AC_PROG_LN_S
AC_PROG_AWK AC_PROG_AWK
AC_PROG_SED AC_PROG_SED
AM_PATH_PYTHON([2.6],,[AC_MSG_ERROR([Python-2.6, or higher, is required])]) LALSUITE_CHECK_PYTHON([2.6])
# check for supported mac os x version # check for supported mac os x version
LALSUITE_OSX_VERSION_CHECK LALSUITE_OSX_VERSION_CHECK
...@@ -213,6 +213,7 @@ AC_MSG_NOTICE([ ...@@ -213,6 +213,7 @@ AC_MSG_NOTICE([
================================================== ==================================================
LALInference has now been successfully configured: LALInference has now been successfully configured:
* Python support is $PYTHON_ENABLE_VAL
* LALXML library support is $LALXML_ENABLE_VAL * LALXML library support is $LALXML_ENABLE_VAL
* SWIG binding generation is $SWIG_GENERATE_ENABLE_VAL * SWIG binding generation is $SWIG_GENERATE_ENABLE_VAL
* SWIG bindings for Octave are $SWIG_BUILD_OCTAVE_ENABLE_VAL * SWIG bindings for Octave are $SWIG_BUILD_OCTAVE_ENABLE_VAL
......
...@@ -5,6 +5,8 @@ include $(top_srcdir)/gnuscripts/lalsuite_python.am ...@@ -5,6 +5,8 @@ include $(top_srcdir)/gnuscripts/lalsuite_python.am
SUBDIRS = lalinference SUBDIRS = lalinference
if HAVE_PYTHON
.py: .py:
$(AM_V_GEN)rm -rf .pybin && $(SED) 's|[@]PYTHON[@]|$(PYTHON)|' $< > $@ && chmod +x $@ $(AM_V_GEN)rm -rf .pybin && $(SED) 's|[@]PYTHON[@]|$(PYTHON)|' $< > $@ && chmod +x $@
...@@ -23,3 +25,5 @@ pybin_SCRIPTS = \ ...@@ -23,3 +25,5 @@ pybin_SCRIPTS = \
bayestar_sim_to_tmpltbank \ bayestar_sim_to_tmpltbank \
bayestar_littlehope \ bayestar_littlehope \
$(END_OF_LIST) $(END_OF_LIST)
endif
...@@ -10,6 +10,8 @@ SUBDIRS = \ ...@@ -10,6 +10,8 @@ SUBDIRS = \
vcs_info_sources = git_version.py