Make it possible to use uninstalled symlinking the .so file

This commit is contained in:
Thibault Saunier 2012-08-19 22:40:06 -04:00
parent 5adc55d50f
commit bfcf304857
2 changed files with 17 additions and 0 deletions

View file

@ -160,7 +160,9 @@ Fraction = override(Fraction)
__all__.append('Fraction')
initialized, argv = Gst.init_check(sys.argv)
import _gi_gst
_gi_gst
sys.argv = list(argv)
if not initialized:

View file

@ -18,3 +18,18 @@ _gi_gst_la_SOURCES = gstmodule.c
_gi_gst_la_CFLAGS = $(common_cflags)
_gi_gst_la_LIBADD = $(common_libadd)
_gi_gst_la_LDFLAGS = $(common_ldflags)
# if we build in a separate tree, we need to symlink the *.so files from the
# source tree; Python does not accept the extensions and modules in different
# paths
build_pylinks:
for f in $(pygioverrides_PYTHON); do \
[ -e $(builddir)/$$f ] || $(LN_S) $(srcdir)/$$f $(builddir)/$$f; \
done
all: $(pygioverridesexec_LTLIBRARIES:.la=.so) build_pylinks
check-local: $(pygioverridesexec_LTLIBRARIES:.la=.so) build_pylinks
clean-local:
rm -f $(pygioverridesexec_LTLIBRARIES:.la=.so)
.la.so:
$(LN_S) .libs/$@ $@ || true