1{ lib
2, buildPythonPackage
3, fetchPypi
4, cython
5, hypothesis
6, numpy
7, pytest
8, pythonOlder
9}:
10
11buildPythonPackage rec {
12 pname = "blis";
13 version = "0.7.9";
14 format = "setuptools";
15
16 disabled = pythonOlder "3.7";
17
18 src = fetchPypi {
19 inherit pname version;
20 hash = "sha256-Ke9MJQB3hakP/C8Ks9O9O3XNLXhWqaSCt9DayNURoJ0=";
21 };
22
23 postPatch = ''
24 # See https://github.com/numpy/numpy/issues/21079
25 substituteInPlace blis/benchmark.py \
26 --replace "numpy.__config__.blas_ilp64_opt_info" "numpy.__config__.blas_opt_info"
27 '';
28
29 nativeBuildInputs = [
30 cython
31 ];
32
33 propagatedBuildInputs = [
34 numpy
35 ];
36
37 nativeCheckInputs = [
38 hypothesis
39 pytest
40 ];
41
42 pythonImportsCheck = [
43 "blis"
44 ];
45
46 passthru = {
47 # Do not update to BLIS 0.9.x until the following issue is resolved:
48 # https://github.com/explosion/thinc/issues/771#issuecomment-1255825935
49 skipBulkUpdate = true;
50 };
51
52 meta = with lib; {
53 description = "BLAS-like linear algebra library";
54 homepage = "https://github.com/explosion/cython-blis";
55 license = licenses.bsd3;
56 maintainers = with maintainers; [ ];
57 };
58}