1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, fetchpatch
5, matchpy
6, numpy
7, astunparse
8, typing-extensions
9, pytestCheckHook
10, pytest-cov
11}:
12
13buildPythonPackage rec {
14 pname = "uarray";
15 version = "0.8.2";
16
17 src = fetchFromGitHub {
18 owner = "Quansight-Labs";
19 repo = pname;
20 rev = version;
21 sha256 = "1x2jp7w2wmn2awyv05xs0frpq0fa0rprwcxyg72wgiss0bnzxnhm";
22 };
23
24 patches = [(
25 # Fixes a compile error with newer versions of GCC -- should be included
26 # in the next release after 0.8.2
27 fetchpatch {
28 url = "https://github.com/Quansight-Labs/uarray/commit/a2012fc7bb94b3773eb402c6fe1ba1a894ea3d18.patch";
29 sha256 = "1qqh407qg5dz6x766mya2bxrk0ffw5h17k478f5kcs53g4dyfc3s";
30 }
31 )];
32
33 nativeCheckInputs = [ pytestCheckHook pytest-cov ];
34 propagatedBuildInputs = [ matchpy numpy astunparse typing-extensions ];
35
36 # Tests must be run from outside the source directory
37 preCheck = ''
38 cd $TMP
39 '';
40 pytestFlagsArray = ["--pyargs" "uarray"];
41 pythonImportsCheck = [ "uarray" ];
42
43 meta = with lib; {
44 description = "Universal array library";
45 homepage = "https://github.com/Quansight-Labs/uarray";
46 license = licenses.bsd0;
47 maintainers = [ ];
48 };
49}