2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
pythonOlder,
|
|
|
|
fetchFromGitHub,
|
2024-09-19 14:19:46 +00:00
|
|
|
|
|
|
|
# build-system
|
2024-06-05 15:53:02 +00:00
|
|
|
hatch-fancy-pypi-readme,
|
|
|
|
hatchling,
|
2024-09-19 14:19:46 +00:00
|
|
|
|
|
|
|
# dependencies
|
2024-06-05 15:53:02 +00:00
|
|
|
awkward-cpp,
|
2024-09-19 14:19:46 +00:00
|
|
|
fsspec,
|
2024-06-05 15:53:02 +00:00
|
|
|
numpy,
|
|
|
|
packaging,
|
|
|
|
typing-extensions,
|
2024-09-19 14:19:46 +00:00
|
|
|
importlib-metadata,
|
|
|
|
|
|
|
|
# checks
|
2024-06-05 15:53:02 +00:00
|
|
|
numba,
|
|
|
|
setuptools,
|
|
|
|
numexpr,
|
|
|
|
pandas,
|
|
|
|
pyarrow,
|
|
|
|
pytest-xdist,
|
|
|
|
pytestCheckHook,
|
2024-09-19 14:19:46 +00:00
|
|
|
jax,
|
|
|
|
jaxlib,
|
|
|
|
|
|
|
|
stdenv,
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "awkward";
|
2024-10-09 16:51:18 +00:00
|
|
|
version = "2.6.9";
|
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
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "scikit-hep";
|
|
|
|
repo = "awkward";
|
|
|
|
rev = "refs/tags/v${version}";
|
2024-10-09 16:51:18 +00:00
|
|
|
hash = "sha256-kYDihmfzMH5LPXSgXpC64qMPqxIX59VzflhP0gWu92Y=";
|
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
|
|
|
|
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
|
|
|
|
]
|
2024-09-26 11:04:55 +00:00
|
|
|
++ lib.optionals (!stdenv.hostPlatform.isDarwin) [
|
2024-06-05 15:53:02 +00:00
|
|
|
# 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
|
2024-09-26 11:04:55 +00:00
|
|
|
] ++ lib.optionals stdenv.hostPlatform.isDarwin [ "tests/test_2603_custom_behaviors_with_jax.py" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-09-19 14:19:46 +00:00
|
|
|
disabledTests = [
|
|
|
|
# AssertionError: Regex pattern did not match.
|
|
|
|
"test_serialise_with_nonserialisable_attrs"
|
|
|
|
"test_serialise_with_nonserialisable_attrs"
|
|
|
|
];
|
|
|
|
|
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
|
|
|
};
|
|
|
|
}
|