Add troubleshoot test

This commit is contained in:
Joe Rickerby
2020-08-13 11:46:39 +01:00
parent a7ea9f42cb
commit ac3523132d
2 changed files with 30 additions and 2 deletions
+2 -2
View File
@@ -233,7 +233,7 @@ def build(options: BuildOptions) -> None:
def troubleshoot(package_dir: Path, error: Exception) -> None:
if (isinstance(error, subprocess.CalledProcessError) and 'exec' in error.cmd):
if (isinstance(error, subprocess.CalledProcessError) and error.cmd[0:2] == ['pip', 'wheel']):
# the bash script failed
print('Checking for common errors...')
so_files = list(package_dir.glob('**/*.so'))
@@ -247,7 +247,7 @@ def troubleshoot(package_dir: Path, error: Exception) -> None:
If you're using Cython and have previously done an in-place build,
remove those build files (*.so and *.c) before starting cibuildwheel.
'''))
'''), file=sys.stderr)
print(' Files detected:')
print('\n'.join([f' {f}' for f in so_files]))