Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 setuptools, 6 cython_0, 7 hypothesis, 8 numpy, 9 pytestCheckHook, 10 pythonOlder, 11 gitUpdater, 12}: 13 14buildPythonPackage rec { 15 pname = "blis"; 16 version = "0.7.11"; 17 pyproject = true; 18 19 disabled = pythonOlder "3.7"; 20 21 src = fetchFromGitHub { 22 owner = "explosion"; 23 repo = "cython-blis"; 24 rev = "refs/tags/v${version}"; 25 hash = "sha256-p8pzGZc5OiiGTvXULDgzsBC3jIhovTKUq3RtPnQ/+to="; 26 }; 27 28 postPatch = '' 29 # See https://github.com/numpy/numpy/issues/21079 30 # has no functional difference as the name is only used in log output 31 substituteInPlace blis/benchmark.py \ 32 --replace 'numpy.__config__.blas_ilp64_opt_info["libraries"]' '["dummy"]' 33 ''; 34 35 preCheck = '' 36 # remove src module, so tests use the installed module instead 37 rm -rf ./blis 38 ''; 39 40 nativeBuildInputs = [ 41 setuptools 42 cython_0 43 ]; 44 45 propagatedBuildInputs = [ numpy ]; 46 47 nativeCheckInputs = [ 48 hypothesis 49 pytestCheckHook 50 ]; 51 52 pythonImportsCheck = [ "blis" ]; 53 54 passthru = { 55 # Do not update to BLIS 0.9.x until the following issue is resolved: 56 # https://github.com/explosion/thinc/issues/771#issuecomment-1255825935 57 skipBulkUpdate = true; 58 updateScript = gitUpdater { 59 rev-prefix = "v"; 60 ignoredVersions = "0\.9\..*"; 61 }; 62 }; 63 64 meta = with lib; { 65 description = "BLAS-like linear algebra library"; 66 homepage = "https://github.com/explosion/cython-blis"; 67 license = licenses.bsd3; 68 maintainers = with maintainers; [ nickcao ]; 69 }; 70}