diff options
author | Julian Taylor <jtaylor.debian@googlemail.com> | 2017-05-01 23:07:39 +0200 |
---|---|---|
committer | Julian Taylor <jtaylor.debian@googlemail.com> | 2017-05-02 00:34:43 +0200 |
commit | 401597bb6262e2f3c26209be3afac235098c55c6 (patch) | |
tree | 7b3bb0902ab4dca0604416861d9e47d6a01ce33c /numpy/distutils/misc_util.py | |
parent | 590facafcbd454fc02f96aa52c1c3412d6cccd14 (diff) | |
download | numpy-401597bb6262e2f3c26209be3afac235098c55c6.tar.gz |
BUG: check compiler flags to determine the need for a rebuild
Some projects compile an extension multiple times with different flags.
As it is not intended to get the extension name from the compiler
object, store the last used flags in the dependency file and also check
if they match the flags of the current build.
Diffstat (limited to 'numpy/distutils/misc_util.py')
-rw-r--r-- | numpy/distutils/misc_util.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/numpy/distutils/misc_util.py b/numpy/distutils/misc_util.py index de0e4a47a..21aaece70 100644 --- a/numpy/distutils/misc_util.py +++ b/numpy/distutils/misc_util.py @@ -541,6 +541,18 @@ def _get_directories(list_of_sources): direcs.append(d[0]) return direcs +def _commandline_dep_string(cc_args, extra_postargs, pp_opts): + """ + Return commandline representation used to determine if a file needs + to be recompiled + """ + cmdline = 'commandline: ' + cmdline += ' '.join(cc_args) + cmdline += ' '.join(extra_postargs) + cmdline += ' '.join(pp_opts) + '\n' + return cmdline + + def get_dependencies(sources): #XXX scan sources for include statements return _get_headers(_get_directories(sources)) |