8000 More debug. · matplotlib/matplotlib@18fcbe7 · GitHub
[go: up one dir, main page]

Skip to content

Commit 18fcbe7

Browse files
committed
More debug.
1 parent 7104500 commit 18fcbe7

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

setup.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,27 +121,37 @@ def add_optional_flags(self):
121121
ext.extra_compile_args.append('-fvisibility-inlines-hidden')
122122
cxxflags.append('-fvisibility-inlines-hidden')
123123
ranlib = 'RANLIB' in env
124+
print_raw(f'RANLIB is {"" if ranlib else "not "}in the environment')
124125
if not ranlib and self.compiler.compiler_type == 'unix':
126+
print_raw('RANLIB unset and compiler is unix')
125127
try:
126128
version = subprocess.run(self.compiler.compiler +
127129
['--version'],
128130
stdout=subprocess.PIPE,
129131
stderr=subprocess.STDOUT,
130132
universal_newlines=True).stdout
131133
except Exception as e:
132-
print('Compiler version check failed: ', e)
134+
print_raw(f'Compiler version check failed: {e}')
133135
else:
136+
print_raw(f'Compiler output is {version!r}')
134137
if 'GCC' in version:
138+
print_raw('Compiler is GCC')
135139
if 'TRAVIS' in os.environ:
140+
print_raw('Travis is set; enabling ranlib')
136141
ranlib = True
137142
else:
138143
ranlib = shutil.which('gcc-ranlib')
144+
print_raw(f'Searched for gcc-ranlib: {ranlib}')
139145
elif 'clang' in version:
146+
print_raw('Compiler is clang')
140147
if sys.platform == 'darwin':
148+
print_raw('Platform is darwin; enabling ranlib')
141149
ranlib = True
142150
else:
143151
ranlib = shutil.which('llvm-ranlib')
152+
print_raw(f'Searched for llvm-ranlib: {ranlib}')
144153
if ranlib and has_flag(self.compiler, '-flto'):
154+
print_raw('Both ranlib and lto are available')
145155
for ext in self.extensions:
146156
ext.extra_compile_args.append('-flto')
147157
cppflags.append('-flto')

0 commit comments

Comments
 (0)
0