diff options
author | Sayed Adel <seiko@imavr.com> | 2020-10-15 22:13:41 +0200 |
---|---|---|
committer | Sayed Adel <seiko@imavr.com> | 2020-10-27 11:46:58 +0000 |
commit | d54a45b28fdaad24eedf8a2ffee19d9afc7f2e69 (patch) | |
tree | da3c256bafef5820a3551fe5066258ff71907143 | |
parent | 018e0cabcf11196eefa7aae778076062b3560ec7 (diff) | |
download | numpy-d54a45b28fdaad24eedf8a2ffee19d9afc7f2e69.tar.gz |
BUG, BLD: fix multi-target name in `CCompilerOpt`'s report
-rw-r--r-- | numpy/distutils/ccompiler_opt.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/numpy/distutils/ccompiler_opt.py b/numpy/distutils/ccompiler_opt.py index 72ea0c388..3eba6e32a 100644 --- a/numpy/distutils/ccompiler_opt.py +++ b/numpy/distutils/ccompiler_opt.py @@ -2372,19 +2372,18 @@ class CCompilerOpt(_Config, _Distutils, _Cache, _CCompiler, _Feature, _Parse): else: dispatch_rows.append(("Generated", '')) for tar in self.feature_sorted(target_sources): - tar_as_seq = [tar] if isinstance(tar, str) else tar sources = target_sources[tar] - name = tar if isinstance(tar, str) else '(%s)' % ' '.join(tar) + pretty_name = tar if isinstance(tar, str) else '(%s)' % ' '.join(tar) flags = ' '.join(self.feature_flags(tar)) implies = ' '.join(self.feature_sorted(self.feature_implies(tar))) detect = ' '.join(self.feature_detect(tar)) extra_checks = [] - for name in tar_as_seq: + for name in ((tar,) if isinstance(tar, str) else tar): extra_checks += self.feature_extra_checks(name) extra_checks = (' '.join(extra_checks) if extra_checks else "none") dispatch_rows.append(('', '')) - dispatch_rows.append((name, implies)) + dispatch_rows.append((pretty_name, implies)) dispatch_rows.append(("Flags", flags)) dispatch_rows.append(("Extra checks", extra_checks)) dispatch_rows.append(("Detect", detect)) |