[Python-modules-team] Bug#732120: no shared library, README.Debian?

Daniel Pocock daniel at pocock.com.au
Sat Dec 14 11:54:29 UTC 2013


Package: python-cxx-dev
Version: 6.2.4-3

The way to link with this module is not really clear from the documentation

Maybe it needs a brief README.Debian to explain the way it is packaged,
why there is no shared library and how to use it

Alternatively, maybe it would be useful to build a shared library and
ship that for convenience?

Specifically, any user of this package needs to either

a) copy the *.cxx files into their project repository and add them to
their Makefile

b) add those files (using their absolute path on the filesystem) to
their Makefile

For example, I added them like this in repro pyroute plugin Makefile.am:

PYCXX_SRCDIR = /usr/share/python2.7/CXX/Python2
libpyroute_la_SOURCES += $(PYCXX_SRCDIR)/cxxextensions.c
libpyroute_la_SOURCES += $(PYCXX_SRCDIR)/cxx_extensions.cxx
libpyroute_la_SOURCES += $(PYCXX_SRCDIR)/cxxsupport.cxx
libpyroute_la_SOURCES += $(PYCXX_SRCDIR)/../IndirectPythonInterface.cxx

Users who fail to add these or don't realize this are going to see an
error about undefined symbols at linking time.

This is a slightly unusual way of using a C++ library: most libraries
either work as a header library (just include the headers, no shared
object) or they package a full libsomething.so that the dependent
projects can link to.  Therefore, it may be useful for the maintainer or
upstream to comment on why the cxx files have to be copied/used in this
way by other projects.



More information about the Python-modules-team mailing list