File: README.Debian

package info (click to toggle)
pycxx 7.1.8-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,392 kB
  • sloc: cpp: 6,767; python: 1,138; sh: 85; ansic: 60; makefile: 18
file content (20 lines) | stat: -rw-r--r-- 769 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
PyCXX does not offer a shared library,  it is intended users of this package
compile the sources into their extensions.
The Debian (and Fedora) package offers a pkg-config file named PyCXX.pc which
exports the installed location of the headers and sources required to build, do
not hardcode the path into your files.

Example:
Copy /usr/share/doc/python3-cxx-dev/examples/ into a writeable area from there
you can compile an example by executing these commands:

CFLAGS="$(pkg-config --cflags PyCXX) $(python3-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 \
    -shared -o simple.so
python3 test_simple.py