diff options
author | Pearu Peterson <pearu.peterson@gmail.com> | 2004-03-29 16:57:23 +0000 |
---|---|---|
committer | Pearu Peterson <pearu.peterson@gmail.com> | 2004-03-29 16:57:23 +0000 |
commit | 766c97f887162de06ca60caedbb28252499e464d (patch) | |
tree | c152be63b5d6963a8b16b1ce49f8f606f4642ddb | |
parent | b51513377fd4619784f1fa1748037bb7318c81a1 (diff) | |
download | numpy-766c97f887162de06ca60caedbb28252499e464d.tar.gz |
Added test for f2py --include_paths option
-rw-r--r-- | scipy_distutils/fcompiler.py | 2 | ||||
-rw-r--r-- | scipy_distutils/tests/f2py_f90_ext/include/body.f90 | 5 | ||||
-rw-r--r-- | scipy_distutils/tests/f2py_f90_ext/setup.py | 4 | ||||
-rw-r--r-- | scipy_distutils/tests/f2py_f90_ext/src/foo_free.f90 | 8 |
4 files changed, 12 insertions, 7 deletions
diff --git a/scipy_distutils/fcompiler.py b/scipy_distutils/fcompiler.py index a609e2512..60d762312 100644 --- a/scipy_distutils/fcompiler.py +++ b/scipy_distutils/fcompiler.py @@ -786,7 +786,7 @@ def dummy_fortran_file(): is_f_file = re.compile(r'.*[.](for|ftn|f77|f)\Z',re.I).match _has_f_header = re.compile(r'-[*]-\s*fortran\s*-[*]-',re.I).search _has_f90_header = re.compile(r'-[*]-\s*f90\s*-[*]-',re.I).search -_free_f90_start = re.compile(r'[^c*][^\s\d\t]',re.I).match +_free_f90_start = re.compile(r'[^c*]\s*[^\s\d\t]',re.I).match def is_free_format(file): """Check if file is in free format Fortran.""" # f90 allows both fixed and free format, assuming fixed unless diff --git a/scipy_distutils/tests/f2py_f90_ext/include/body.f90 b/scipy_distutils/tests/f2py_f90_ext/include/body.f90 new file mode 100644 index 000000000..90b44e29d --- /dev/null +++ b/scipy_distutils/tests/f2py_f90_ext/include/body.f90 @@ -0,0 +1,5 @@ + subroutine bar13(a) + !f2py intent(out) a + integer a + a = 13 + end subroutine bar13 diff --git a/scipy_distutils/tests/f2py_f90_ext/setup.py b/scipy_distutils/tests/f2py_f90_ext/setup.py index 0be8c8965..f3ab45045 100644 --- a/scipy_distutils/tests/f2py_f90_ext/setup.py +++ b/scipy_distutils/tests/f2py_f90_ext/setup.py @@ -4,7 +4,9 @@ from scipy_distutils.core import setup, Extension package = 'f2py_f90_ext' -ext = Extension(package+'.foo',['src/foo_free.f90']) +ext = Extension(package+'.foo',['src/foo_free.f90'], + include_dirs=['include'], + f2py_options=['--include_paths','include']) setup( name = package, diff --git a/scipy_distutils/tests/f2py_f90_ext/src/foo_free.f90 b/scipy_distutils/tests/f2py_f90_ext/src/foo_free.f90 index c1b641f13..c7713be59 100644 --- a/scipy_distutils/tests/f2py_f90_ext/src/foo_free.f90 +++ b/scipy_distutils/tests/f2py_f90_ext/src/foo_free.f90 @@ -1,8 +1,6 @@ module foo_free contains - subroutine bar13(a) - !f2py intent(out) a - integer a - a = 13 - end subroutine bar13 + +include "body.f90" + end module foo_free |