Closed stumpylog closed 1 year ago
We currently have libblas-dev
installed. Is it safe to run both libblas
and libopenblas
together, or might that cause issues? @waveform80
I think the better solution would be keeping the package linked against libblas
, at least for now. I could see an upgrade happening, but without the new libopenblas
installed and that causing people all sort of troubles.
I believe the build command would need to be something like: python -m build -C-Dblas=blas -C-Dlapack=lapack
There is no need to change BLAS libraries indeed, and you don't want to run two different ones together. So I suggest keeping it unchanged. The build command should then be:
python -m build -Csetup-args=-Dblas=blas -Csetup-args=-Dlapack=lapack
or, if you need build isolation:
python -m build -Csetup-args=-Dblas=blas -Csetup-args=-Dlapack=lapack --no-isolation --skip-dependency-check
pip
unfortunately doesn't yet support passing the same key (setup-args
) to --config-settings
twice, so build
has to be used instead of pip
.
I don't have a Raspberry Pi, but am interested in helping here if I can (I'm the SciPy build system maintainer). That will also help fix the SciPy build issue I just cross-linked with missing libatomic
, which seems specific to armv7 / Raspberry Pi. It looks like there's no building in regular CI on the piwheels
repo, so probably not useful for me to make a PR there?
We don't run python -m build
, we use pip wheel
.
Hmm, that's a problem, pip wheel
doesn't handle specifying both blas
and lapack
, I don't see a good way around that right now with --config-settings
. If you can apply a patch, then it's easy enough:
diff --git a/meson_options.txt b/meson_options.txt
index 5935bb850..f8c14ce46 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -1,6 +1,6 @@
-option('blas', type: 'string', value: 'openblas',
+option('blas', type: 'string', value: 'blas',
description: 'option for BLAS library switching')
-option('lapack', type: 'string', value: 'openblas',
+option('lapack', type: 'string', value: 'lapack',
description: 'option for LAPACK library switching')
option('use-g77-abi', type: 'boolean', value: 'false',
description: 'If set to true, forces using g77 compatibility wrappers ' +
Then pip wheel .
should work out of the box.
We don't run
python -m build
, we usepip wheel
.
There's no meaningful difference there aside for the fact that pip gives you less control, as it was never meant to be a scripting tool...
Given the package is now a couple of versions behind, perhaps it would be time to provide the default expected dependencies and update the install instructions of the page?
I think it would only require including OpenBLAS (libopenblas-dev) on the builder.
Package name
scipy
Package version
1.9.0+
PyPI URL
https://pypi.org/project/scipy/
piwheels URL
https://www.piwheels.org/project/scipy/
Python version
I am the maintainer
More information
With scipy 1.9.0, the default build now expects OpenBLAS (see https://scipy.github.io/devdocs/release.1.9.0.html). The probably quick way to get it building is include
libopenblas-dev
, though this would change the install instructions too.Otherwise, it looks like some build time options can be set to choose: https://scipy.github.io/devdocs/dev/contributor/meson_advanced.html#blas-lapack-selection