File: buildtest

package info (click to toggle)
pycxx 7.1.4-0.1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 1,252 kB
  • sloc: cpp: 6,758; python: 953; sh: 103; ansic: 60; makefile: 42
file content (29 lines) | stat: -rwxr-xr-x 830 bytes parent folder | download | duplicates (2)
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 -efu
SRC=$PWD
py3s=$(py3versions -r)

cd $AUTOPKGTEST_TMP

cp -Lr /usr/share/doc/python3-cxx-dev/examples/ .
cd examples

for py in $py3s; do
  export PYTHONPATH=$PWD/local/lib/$py/site-packages/CXX
  $py setup.py build  2>&1
  $py setup.py install --prefix=$PWD/local 2>&1
  $py test_example.py
  $py-dbg setup.py build 2>&1
  $py-dbg setup.py install --prefix=$PWD/local 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