2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
fsspec,
|
|
|
|
stdenv,
|
|
|
|
buildPythonPackage,
|
|
|
|
pythonOlder,
|
|
|
|
fetchFromGitHub,
|
|
|
|
hatch-fancy-pypi-readme,
|
|
|
|
hatchling,
|
|
|
|
awkward-cpp,
|
|
|
|
importlib-metadata,
|
|
|
|
numpy,
|
|
|
|
packaging,
|
|
|
|
typing-extensions,
|
|
|
|
jax,
|
|
|
|
jaxlib,
|
|
|
|
numba,
|
|
|
|
setuptools,
|
|
|
|
numexpr,
|
|
|
|
pandas,
|
|
|
|
pyarrow,
|
|
|
|
pytest-xdist,
|
|
|
|
pytestCheckHook,
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "awkward";
|
2024-07-01 15:47:52 +00:00
|
|
|
version = "2.6.6";
|
2023-11-16 04:20:00 +00:00
|
|
|
pyproject = true;
|
2022-09-30 11:47:45 +00:00
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
disabled = pythonOlder "3.8";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "scikit-hep";
|
|
|
|
repo = "awkward";
|
|
|
|
rev = "refs/tags/v${version}";
|
2024-07-01 15:47:52 +00:00
|
|
|
hash = "sha256-5Jg+Ki1vJ4Rz22TbqTvVtb5YLvkvP8EOQ7cmTmI6gQU=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
build-system = [
|
2022-12-17 10:02:37 +00:00
|
|
|
hatch-fancy-pypi-readme
|
|
|
|
hatchling
|
2022-09-30 11:47:45 +00:00
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
dependencies =
|
|
|
|
[
|
|
|
|
awkward-cpp
|
|
|
|
fsspec
|
|
|
|
importlib-metadata
|
|
|
|
numpy
|
|
|
|
packaging
|
|
|
|
]
|
|
|
|
++ lib.optionals (pythonOlder "3.11") [ typing-extensions ]
|
|
|
|
++ lib.optionals (pythonOlder "3.12") [ importlib-metadata ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-12-25 13:55:36 +00:00
|
|
|
dontUseCmakeConfigure = true;
|
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
pythonImportsCheck = [ "awkward" ];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeCheckInputs =
|
|
|
|
[
|
|
|
|
fsspec
|
|
|
|
numba
|
|
|
|
setuptools
|
|
|
|
numexpr
|
|
|
|
pandas
|
|
|
|
pyarrow
|
|
|
|
pytest-xdist
|
|
|
|
pytestCheckHook
|
|
|
|
]
|
|
|
|
++ lib.optionals (!stdenv.isDarwin) [
|
|
|
|
# no support for darwin
|
|
|
|
jax
|
|
|
|
jaxlib
|
|
|
|
];
|
2022-08-12 12:06:08 +00:00
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
# The following tests have been disabled because they need to be run on a GPU platform.
|
2022-09-30 11:47:45 +00:00
|
|
|
disabledTestPaths = [
|
|
|
|
"tests-cuda"
|
2024-06-05 15:53:02 +00:00
|
|
|
# Disable tests dependending on jax on darwin
|
|
|
|
] ++ lib.optionals stdenv.isDarwin [ "tests/test_2603_custom_behaviors_with_jax.py" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
meta = {
|
2020-12-25 13:55:36 +00:00
|
|
|
description = "Manipulate JSON-like data with NumPy-like idioms";
|
2022-05-18 14:49:53 +00:00
|
|
|
homepage = "https://github.com/scikit-hep/awkward";
|
2023-07-15 17:15:38 +00:00
|
|
|
changelog = "https://github.com/scikit-hep/awkward/releases/tag/v${version}";
|
2024-06-05 15:53:02 +00:00
|
|
|
license = lib.licenses.bsd3;
|
|
|
|
maintainers = with lib.maintainers; [ veprbl ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|