2021-02-05 17:12:51 +00:00
|
|
|
{ lib
|
2020-04-24 23:36:52 +00:00
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, cython
|
|
|
|
, hypothesis
|
|
|
|
, numpy
|
|
|
|
, pytest
|
2022-11-02 22:02:43 +00:00
|
|
|
, pythonOlder
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "blis";
|
2023-03-30 22:05:00 +00:00
|
|
|
version = "0.7.9";
|
2022-11-02 22:02:43 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2023-03-30 22:05:00 +00:00
|
|
|
hash = "sha256-Ke9MJQB3hakP/C8Ks9O9O3XNLXhWqaSCt9DayNURoJ0=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-11-02 22:02:43 +00:00
|
|
|
postPatch = ''
|
|
|
|
# See https://github.com/numpy/numpy/issues/21079
|
|
|
|
substituteInPlace blis/benchmark.py \
|
|
|
|
--replace "numpy.__config__.blas_ilp64_opt_info" "numpy.__config__.blas_opt_info"
|
|
|
|
'';
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
cython
|
|
|
|
];
|
|
|
|
|
2020-09-25 04:45:31 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
numpy
|
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2020-04-24 23:36:52 +00:00
|
|
|
hypothesis
|
|
|
|
pytest
|
|
|
|
];
|
|
|
|
|
2022-11-02 22:02:43 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"blis"
|
|
|
|
];
|
|
|
|
|
2023-03-30 22:05:00 +00:00
|
|
|
passthru = {
|
|
|
|
# Do not update to BLIS 0.9.x until the following issue is resolved:
|
|
|
|
# https://github.com/explosion/thinc/issues/771#issuecomment-1255825935
|
|
|
|
skipBulkUpdate = true;
|
|
|
|
};
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "BLAS-like linear algebra library";
|
|
|
|
homepage = "https://github.com/explosion/cython-blis";
|
|
|
|
license = licenses.bsd3;
|
2022-11-02 22:02:43 +00:00
|
|
|
maintainers = with maintainers; [ ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|