mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-02 05:28:48 +00:00
Fix extension of native Python module
When building debug modules this e.g. has to be _d.so instead of just .so
This commit is contained in:
parent
59784c2357
commit
9f0eb95a7a
2 changed files with 15 additions and 6 deletions
|
@ -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)
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
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/$@ $@
|
||||
|
||||
|
|
Loading…
Reference in a new issue