Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

python312Packages.scales: run tests using pytestCheckHook #334466

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 19 additions & 5 deletions pkgs/development/python-modules/scales/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
lib,
buildPythonPackage,
fetchPypi,
nose,
pytestCheckHook,
fetchpatch2,
six,
}:

Expand All @@ -16,11 +17,24 @@ buildPythonPackage rec {
sha256 = "8b6930f7d4bf115192290b44c757af5e254e3fcfcb75ff9a51f5c96a404e2753";
};

nativeCheckInputs = [ nose ];
propagatedBuildInputs = [ six ];
patches = [
# Use html module in Python 3 and cgi module in Python 2
Sigmanificient marked this conversation as resolved.
Show resolved Hide resolved
# https://github.com/Cue/scales/pull/47
(fetchpatch2 {
url = "https://github.com/Cue/scales/commit/ee69d45f1a7f928f7b241702e9be06007444115e.patch?full_index=1";
hash = "sha256-xBlgkh1mf+3J7GtNI0zGb7Sum8UYbTpUmM12sxK/fSU=";
})
];

postPatch = ''
for file in scales_test formats_test aggregation_test; do
substituteInPlace src/greplin/scales/$file.py \
--replace-fail "assertEquals" "assertEqual"
done;
'';

# No tests included
doCheck = false;
nativeCheckInputs = [ pytestCheckHook ];
propagatedBuildInputs = [ six ];

meta = with lib; {
description = "Stats for Python processes";
Expand Down