pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

math/py-scipy



Hello,

Now that math/openblas_* is fixed to install the correct pkg-config files, I have found that math/py-scipy is directly using math/openblas and not the libraries that are set via PKGSRC_BLAS_TYPES.

I did not see a way to pass arguments to the build wheel command.  I would welcome feedback.  scipy now uses pkg-config to pick up all sorts of dependencies, and setting BLAS_C_INTERFACE=yes seems to be the way to get the pkg-config names from blas.buildlink3.mk.

diff --git a/math/py-scipy/Makefile b/math/py-scipy/Makefile
index ae5babbd7dc..07b1c44cfd6 100644
--- a/math/py-scipy/Makefile
+++ b/math/py-scipy/Makefile
@@ -26,9 +26,11 @@ TEST_DEPENDS+=       ${PYPKGPREFIX}-test-xdist-[0-9]*:../../devel/py-test-xdist
 
 USE_LANGUAGES+=        c99 c++11 fortran
 USE_TOOLS+=    pkg-config
+USE_TOOLS+=    cmake
 MAKE_ENV+=     ATLAS=None
 GCC_REQD+=     8
 EGG_NAME=      ${DISTNAME:S/scipy/SciPy/}
+BLAS_C_INTERFACE=      yes
 
 SUBST_CLASSES+=                pythran
 SUBST_STAGE.pythran=   pre-configure
@@ -66,6 +68,11 @@ fix-darwin-install-name:
        done
 .endif
 
+do-build:
+       ${RUN} cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${TOOL_PYTHONBIN} \
+       -m build --wheel --skip-dependency-check --no-isolation \
+       -Csetup-args=-Dblas=${BLAS_PC} -Csetup-args=-Dlapack=${LAPACKE_PC}
+
 # self test failures for 1.1.0 reported at
 # https://github.com/scipy/scipy/issues/9196
 # needs 'make install' first!
@@ -78,7 +85,7 @@ do-test:
 .include "../../lang/python/application.mk"
 .include "../../lang/python/wheel.mk"
 .include "../../math/fftw/buildlink3.mk"
-.include "../../math/openblas/buildlink3.mk"
+.include "../../mk/blas.buildlink3.mk"
 BUILDLINK_API_DEPENDS.py-numpy+=       ${PYPKGPREFIX}-numpy>=1.21.6
 .include "../../math/py-numpy/buildlink3.mk"
 .include "../../math/py-pythran/buildlink3.mk"



-- 
  
  matthewd%fastmail.us@localhost


Home | Main Index | Thread Index | Old Index