I would be interested in testing your GSOC project and will do what I can in the mean time.  I do develop on windows, but the library lives on linux, macos, and windows, so we can test on anyg--it also binds with ifort, gfortran, etc. so seems rather robust.<br>
<br>Cheers,<br>William<br><br><div class="gmail_quote">On Tue, Jun 16, 2009 at 12:13 PM, Kurt Smith <span dir="ltr"><<a href="mailto:kwmsmith@gmail.com">kwmsmith@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div><div></div><div class="h5">On Tue, Jun 16, 2009 at 8:21 AM, william<br>
ratcliff<<a href="mailto:william.ratcliff@gmail.com">william.ratcliff@gmail.com</a>> wrote:<br>
> Hi!  I'm looking at trying to bind a rather large (>150K lines of code)<br>
> crystallography library to python and would like to know what the state of<br>
> F2py is.  Are allocatable arrays supported?  Derived types?  Modules,<br>
> Pointers, etc.?  Is there a list somewhere?  Has anyone else looked into<br>
> wrapping such a large code base?  If so, any pointers?<br>
<br>
</div></div>I've never used the current distributed version of f2py (numpy.f2py I<br>
believe is the default one) to wrap a library as large as this, and I<br>
don't believe that f2py can handle assumed-shape arrays as arguments<br>
to routines -- I haven't checked its support for allocatable, though,<br>
but I don't think so.  I'm certainly open to correction, though.  In<br>
my experience, f2py excels at wrapping Fortran 77-style programs with<br>
older array passing conventions, where the shape information is passed<br>
in as arguments to a subroutine/function.<br>
<br>
It won't solve your problem currently, but you might be interested in<br>
my GSoC project which aims to do just what you want -- binding a<br>
fortran library to Cython/Python, with support for<br>
allocatable/assumed-shape/assumed-size array arguments, pointers,<br>
derived types, modules, etc.  It is being heavily developed as we<br>
speak, but will (hopefully) be usable by sometime this fall.<br>
<br>
Your library seems pretty large, which would be an excellent test for<br>
the GSoC project.  If you are willing, and when the project is ready<br>
to tackle such a library, we'd be glad to work with you to get your<br>
library wrapped.  As mentioned, we won't be at this point until the<br>
fall, though.<br>
<br>
Pearu has been kind enough to let us use the 'fparser' module from the<br>
G3F2PY project as the fortran parser, so the work of f2py continues on<br>
in our GSoC work.<br>
<br>
There are a few software requrirements -- we've tried to keep<br>
dependencies to a minimum:<br>
<br>
1) a fortran compiler that supports the intrinsic ISO_C_BINDING module<br>
-- gfortran 4.3.3 supports it, as do pretty much every current version<br>
of other compilers.<br>
2) The GSoC project is distributed with Cython.<br>
3) Python version >= 2.5.<br>
4) Hopefully you're not on windows -- we certainly plan on supporting<br>
Windows at some point in the future, but we don't have access to it<br>
for testing right now.<br>
<br>
Hope this helps,<br>
<font color="#888888"><br>
Kurt Smith<br>
_______________________________________________<br>
Numpy-discussion mailing list<br>
<a href="mailto:Numpy-discussion@scipy.org">Numpy-discussion@scipy.org</a><br>
<a href="http://mail.scipy.org/mailman/listinfo/numpy-discussion" target="_blank">http://mail.scipy.org/mailman/listinfo/numpy-discussion</a><br>
</font></blockquote></div><br>