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