Unverified Commit 2d355cac authored by Sandro Jäckel's avatar Sandro Jäckel Committed by GitHub
Browse files

Merge pull request #240218 from NixOS/pr/mplhep_init

parents 0431f997 560a07f5
Loading
Loading
Loading
Loading
+34 −0
Original line number Diff line number Diff line
{ 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 ];
  };
}
+63 −0
Original line number Diff line number Diff line
{ 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 ];
  };
}
+4 −0
Original line number Diff line number Diff line
@@ -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 { };