[C++-sig] distributing libraries built using Boost.Python

danielle amethyst brake danielleamethystbrake at gmail.com
Fri Oct 19 11:13:02 EDT 2018


Stefan,

> I have a library, which consists foremostly of a set of bindings built
> using Boost.Python, and I am finding distribution to be a barrier.
> Requiring the user to build themselves prevents most of my users from,
> well, being users.  Hence, I am writing today to query about best-practices
> and ideas on how to distribute my Python library, that consists of pure
> Python code installable via pip, a built .so library, and an underlying
> .so/.a/.dyld/whatever core library also built from C++.
>
>
> the biggest issue really is ABI compatibility, i.e. you can't simply
> distribute a C++ library such as Boost.Python compiled with one compiler,
> and expect it to work in machines with arbitrary other compilers (or
> compiler versions). Once the set of supported compilers / compiler versions
> is settled, it's much easier to share binaries.
>
>
I get that ABI compatibility is a problem.  That's why I currently require
that my users build from source right now, but it pretty severely limits my
userbase in the community of algebraic geometers, who do *not* want to
compile from source, or navigate dependency hell.

If you are mainly working with Python, i.e. if your C++ code is only used
> in extension modules, you may consider using Anaconda, which provides some
> structure in its package management that could help you and your users.
>
>
My library is not used only in extension modules; there is a whole general
purpose C++ library my bindings are built against.  So I feel like latching
into Anaconda is a bit scary.  Can you tell me anything more about the
Anaconda ecosystem?  Are there existing Boost.Python binding sets that are
distributed in this model?

I feel like my best options right now are using package managers like
homebrew, apt, etc to help distribute.  Is this possibly the best way?
What are others doing for their Boost.Python generated bindings?  Is there
a list of notable libraries that use Boost.Python, so that I can
investigate directly their distribution models?

Please keep in mind that I am an academic team of ~1, so there's little
buck I can pass on this.  Simple solutions, both to implement and maintain,
are going to be the best.  I really appreciate your time and assistance!!!

Thanks again,
Danielle
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/cplusplus-sig/attachments/20181019/7defb773/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.png
Type: image/png
Size: 1478 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/cplusplus-sig/attachments/20181019/7defb773/attachment.png>


More information about the Cplusplus-sig mailing list