Commit 9f0eb95a authored by Sebastian Dröge's avatar Sebastian Dröge 🍵

Fix extension of native Python module

When building debug modules this e.g. has to be _d.so instead of just .so
parent 59784c23
......@@ -71,6 +71,13 @@ then
else
AC_MSG_ERROR(too old)
fi
# - 'SO' for PyPy, CPython 2.7-3.2
# - 'EXT_SUFFIX' for CPython3.3+ (http://bugs.python.org/issue16754)
# - fallback to '.so'
PYTHON_SO=`$PYTHON -c "import distutils.sysconfig, sys; get = distutils.sysconfig.get_config_var; sys.stdout.write(get('EXT_SUFFIX') or get('SO') or '.so');"`
AC_SUBST(PYTHON_SO)
AM_CHECK_PYTHON_HEADERS(,[AC_MSG_ERROR(could not find Python headers)])
AS_AC_EXPAND(PYTHONDIR, $pythondir)
AS_AC_EXPAND(PYEXECDIR, $pyexecdir)
......
common_cflags = $(PYGOBJECT_CFLAGS) $(GST_CFLAGS) -fno-strict-aliasing
common_libadd = $(GST_LIBS) $(PYGOBJECT_LIBS)
common_ldflags = -module -avoid-version
common_ldflags = -module -avoid-version -shrext $(PYTHON_SO)
# We install everything in the gi/overrides folder
pygioverridesdir = $(PYGI_OVERRIDES_DIR)
......@@ -27,9 +27,11 @@ build_pylinks:
[ -e $(builddir)/$$f ] || $(LN_S) -f $(srcdir)/$$f $(builddir)/$$f; \
done
all: $(pygioverridesexec_LTLIBRARIES:.la=.so) build_pylinks
check-local: $(pygioverridesexec_LTLIBRARIES:.la=.so) build_pylinks
all: $(pygioverridesexec_LTLIBRARIES:.la=$(PYTHON_SO)) build_pylinks
check-local: $(pygioverridesexec_LTLIBRARIES:.la=$(PYTHON_SO)) build_pylinks
clean-local:
rm -f $(pygioverridesexec_LTLIBRARIES:.la=.so)
.la.so:
$(LN_S) -f .libs/$@ $@ || true
rm -f $(pygioverridesexec_LTLIBRARIES:.la=$(PYTHON_SO))
%$(PYTHON_SO): %.la
$(LN_S) -f .libs/$@ $@
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