There will be maintenance performed on git.ligo.org, chat.ligo.org, containers.lig.org, and docs.ligo.org starting at 9am PDT on Tuesday 18th August 2020. There will be an extremely small period of downtime at the start of the maintenance window as various services are restarted. Please address any comments, questions, or concerns to computing-help@igwn.org.

Commit 354c88c7 authored by Leo Pound Singer's avatar Leo Pound Singer

Only use relative imports with swig >= 3.0.0

The -relativeimport version was added in that version.
Original: 7a46d74787f9647def8b6685b43d2cb0f0d15440
parent e91ba194
......@@ -183,7 +183,7 @@ endif # SWIG_BUILD_OCTAVE
if SWIG_BUILD_PYTHON
swig_python_flags = -python -py3 -relativeimport -O -builtin -globals globalvar -outdir swiglal_python/ $(swig_flags)
swig_python_flags = -python $(SWIG_PYTHON_FLAGS) -outdir swiglal_python/ $(swig_flags)
pkgpyexec_LTLIBRARIES = swiglal_python.la
nodist_pkgpyexec_PYTHON = swiglal_python/$(PACKAGE).py
......
......@@ -115,6 +115,18 @@ AC_DEFUN([LALSUITE_USE_SWIG],[
SWIG="env CCACHE_DISABLE=1 ${ac_cv_path_SWIG}"
])
# determine SWIG Python flags
AC_SUBST([SWIG_PYTHON_FLAGS],[])
SWIG_PYTHON_FLAGS="-O -builtin -globals globalvar"
AC_MSG_CHECKING([if SWIG supports relative Python imports])
LALSUITE_VERSION_COMPARE([${swig_version}],[<],[3.0.0],
[AC_MSG_RESULT([no])],
[
AC_MSG_RESULT([yes])
SWIG_PYTHON_FLAGS="-py3 -relativeimport ${SWIG_PYTHON_FLAGS}"
]
)
# extract -I and -D flags from LALSuite library preprocessor flags
AC_SUBST([SWIG_CPPFLAGS],[])
for flag in ${CPPFLAGS}; do
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment