diff options
Diffstat (limited to 'numpy/distutils/fcompiler/environment.py')
-rw-r--r-- | numpy/distutils/fcompiler/environment.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/numpy/distutils/fcompiler/environment.py b/numpy/distutils/fcompiler/environment.py index 0a9e1c14f..37012dbb2 100644 --- a/numpy/distutils/fcompiler/environment.py +++ b/numpy/distutils/fcompiler/environment.py @@ -54,13 +54,17 @@ class EnvironmentConfig(object): if envvar is not None: envvar_contents = os.environ.get(envvar) if envvar_contents is not None: + if convert is not None: + envvar_contents = convert(envvar_contents) + else: + envvar_contents = [envvar_contents] if append and os.environ.get('NPY_DISTUTILS_APPEND_FLAGS', '0') == '1': if var is None: var = '' try: - var = ' '.join(var + [envvar_contents]) + var = ' '.join(var + envvar_contents) except TypeError: - var = ' '.join([var] + [envvar_contents]) + var = ' '.join([var] + envvar_contents) else: var = envvar_contents if confvar is not None and self._conf: |