summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPearu Peterson <pearu.peterson@gmail.com>2007-05-18 17:33:15 +0000
committerPearu Peterson <pearu.peterson@gmail.com>2007-05-18 17:33:15 +0000
commit571f16714fe9c2c744c6563d495dd0aaa47a843b (patch)
treeb6b316946dd86a21feaaaeb279a948c01eddc661
parenta95189e65cb5aceb3c6a6a70203ba4ae9f694cfb (diff)
downloadnumpy-571f16714fe9c2c744c6563d495dd0aaa47a843b.tar.gz
Fixed warnings on language changes.
-rw-r--r--numpy/distutils/command/build_ext.py2
-rw-r--r--numpy/distutils/misc_util.py13
2 files changed, 4 insertions, 11 deletions
diff --git a/numpy/distutils/command/build_ext.py b/numpy/distutils/command/build_ext.py
index 17e60e1ab..78e360ba6 100644
--- a/numpy/distutils/command/build_ext.py
+++ b/numpy/distutils/command/build_ext.py
@@ -138,7 +138,7 @@ class build_ext (old_build_ext):
ext_language = 'f77'
else:
ext_language = 'c' # default
- if l and l!=ext_language:
+ if l and l!=ext_language and ext.language:
log.warn('resetting extension %r language from %r to %r.' % (ext.name,l,ext_language))
ext.language = ext_language
# global language
diff --git a/numpy/distutils/misc_util.py b/numpy/distutils/misc_util.py
index e5f26605a..ca36df883 100644
--- a/numpy/distutils/misc_util.py
+++ b/numpy/distutils/misc_util.py
@@ -309,8 +309,9 @@ def as_list(seq):
return [seq]
def get_language(sources):
+ # not used in numpy/scipy packages, use build_ext.detect_language instead
""" Determine language value (c,f77,f90) from sources """
- language = 'c'
+ language = None
for source in sources:
if isinstance(source, str):
if f90_ext_match(source):
@@ -1030,11 +1031,7 @@ class Configuration(object):
ext_args = copy.copy(kw)
ext_args['name'] = dot_join(self.name,name)
ext_args['sources'] = sources
-
- language = ext_args.get('language',None)
- if language is None:
- ext_args['language'] = get_language(sources)
-
+
if ext_args.has_key('extra_info'):
extra_info = ext_args['extra_info']
del ext_args['extra_info']
@@ -1099,10 +1096,6 @@ class Configuration(object):
name = name #+ '__OF__' + self.name
build_info['sources'] = sources
- language = build_info.get('language',None)
- if language is None:
- build_info['language'] = get_language(sources)
-
self._fix_paths_dict(build_info)
self.libraries.append((name,build_info))