python312Packages.inotify: drop nose dependency; modernize (#330776)
This commit is contained in:
commit
ffa6a7897f
@ -2,31 +2,44 @@
|
|||||||
lib,
|
lib,
|
||||||
buildPythonPackage,
|
buildPythonPackage,
|
||||||
fetchFromGitHub,
|
fetchFromGitHub,
|
||||||
nose,
|
pytestCheckHook,
|
||||||
|
setuptools,
|
||||||
}:
|
}:
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage {
|
||||||
pname = "inotify";
|
pname = "inotify";
|
||||||
version = "unstable-2020-08-27";
|
version = "unstable-2020-08-27";
|
||||||
format = "setuptools";
|
pyproject = true;
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "dsoprea";
|
owner = "dsoprea";
|
||||||
repo = "PyInotify";
|
repo = "PyInotify";
|
||||||
rev = "f77596ae965e47124f38d7bd6587365924dcd8f7";
|
rev = "f77596ae965e47124f38d7bd6587365924dcd8f7";
|
||||||
sha256 = "X0gu4s1R/Kg+tmf6s8SdZBab2HisJl4FxfdwKktubVc=";
|
hash = "sha256-X0gu4s1R/Kg+tmf6s8SdZBab2HisJl4FxfdwKktubVc=";
|
||||||
fetchSubmodules = false;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeCheckInputs = [ nose ];
|
postPatch = ''
|
||||||
|
# Needed because assertEquals was removed in python 3.12
|
||||||
|
substituteInPlace tests/test_inotify.py \
|
||||||
|
--replace-fail "assertEquals" "assertEqual" \
|
||||||
|
'';
|
||||||
|
|
||||||
# dunno what's wrong but the module works regardless
|
build-system = [ setuptools ];
|
||||||
doCheck = false;
|
|
||||||
|
|
||||||
meta = with lib; {
|
nativeCheckInputs = [ pytestCheckHook ];
|
||||||
|
|
||||||
|
# Disable these tests as they're flaky.
|
||||||
|
# The returned list can be in a different order, which causes the tests to fail.
|
||||||
|
disabledTests = [
|
||||||
|
"test__automatic_new_watches_on_new_paths"
|
||||||
|
"test__cycle"
|
||||||
|
"test__renames"
|
||||||
|
];
|
||||||
|
|
||||||
|
meta = {
|
||||||
homepage = "https://github.com/dsoprea/PyInotify";
|
homepage = "https://github.com/dsoprea/PyInotify";
|
||||||
description = "Monitor filesystems events on Linux platforms with inotify";
|
description = "Monitor filesystems events on Linux platforms with inotify";
|
||||||
license = licenses.gpl2;
|
license = lib.licenses.gpl2;
|
||||||
platforms = platforms.linux;
|
platforms = lib.platforms.linux;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user