[Python-Dev] Python build question (fixing pymath.c).

Mark Dickinson dickinsm at gmail.com
Sun Sep 27 10:00:02 CEST 2009

On Sun, Sep 27, 2009 at 8:48 AM, Brett Cannon <brett at python.org> wrote:
> On Sun, Sep 27, 2009 at 00:21, Mark Dickinson <dickinsm at gmail.com> wrote:
>> So I've now got a file Modules/math_support.c that contains
>> some functions needed by both mathmodule.c and
>> cmathmodule.c, as well as a couple of functions only
>> currently needed by the math module.  How should I incorporate
>> this file into the build?
>> One obvious solution seems to be to build an extra math_support.so
>> file that's then used by both mathmodule.so and cmathmodule.so.
>> Is this a sensible solution?  Are there better ways?
> Are you planning on exposing any of this outside of those two modules?


> If not then I would change the name to _math.so

That makes sense.

>> A complication to bear in mind is that some users may want to
>> alter Modules/Setup.dist so that either the math module and/or
>> the cmath module is included in the core Python executable.
> If you are mucking with Modules.Setup.dist you better know how to
> figure out that those two modules depend on another .so.

Sure.  I'll at least add a comment pointing out the dependence, though.



More information about the Python-Dev mailing list