1{ lib
2, buildPythonPackage
3, pythonOlder
4, fetchFromGitHub
5, hatch-fancy-pypi-readme
6, hatchling
7, awkward-cpp
8, importlib-metadata
9, numpy
10, packaging
11, typing-extensions
12, fsspec
13, jax
14, jaxlib
15, numba
16, setuptools
17, numexpr
18, pandas
19, pyarrow
20, pytest-xdist
21, pytestCheckHook
22}:
23
24buildPythonPackage rec {
25 pname = "awkward";
26 version = "2.4.10";
27 pyproject = true;
28
29 disabled = pythonOlder "3.8";
30
31 src = fetchFromGitHub {
32 owner = "scikit-hep";
33 repo = "awkward";
34 rev = "refs/tags/v${version}";
35 hash = "sha256-D+bgKI6olK3smgnRdACvd0gYMWvS6ao6f7nQh3YExXw=";
36 };
37
38 nativeBuildInputs = [
39 hatch-fancy-pypi-readme
40 hatchling
41 ];
42
43 propagatedBuildInputs = [
44 awkward-cpp
45 importlib-metadata
46 numpy
47 packaging
48 ] ++ lib.optionals (pythonOlder "3.11") [
49 typing-extensions
50 ] ++ lib.optionals (pythonOlder "3.12") [
51 importlib-metadata
52 ];
53
54 dontUseCmakeConfigure = true;
55
56 pythonImportsCheck = [ "awkward" ];
57
58 nativeCheckInputs = [
59 fsspec
60 jax
61 jaxlib
62 numba
63 setuptools
64 numexpr
65 pandas
66 pyarrow
67 pytest-xdist
68 pytestCheckHook
69 ];
70
71 # The following tests have been disabled because they need to be run on a GPU platform.
72 disabledTestPaths = [
73 "tests-cuda"
74 ];
75
76 meta = with lib; {
77 description = "Manipulate JSON-like data with NumPy-like idioms";
78 homepage = "https://github.com/scikit-hep/awkward";
79 changelog = "https://github.com/scikit-hep/awkward/releases/tag/v${version}";
80 license = licenses.bsd3;
81 maintainers = with maintainers; [ veprbl ];
82 };
83}