summaryrefslogtreecommitdiff
path: root/numpy/distutils/fcompiler
diff options
context:
space:
mode:
authorRalf Gommers <ralf.gommers@gmail.com>2019-08-10 21:45:04 -0700
committerRalf Gommers <ralf.gommers@gmail.com>2019-08-20 14:56:25 -0700
commit6c8ba943c5a5557414546a4d49d9c894133acf02 (patch)
treecf6f4177f0f77b72570c69d7aa4ca10af35a292f /numpy/distutils/fcompiler
parent950dd4e15ea0976bb671148440e036c3ae2dc11d (diff)
downloadnumpy-6c8ba943c5a5557414546a4d49d9c894133acf02.tar.gz
BLD: MAINT: change default behavior of build flag appending.
This is a follow-up to gh-7427. This can lead to hard to understand build failures, and we've warned that this change was coming for two releases.
Diffstat (limited to 'numpy/distutils/fcompiler')
-rw-r--r--numpy/distutils/fcompiler/environment.py12
1 files changed, 4 insertions, 8 deletions
diff --git a/numpy/distutils/fcompiler/environment.py b/numpy/distutils/fcompiler/environment.py
index 73a5e98e1..bb362d483 100644
--- a/numpy/distutils/fcompiler/environment.py
+++ b/numpy/distutils/fcompiler/environment.py
@@ -59,17 +59,13 @@ class EnvironmentConfig(object):
if envvar_contents is not None:
envvar_contents = convert(envvar_contents)
if var and append:
- if os.environ.get('NPY_DISTUTILS_APPEND_FLAGS', '0') == '1':
+ if os.environ.get('NPY_DISTUTILS_APPEND_FLAGS', '1') == '1':
var.extend(envvar_contents)
else:
+ # NPY_DISTUTILS_APPEND_FLAGS was explicitly set to 0
+ # to keep old (overwrite flags rather than append to
+ # them) behavior
var = envvar_contents
- if 'NPY_DISTUTILS_APPEND_FLAGS' not in os.environ.keys():
- msg = "{} is used as is, not appended ".format(envvar) + \
- "to flags already defined " + \
- "by numpy.distutils! Use NPY_DISTUTILS_APPEND_FLAGS=1 " + \
- "to obtain appending behavior instead (this " + \
- "behavior will become default in a future release)."
- warnings.warn(msg, UserWarning, stacklevel=3)
else:
var = envvar_contents
if confvar is not None and self._conf: