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
|
#!/bin/sh
set -efux
SRC=$PWD
py3s=$(py3versions -s)
cd $AUTOPKGTEST_TMP
cp -Lr /usr/share/doc/python3-cxx-dev/examples/ .
cd examples
for py in $py3s; do
$py setup.py build 2>&1
$py setup.py install --prefix=$PWD 2>&1
export PYTHONPATH=$(find $PWD/local/lib/$py/dist-packages -name CXX)
$py test_example.py
$py-dbg setup.py build 2>&1
$py-dbg setup.py install --prefix=$PWD 2>&1
$py-dbg test_example.py 2>&1
rm -rf $PYTHONPATH
# matplotlib install method
$py -c "import CXX" 2>&1
CFLAGS="$(pkg-config --cflags PyCXX) $($py-config --cflags)"
SRC="$(pkg-config --variable=srcdir PyCXX)"
g++ -fPIC $CFLAGS simple.cxx $SRC/cxxextensions.c $SRC/cxx_extensions.cxx $SRC/cxxsupport.cxx \
$SRC/IndirectPythonInterface.cxx $SRC/cxx_exceptions.cxx -shared -o simple.so 2>&1
$py test_simple.py 2>&1
done
|