forked from scipy/scipy
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
BLD: start openblas wheel in cibuildwheel [wheel build][skip cirrus]
- Loading branch information
Showing
4 changed files
with
34 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import os | ||
import importlib | ||
|
||
|
||
def configure_scipy_openblas(blas_variant='32'): | ||
"""Create .openblas/scipy-openblas.pc | ||
Requires a pre-installed scipy-openblas32 wheel from PyPI. | ||
""" | ||
basedir = os.getcwd() | ||
openblas_dir = os.path.join(basedir, ".openblas") | ||
pkg_config_fname = os.path.join(openblas_dir, "scipy-openblas.pc") | ||
|
||
if os.path.exists(pkg_config_fname): | ||
return None | ||
|
||
module_name = f"scipy_openblas{blas_variant}" | ||
try: | ||
openblas = importlib.import_module(module_name) | ||
except ModuleNotFoundError: | ||
raise RuntimeError(f"'pip install {module_name} first") | ||
|
||
os.makedirs(openblas_dir, exist_ok=True) | ||
with open(pkg_config_fname, "wt", encoding="utf8") as fid: | ||
fid.write(openblas.get_pkg_config().replace("\\", "/")) |