Re: [f2py] f2py: error: unknown file type '' (from '--include_paths')

Pearu Peterson <[email protected]> Tue, 21 Jun 2011 11:46:33 +0300
Newsgroups gmane.comp.python.f2py.user
Message-ID <[email protected]>

On 06/21/2011 11:19 AM, Marcel Loose wrote:
> Hi all,
>
> I'm struggling with the following: I'm trying to build a Python module
> using f2py in "one go"; i.e. by using the options -c and -m. However,
> some of the Fortran sources include a file that is in a different
> directory.
>
> I've tried to specify an extra include directory using either
> '--include_paths' and '-I' anywhere on the command line, but it just
> doesn't work.
>
> When using '--include_paths', I get both a warning and an error:
>
>          readfortrancode: could not find include file 'constants.inc'.
> Ignoring.

What is the exact f2py command you are executing?
The message above means that f2py could not find the constants.inc file
within given include paths. The syntax for --include_paths reads:

   --include_paths <path1>:<path2>:...

>          :
>          :
>          error: unknown file type '' (from '--include_paths')

> When using '-I', I only see the warning, so it seems that the '-I'
> option is completely ignored by f2py.

Indeed, f2py by itself does not use -I. The -I options are used
when compiling C and Fortran codes.

HTH,
Pearu