Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 10 additions & 5 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,17 @@ def run(self):
exit(1)
config = ConfigParser()
config.read('site.cfg')

try:
libraries.extend([config['openblas']['library']])
library_dirs.extend([config['openblas']['library_dir']])
include_dirs.extend([config['openblas']['include_dir']])
except KeyError as err:
print(f'\033[31mKeyError: cannot find the {err} key in the site.cfg file. See the site.cfg.example file for documentation\033[0m')
for lib in ('blas', 'lapack', 'openblas'):
if lib in config:
libraries.extend([config[lib]['library']])
library_dirs.extend([config[lib]['library_dir']])
include_dirs.extend([config[lib]['include_dir']])
if len(libraries) == 0:
raise KeyError()
except Exception:
print(f'\033[31mCannot find BLAS/LAPACK/OpenBLAS paths in the site.cfg file. See the site.cfg.example file for documentation\033[0m')
exit(1)

if sys.platform.startswith('win32'):
Expand Down