2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
setuptools,
|
|
|
|
cython_0,
|
|
|
|
hypothesis,
|
|
|
|
numpy,
|
|
|
|
pytestCheckHook,
|
|
|
|
pythonOlder,
|
|
|
|
gitUpdater,
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "blis";
|
2024-01-02 11:29:13 +00:00
|
|
|
version = "0.7.11";
|
|
|
|
pyproject = true;
|
2022-11-02 22:02:43 +00:00
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "explosion";
|
|
|
|
repo = "cython-blis";
|
|
|
|
rev = "refs/tags/v${version}";
|
|
|
|
hash = "sha256-p8pzGZc5OiiGTvXULDgzsBC3jIhovTKUq3RtPnQ/+to=";
|
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
|
2024-01-02 11:29:13 +00:00
|
|
|
# has no functional difference as the name is only used in log output
|
2022-11-02 22:02:43 +00:00
|
|
|
substituteInPlace blis/benchmark.py \
|
2024-01-02 11:29:13 +00:00
|
|
|
--replace 'numpy.__config__.blas_ilp64_opt_info["libraries"]' '["dummy"]'
|
|
|
|
'';
|
|
|
|
|
|
|
|
preCheck = ''
|
|
|
|
# remove src module, so tests use the installed module instead
|
|
|
|
rm -rf ./blis
|
2022-11-02 22:02:43 +00:00
|
|
|
'';
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
nativeBuildInputs = [
|
2024-01-02 11:29:13 +00:00
|
|
|
setuptools
|
2024-04-21 15:54:59 +00:00
|
|
|
cython_0
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
propagatedBuildInputs = [ numpy ];
|
2020-09-25 04:45:31 +00:00
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2020-04-24 23:36:52 +00:00
|
|
|
hypothesis
|
2024-01-02 11:29:13 +00:00
|
|
|
pytestCheckHook
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "blis" ];
|
2022-11-02 22:02:43 +00:00
|
|
|
|
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;
|
2024-01-13 08:15:51 +00:00
|
|
|
updateScript = gitUpdater {
|
|
|
|
rev-prefix = "v";
|
|
|
|
ignoredVersions = "0\.9\..*";
|
|
|
|
};
|
2023-03-30 22:05:00 +00:00
|
|
|
};
|
|
|
|
|
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;
|
2024-01-02 11:29:13 +00:00
|
|
|
maintainers = with maintainers; [ nickcao ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|