1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 fetchpatch,
6 setuptools,
7 setuptools-scm,
8 matchpy,
9 numpy,
10 astunparse,
11 typing-extensions,
12 pytest7CheckHook,
13 pytest-cov,
14}:
15
16buildPythonPackage rec {
17 pname = "uarray";
18 version = "0.8.8";
19 pyproject = true;
20
21 src = fetchFromGitHub {
22 owner = "Quansight-Labs";
23 repo = pname;
24 rev = version;
25 hash = "sha256-wTKqOw64b+/kdZpSYLwCJATOuo807BWCtVHB4pH58fY=";
26 };
27
28 nativeBuildInputs = [
29 setuptools
30 setuptools-scm
31 ];
32 build-system = [ setuptools ];
33
34 dependencies = [
35 astunparse
36 matchpy
37 numpy
38 typing-extensions
39 ];
40
41 nativeCheckInputs = [
42 pytest7CheckHook
43 pytest-cov
44 ];
45
46 # Tests must be run from outside the source directory
47 preCheck = ''
48 cd $TMP
49 '';
50
51 pytestFlagsArray = [
52 "--pyargs"
53 "uarray"
54 ];
55
56 pythonImportsCheck = [ "uarray" ];
57
58 meta = with lib; {
59 description = "Universal array library";
60 homepage = "https://github.com/Quansight-Labs/uarray";
61 license = licenses.bsd0;
62 maintainers = [ ];
63 };
64}