diff options
author | Pearu Peterson <pearu.peterson@gmail.com> | 2006-04-26 19:50:37 +0000 |
---|---|---|
committer | Pearu Peterson <pearu.peterson@gmail.com> | 2006-04-26 19:50:37 +0000 |
commit | f6c56c197f7b3fd245615e2c9bc862b815309c57 (patch) | |
tree | 6845ce78a94d17f4e81f4ddb962777f4928d98e8 /numpy/distutils/command/build_src.py | |
parent | 0feed10e39e924798036105221ea26f90743c684 (diff) | |
download | numpy-f6c56c197f7b3fd245615e2c9bc862b815309c57.tar.gz |
Try harder to get swig module name when in package.
Diffstat (limited to 'numpy/distutils/command/build_src.py')
-rw-r--r-- | numpy/distutils/command/build_src.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/numpy/distutils/command/build_src.py b/numpy/distutils/command/build_src.py index a29c4b74b..5e12f59f3 100644 --- a/numpy/distutils/command/build_src.py +++ b/numpy/distutils/command/build_src.py @@ -603,7 +603,7 @@ _f_pyf_ext_match = re.compile(r'.*[.](f90|f95|f77|for|ftn|f|pyf)\Z',re.I).match _header_ext_match = re.compile(r'.*[.](inc|h|hpp)\Z',re.I).match #### SWIG related auxiliary functions #### -_swig_module_name_match = re.compile(r'\s*%module\s*(?P<name>[\w_]+)', +_swig_module_name_match = re.compile(r'\s*%module\s*(.*\(\s*package\s*=\s*"(?P<package>[\w_]+)".*\)|)\s*(?P<name>[\w_]+)', re.I).match _has_c_header = re.compile(r'-[*]-\s*c\s*-[*]-',re.I).search _has_cpp_header = re.compile(r'-[*]-\s*c[+][+]\s*-[*]-',re.I).search @@ -622,6 +622,7 @@ def get_swig_target(source): def get_swig_modulename(source): f = open(source,'r') f_readlines = getattr(f,'xreadlines',f.readlines) + name = None for line in f_readlines(): m = _swig_module_name_match(line) if m: |