Merge pull request #240218 from NixOS/pr/mplhep_init

This commit is contained in:
Sandro 2023-06-29 14:44:48 +02:00 committed by GitHub
commit 2d355cacae
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 101 additions and 0 deletions

View file

@ -0,0 +1,34 @@
{ lib
, buildPythonPackage
, fetchPypi
, setuptools
, setuptools-scm
}:
buildPythonPackage rec {
pname = "mplhep-data";
version = "0.0.3";
format = "pyproject";
src = fetchPypi {
pname = "mplhep_data";
inherit version;
hash = "sha256-tU0lfz9TyTpELNp6ZoHOJnJ34JFzwLQf14gg94Mhdy8=";
};
nativeBuildInputs = [
setuptools
setuptools-scm
];
pythonImportsCheck = [
"mplhep_data"
];
meta = with lib; {
description = "Sub-package to hold data (fonts) for mplhep";
homepage = "https://github.com/scikit-hep/mplhep_data";
license = with licenses; [ mit gfl ofl ];
maintainers = with maintainers; [ veprbl ];
};
}

View file

@ -0,0 +1,63 @@
{ lib
, buildPythonPackage
, fetchPypi
, hist
, matplotlib
, mplhep-data
, pytestCheckHook
, pytest-mock
, pytest-mpl
, scipy
, setuptools
, setuptools-scm
, uhi
, uproot
}:
buildPythonPackage rec {
pname = "mplhep";
version = "0.3.28";
format = "pyproject";
src = fetchPypi {
inherit pname version;
hash = "sha256-/7nfjIdlYoouDOI1vXdr9BSml5gpE0gad7ONAUmOCiE=";
};
nativeBuildInputs = [
setuptools
setuptools-scm
];
propagatedBuildInputs = [
matplotlib
uhi
mplhep-data
];
nativeCheckInputs = [
hist
pytestCheckHook
pytest-mock
pytest-mpl
scipy
uproot
];
disabledTests = [
# requires uproot4
"test_inputs_uproot"
"test_uproot_versions"
];
pythonImportsCheck = [
"mplhep"
];
meta = with lib; {
description = "Extended histogram plots on top of matplotlib and HEP compatible styling similar to current collaboration requirements (ROOT)";
homepage = "https://github.com/scikit-hep/mplhep";
license = with licenses; [ mit ];
maintainers = with maintainers; [ veprbl ];
};
}

View file

@ -6508,6 +6508,10 @@ self: super: with self; {
mplfinance = callPackage ../development/python-modules/mplfinance { };
mplhep = callPackage ../development/python-modules/mplhep { };
mplhep-data = callPackage ../development/python-modules/mplhep-data { };
mplleaflet = callPackage ../development/python-modules/mplleaflet { };
mpmath = callPackage ../development/python-modules/mpmath { };