at master 1.2 kB view raw
1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 scikit-build-core, 6 setuptools, 7 setuptools-scm, 8 cmake, 9 ninja, 10 matchpy, 11 numpy, 12 astunparse, 13 typing-extensions, 14 nix-update-script, 15 pytestCheckHook, 16 pytest-cov-stub, 17}: 18 19buildPythonPackage rec { 20 pname = "uarray"; 21 version = "0.9.2"; 22 pyproject = true; 23 24 src = fetchFromGitHub { 25 owner = "Quansight-Labs"; 26 repo = "uarray"; 27 tag = version; 28 hash = "sha256-eCrmmP+9TI+T8Km8MOz0EqseneFwPizlnZloK5yNLcM="; 29 }; 30 31 build-system = [ 32 scikit-build-core 33 setuptools 34 setuptools-scm 35 cmake 36 ninja 37 ]; 38 39 dontUseCmakeConfigure = true; 40 41 dependencies = [ 42 astunparse 43 matchpy 44 numpy 45 typing-extensions 46 ]; 47 48 nativeCheckInputs = [ 49 pytestCheckHook 50 pytest-cov-stub 51 ]; 52 53 # Tests must be run from outside the source directory 54 preCheck = '' 55 cd $TMP 56 ''; 57 58 pytestFlags = [ 59 "--pyargs" 60 "uarray" 61 ]; 62 63 pythonImportsCheck = [ "uarray" ]; 64 65 passthru.updateScript = nix-update-script { }; 66 67 meta = with lib; { 68 description = "Universal array library"; 69 homepage = "https://github.com/Quansight-Labs/uarray"; 70 license = licenses.bsd0; 71 maintainers = [ lib.maintainers.pbsds ]; 72 }; 73}