[SciPy-dev] physical quantities: udunits?
Darren Dale
dsdale24 at gmail.com
Fri Aug 1 09:50:31 EDT 2008
Hi Charles,
On Thursday 31 July 2008 06:56:33 pm you wrote:
> Ok looks like our security update was a bit too strong :) can you try
> again ?
Thanks, I am able to grab the sources now.
I did a search on the web a few days ago to see if udunits can be used on
Windows. The answer appeared to be no, but I tried installing your unidata
python package on windows anyway.
There is no windows binary for Numeric and python-2.5, so I tried a first
order workaround by changing the Numeric include in udunits_wrap.c to:
#include "numpy/arrayobject.h"
This required importing numpy in your setup script and adding
numpy.get_include() to the list of include_dirs in your extension
constructor. I also had to modify the path where udunits is installed, in
both setup.py and udunits.py. (moving udunits.dat into Lib would allow the
library to be installed using distutils package_data, I think.)
I am happy to say that I was able to build the package with mingw, install it,
and run the test script. I didn't see any problems (but I didn't really know
what to look for).
Would you mind posting a link to your udunits2 package?
Based on your nice work here, and the appearance of windows compatibility, it
seems like it shouldn't be too difficult to build a physical_quantities
object subclassed from numpy.ndarray. Have you considered this possibility?
Regards,
Darren
More information about the SciPy-Dev
mailing list