blob: 750ea86a1add568f5640e724fe717100ceba19b6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
#!/bin/sh
# Verify that third-party main loop integration, as provided by Qt
# and E, can be built against this dbus-python. We simulate a third-party
# main loop by copying the one for dbus-glib from this source tree.
exec 2>&1
set -e
set -x
test_build () {
PYTHON="$1"
mkdir "$ADTTMP/$PYTHON"
# provide some cunningly disguised main-loop glue
sed \
-e 's/dbus_glib/dbus_test/g' \
< dbus_glib_bindings/module.c \
> "$ADTTMP/$PYTHON/module.c"
cp -a dbus-gmain "$ADTTMP/$PYTHON/"
( cd "$ADTTMP/$PYTHON" && ${CC:-cc} \
-Wall -Wextra -Wno-error -fPIC -shared \
-o _dbus_test_bindings$(${PYTHON}-config --extension-suffix) \
-I. module.c dbus-gmain/dbus-gmain.c \
$(${PYTHON}-config --cflags --libs) \
$(pkg-config --cflags --libs dbus-python glib-2.0) )
PYTHONPATH="$ADTTMP/$PYTHON" $PYTHON -c \
"from _dbus_test_bindings import DBusGMainLoop"
}
for p in python3 $(py3versions -s); do
test_build "$p"
test_build "$p-dbg"
done
|