thouis / numpy-trac-migration

numpy Trac to github issues migration
2 stars 3 forks source link

wrapping f95 fails (migrated from Trac #621) #2174

Closed thouis closed 12 years ago

thouis commented 12 years ago

Original ticket http://projects.scipy.org/numpy/ticket/621 Reported 2007-11-23 by trac user jspaans, assigned to atmention:jarrodmillman.

When trying to wrap some fortran90 code on my platform (OS X, python2.5 from macports, gfortran 4.3, using numpy-latest downloaded today) I get an error which is fixed by applying the following (obvious) patch:

--- /opt/local/lib/python2.5/site-packages/numpy/f2py/rules.py~ 2007-11-23 17:36:11.000000000 +0100
+++ /opt/local/lib/python2.5/site-packages/numpy/f2py/rules.py  2007-11-23 17:36:11.000000000 +0100
atmention:atmention: -1219,7 +1219,7 atmention:atmention:
         f.write('!     This file is autogenerated with f2py (version:%s)\n'%(f2py_version))
         f.write('!     It contains Fortran 90 wrappers to fortran functions.\n')
         lines = []
-        for l in '\n\n'.join(funcwrappers2)+'\n'.split('\n'):
+        for l in ('\n\n'.join(funcwrappers2)+'\n').split('\n'):
             if len(l)>72 and l[0]==' ':
                 lines.append(l[:72]+'&\n     &')
                 l = l[72:]
thouis commented 12 years ago

Comment in Trac by trac user DavidPowell, 2007-12-03

I can confirm that I had the same problem with numpy 1.04 on CentOS, and that the same fix worked.

thouis commented 12 years ago

Comment in Trac by atmention:jarrodmillman, 2008-02-10

thouis commented 12 years ago

Comment in Trac by atmention:jarrodmillman, 2008-02-10

Fixed in r4538