title: f2py use module - signature file
body: <p>i created my signature file which is using the module dimpar.
  When i try to compile using the signature file, f2py doesn't recognize the msects and maxpar and as a result i get:</p>
  
  <pre><code>/tmp/tmpj4zcO9/src.linux-i686-2.6/AtlasGeneratormodule.c:360: error: ‘msects’         undeclared here (not in a function)
  /tmp/tmpj4zcO9/src.linux-i686-2.6/AtlasGeneratormodule.c:413: error: ‘maxpar’ undeclared here (not in a function)
  /tmp/tmpj4zcO9/src.linux-i686-2.6/AtlasGeneratormodule.c:413: error: initializer element is not constant
  /tmp/tmpj4zcO9/src.linux-i686-2.6/AtlasGeneratormodule.c:413: error: (near initialization for ‘f2py_parms_def[0].dims.d[0]’)
  /tmp/tmpj4zcO9/src.linux-i686-2.6/AtlasGeneratormodule.c:360: error: ‘msects’ undeclared here (not in a function)
  /tmp/tmpj4zcO9/src.linux-i686-2.6/AtlasGeneratormodule.c:413: error: ‘maxpar’ undeclared here (not in a function)
  /tmp/tmpj4zcO9/src.linux-i686-2.6/AtlasGeneratormodule.c:413: error: initializer element is not constant
  </code></pre>
  
  <p>How do i make f2py understand that those parameters are coming from the module?</p>
  
  <p>Thanks</p>
  
  <p><strong>Signature file</strong>:</p>
  
  <pre><code>!    -*- f90 -*-
  ! Note: the context of this file is case sensitive.
  
  python module AtlasGenerator ! in 
  interface  ! in :AtlasGenerator
      subroutine loadhistogramdata(wdo,xlat,xlon,ah,nhs,nhb,fs,bins) ! in :AtlasGenerator:AtlasGenerator.f90
          use dimpar  
            ... 
          real dimension((msects)) :: a
          real dimension((msects)) :: c
            ...    
          real dimension((maxpar)) :: param
            ...
      end subroutine loadhistogramdata
  end interface 
  end python module AtlasGenerator
  
  ! This file was auto-generated with f2py (version:2).
  ! See http://cens.ioc.ee/projects/f2py2e/
  </code></pre>
  
  <p><strong>the module dimpar</strong>:</p>
  
  <pre><code> module dimpar
  
    parameter (msects=36) 
  
    parameter (maxpar=80) 
  
   end module dimpar
  </code></pre>
  
  <p><em><strong>Here is some sample code to replicate the problem:</em></strong></p>
  
  <p><strong>dimpar.f90</strong></p>
  
  <pre><code>module dimpar
  
        parameter (msects=36) 
  end module dimpar
  </code></pre>
  
  <p><strong>Array.f90</strong></p>
  
  <pre><code>SUBROUTINE FIB(A,N)
  
  use dimpar
  REAL*8 A(msects)
  DO I=1,N
   IF (I.EQ.1) THEN
      A(I) = 0.0D0
   ELSEIF (I.EQ.2) THEN
      A(I) = 1.0D0
   ELSE 
      A(I) = msects
   ENDIF
  ENDDO
  END
  </code></pre>
  
  <p>Once compiled i run:</p>
  
  <pre><code>f2py -m useArray -h useArray.pyf array.f90
  
  f2py --fcompiler=gfortran -c useArray.pyf array.o dimpar.o 
  </code></pre>