biome: 1.9.2 -> 1.9.3 (#349335)
[NixPkgs.git] / pkgs / development / python-modules / scales / default.nix
blobe258bdf045f234364623ad2123215a1b68aa7f39
2   lib,
3   buildPythonPackage,
4   fetchPypi,
5   pytestCheckHook,
6   fetchpatch2,
7   six,
8   setuptools,
9 }:
11 buildPythonPackage rec {
12   pname = "scales";
13   version = "1.0.9";
14   pyproject = true;
16   src = fetchPypi {
17     inherit pname version;
18     hash = "sha256-i2kw99S/EVGSKQtEx1evXiVOP8/Ldf+aUfXJakBOJ1M=";
19   };
21   patches = [
22     # Use html module in Python 3 and cgi module in Python 2
23     # https://github.com/Cue/scales/pull/47
24     (fetchpatch2 {
25       url = "https://github.com/Cue/scales/commit/ee69d45f1a7f928f7b241702e9be06007444115e.patch?full_index=1";
26       hash = "sha256-xBlgkh1mf+3J7GtNI0zGb7Sum8UYbTpUmM12sxK/fSU=";
27     })
28   ];
30   postPatch = ''
31     for file in scales_test formats_test aggregation_test; do
32       substituteInPlace src/greplin/scales/$file.py \
33         --replace-fail "assertEquals" "assertEqual"
34     done;
35   '';
37   build-system = [ setuptools ];
39   dependencies = [ six ];
41   nativeCheckInputs = [ pytestCheckHook ];
43   meta = {
44     description = "Stats for Python processes";
45     homepage = "https://www.github.com/Cue/scales";
46     license = lib.licenses.asl20;
47     maintainers = with lib.maintainers; [ pyrox0 ];
48   };