[Distutils] Packaging shared objects with setuptools

Erik Bray erik.m.bray at gmail.com
Tue Nov 17 18:13:41 EST 2015


On Fri, Oct 30, 2015 at 12:47 PM, Mario Pezzoni <pezzoni.mario at gmail.com> wrote:
> Hello,
>
> I am wrapping a c++ library with cython. I compile the pyxs and the c++ code
> with cmake using the cython-cmake-example.
> If I import the package from the build directory it works flawlessly, if I
> install through "python setup.py install" into a virtual environment it
> breaks because the shared objects are not installed (but all the pure .py
> modules are installed).
>
> How do I tell setuptools to install the shared objects?

For starters, what does your setup.py look like?  You should make sure
all extension modules are registered with setup() as described here:

https://docs.python.org/2/distutils/examples.html#single-extension-module

I'm not sure what cython-cmake-example is though, or how whatever it
does would interact with distutils.

Erik


More information about the Distutils-SIG mailing list