Unverified Commit 89b6c71c authored by Emily's avatar Emily Committed by GitHub
Browse files

Merge pull request #330236 from pyrox0/denose/traittypes

python312Packages.traittypes: unstable-2019-06-23 -> 0.2.1-unstable-2020-07-17
parents 22ba2abf e220b2cf
Loading
Loading
Loading
Loading
+15 −23
Original line number Diff line number Diff line
@@ -2,10 +2,9 @@
  lib,
  buildPythonPackage,
  fetchFromGitHub,
  fetchpatch,
  isPy27,
  pytestCheckHook,
  nose,
  setuptools,
  numpy,
  pandas,
  xarray,
@@ -14,47 +13,40 @@

buildPythonPackage rec {
  pname = "traittypes";
  version = "unstable-2019-06-23";
  format = "setuptools";
  version = "0.2.1-unstable-2020-07-17";
  pyproject = true;

  disabled = isPy27;

  src = fetchFromGitHub {
    owner = "jupyter-widgets";
    repo = pname;
    rev = "0a030b928991dec732c17a7a1cb13acbcd7650a2";
    sha256 = "0rlm5krmq6n8yi47dgdsjyrkz3m079pndpbzkz2gx98pb3jd9pjs";
    rev = "af2ebeec9e58b73a12d4cf841bd506d6eadb8868";
    hash = "sha256-q7kt8b+yDHsWML/wCeND9PrZMVjemhzG7Ih1OtHbnTw=";
  };

  patches = [
    (fetchpatch {
      name = "fix-intarray-test.patch";
      url = "https://github.com/minrk/traittypes/commit/a02441e5b259e5858453a853207260c9bd4efbb5.patch";
      sha256 = "120dsvr5nksizw75z1ah3h38mi399fxbvz5anakica557jahi0aw";
    })
  ];
  postPatch = ''
    substituteInPlace traittypes/tests/test_traittypes.py \
      --replace-fail "np.int" "int"
  '';

  build-system = [ setuptools ];

  propagatedBuildInputs = [ traitlets ];
  dependencies = [ traitlets ];

  nativeCheckInputs = [
    numpy
    pandas
    xarray
    nose
    pytestCheckHook
  ];

  disabledTestPaths = lib.optionals (lib.versionAtLeast numpy.version "1.17") [
    # https://github.com/jupyter-widgets/traittypes/blob/master/setup.py#L86-L87
    "traittypes/tests/test_traittypes.py"
  ];

  pythonImportsCheck = [ "traittypes" ];

  meta = with lib; {
  meta = {
    description = "Trait types for NumPy, SciPy, XArray, and Pandas";
    homepage = "https://github.com/jupyter-widgets/traittypes";
    license = licenses.bsd3;
    maintainers = with maintainers; [ bcdarwin ];
    license = lib.licenses.bsd3;
    maintainers = with lib.maintainers; [ bcdarwin ];
  };
}