Skip to content

Commit

Permalink
python312Packages.traittypes: unstable-2019-06-23 -> unstable-2020-07-17
Browse files Browse the repository at this point in the history
Fixes test failures, and replaces np.int with int in tests, since that
makes tests fail.
  • Loading branch information
pyrox0 committed Jul 27, 2024
1 parent 933c387 commit 545a1e2
Showing 1 changed file with 7 additions and 18 deletions.
25 changes: 7 additions & 18 deletions pkgs/development/python-modules/traittypes/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,8 @@
lib,
buildPythonPackage,
fetchFromGitHub,
fetchpatch,
isPy27,
pytestCheckHook,
nose,
numpy,
pandas,
xarray,
Expand All @@ -14,41 +12,32 @@

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

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"
'';

propagatedBuildInputs = [ 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; {
Expand Down

0 comments on commit 545a1e2

Please sign in to comment.