[Numpy-discussion] f2py --include_paths from command line

Ethan T Coon etc2103 at columbia.edu
Tue Aug 15 13:27:06 EDT 2006


Hi all,

The following line:

f2py -c -m _test --include_paths ./include test.f

(where test.f contains the line " include 'test_inc.h' " and 
'test_inc.h' exists in the directory './include' )

results in the errors:

------------------------------------------------------------------

running build
running config_fc
running build_src
building extension "_test" sources
f2py options: []
f2py:> /tmp/tmpJqhFcQ/src.linux-i686-2.4/_testmodule.c
creating /tmp/tmpJqhFcQ
creating /tmp/tmpJqhFcQ/src.linux-i686-2.4
Reading fortran codes...
         Reading file 'test.f' (format:fix,strict)
Line #6 in test.f:"      INCLUDE 'test_inc.h'"
         readfortrancode: could not find include file 'test_inc.h'. 
Ignoring.
Post-processing...
         Block: _test
                         Block: test
In: :_test:test.f:test
         getarrlen:variable "n" undefined
Post-processing (stage 2)...
Building modules...
         Building module "_test"...
                 Constructing wrapper function "test"...
                   a = test()
         Wrote C/API module "_test" to file 
"/tmp/tmpJqhFcQ/src.linux-i686-2.4/_testmodule.c"
   adding '/tmp/tmpJqhFcQ/src.linux-i686-2.4/fortranobject.c' to sources.
   adding '/tmp/tmpJqhFcQ/src.linux-i686-2.4' to include_dirs.
copying 
/packages/lib/python2.4/site-packages/numpy/f2py/src/fortranobject.c -> 
/tmp/tmpJqhFcQ/src.linux-i686-2.4
copying 
/packages/lib/python2.4/site-packages/numpy/f2py/src/fortranobject.h -> 
/tmp/tmpJqhFcQ/src.linux-i686-2.4
running build_ext
customize UnixCCompiler
customize UnixCCompiler using build_ext
customize GnuFCompiler
customize GnuFCompiler
customize GnuFCompiler using build_ext
building '_test' extension
compiling C sources
gcc options: '-pthread -fno-strict-aliasing -DNDEBUG -g -O3 -Wall 
-Wstrict-prototypes -fPIC'
error: unknown file type '' (from '--include_paths')

---------------------------------------------------------------



Similar versions ( --include_paths=./include  , --include_paths 
"./include"  , --include_paths `pwd`/include ) fail similarly.

Everything works fine from a distutils extension/setup call, but not from 
the command line.


Thanks,


Ethan


-------------------------------------------
Ethan Coon
DOE CSGF - Graduate Student
Dept. Applied Physics & Applied Mathematics
Columbia University
212-854-0415

http://www.ldeo.columbia.edu/~ecoon/
-------------------------------------------




More information about the NumPy-Discussion mailing list