Files
Dmitry Kalinkin 36a552c0c8 python3Packages.hepdata-lib: init at 0.21.0
Library for getting your data into HEPData.

Assisted-by: Claude Sonnet 5
2026-07-19 18:59:00 -04:00

64 lines
1.4 KiB
Nix

{
lib,
buildPythonPackage,
fetchFromGitHub,
setuptools,
numpy,
pyyaml,
hist,
scipy,
hepdata-validator,
root,
imagemagick,
pytestCheckHook,
pytest-cov,
withRootSupport ? false,
}:
buildPythonPackage (finalAttrs: {
pname = "hepdata_lib";
version = "0.21.0";
pyproject = true;
__structuredAttrs = true;
src = fetchFromGitHub {
owner = "HEPData";
repo = "hepdata_lib";
tag = "v${finalAttrs.version}";
hash = "sha256-+RoiH0yFfR2dJxstk4JWUHWNk5TQH6fgEl7f78Ej2KI=";
};
build-system = [ setuptools ];
dependencies = [
numpy
pyyaml
hist
scipy
hepdata-validator
]
++ lib.optionals withRootSupport [ root ];
nativeCheckInputs = [
(imagemagick.override { ghostscriptSupport = true; })
pytest-cov
pytestCheckHook
];
disabledTestMarks = lib.optionals (!withRootSupport) [ "needs_root" ];
# These execute example Jupyter notebooks via papermill, requiring extra
# test-only dependencies (papermill, ipykernel) that are not packaged here.
disabledTestPaths = [ "tests/test_notebooks.py" ];
pythonImportsCheck = [ "hepdata_lib" ];
meta = {
description = "Library for getting your data into HEPData";
homepage = "https://github.com/HEPData/hepdata_lib";
changelog = "https://github.com/HEPData/hepdata_lib/releases/tag/v${finalAttrs.version}";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ veprbl ];
};
})