[Numpy-discussion] need help building a numpy extension that uses fftpack on windows

martin smith gmane@blindgoat....
Thu Jun 9 08:37:36 CDT 2011

On 6/5/2011 5:46 PM, martin smith wrote:
> On 6/3/2011 5:15 AM, Ralf Gommers wrote:
>> ...
>> Coming back to #608, that means there is no chance that  the C version
>> will land in scipy, correct? We're not going to ship two copies of
>> FFTPACK. So the answer should be "rewrite in Python, if that's too slow
>> use Cython".
>> Ralf
> Thank you both for your prompt response and suggestions.  I've modified
> the setup.py file as Ralf suggested and concocted a version of the code
> (summarized below) that doesn't try to link to existing modules.
> The formal problem with a python rewrite is that there is some
> functionality in the package (the adaptive spectrum estimate) that
> requires solving an iterative non-linear equation at each frequency.  A
> practical problem is that the odds of my rewriting the core code in
> python in the near future are not good.
> I've made an include file for the core code from a version of fftpack.c
> by stripping out the unused functions and making the survivors static.
> Using this means, of course, that you'd be partly duplicating fftpack
> from a binary bloat point of view but it leads to a plausible solution,
> at least.
> I'm currently having (new) problems compiling on win7 64-bits
> (msvcr90.dll for 64bits is missing and I haven't had any luck googling
> it down yet) as well as on winxp 32-bits (my installation of mingw is
> confused and can't find all of its parts).  I'm planning to stick with
> it a while longer and see if I can get past these bumps.  If I succeed
> I'll reraise the possibility of getting it into scipy.
> - martin

I've gone on and gotten the package to work under both win32 and linux.
 I gather that if I want to proceed I should convert what I have into a
scikit for submission.  As best I can tell that involves
    (1) writing sphinx documentation,
    (2) using setuptools, and
    (3) assembling the bits into the proper directory structure for
        inclusion in scikits.

I'm game to go on with this but I'm concerned that the effort will be
futile for the reason that Ralf suggested: duplication of some fftpack
code in my module.  Does anyone have a clear idea whether or not this
issue will be fatal for scikit acceptance?

More information about the NumPy-Discussion mailing list