On Thu, Jun 2, 2011 at 9:33 PM, Robert Kern <[email protected]> wrote:
> On Thu, Jun 2, 2011 at 14:07, Ralf Gommers <[email protected]> > wrote: > > > > On Wed, Jun 1, 2011 at 5:45 PM, martin smith <[email protected]> > wrote: > >> > >> I have a bit of code that performs multi-taper power spectra using numpy > >> and a C extension module. The C portion consists of an interface file > >> and a python-unaware computational file. The latter invokes fftpack. > >> > >> The straightforward setup.py appended below works fine on Linux. On > >> Windows using MinGW it's not so good. I first created a libpython27.a > >> file following instructions on the web. The C code now compiles but > >> fails to link since there is no fftpack_lite.so on Windows. I can't > >> find an fftpack_lite.dll (or even the source for fftpack_lite) and don't > >> know where to turn. > > > > Python dll's on Windows have a .pyd extension, there should be a > > fftpack_lite.pyd file. But you should be able to just leave off the > > extension, so it does the right thing on any platform. > > > > Also, the way you specified library_dirs doesn't work if numpy is not in > > site-packages, better to use something like: > > library_dirs = [os.path.join(numpy.__path__[0], 'fft')] > > That said, there is no good cross-platform way to link against other > Python extension modules. Please do not try. You will have to include > a copy of the FFTPACK code in your own extension module. > > 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
_______________________________________________ NumPy-Discussion mailing list [email protected] http://mail.scipy.org/mailman/listinfo/numpy-discussion
