evcc: 0.131.4 -> 0.131.5
[NixPkgs.git] / pkgs / development / python-modules / humanize / default.nix
blobe8fba82004d17187e0425fee6a5a819e80e55919
2   lib,
3   buildPythonPackage,
4   fetchFromGitHub,
5   freezegun,
6   gettext,
7   pytestCheckHook,
8   pythonOlder,
9   python,
10   hatch-vcs,
11   hatchling,
14 buildPythonPackage rec {
15   pname = "humanize";
16   version = "4.11.0";
17   format = "pyproject";
19   disabled = pythonOlder "3.9";
21   src = fetchFromGitHub {
22     owner = "python-humanize";
23     repo = pname;
24     rev = "refs/tags/${version}";
25     hash = "sha256-C6u7t7RedInHJtN4yHli22Wc7llnrxn4YeKssyQ+hS4=";
26   };
28   nativeBuildInputs = [
29     hatch-vcs
30     hatchling
31     gettext
32   ];
34   postPatch = ''
35     # Remove dependency on pytest-cov
36     substituteInPlace pyproject.toml --replace-fail \
37       '"ignore:sys.monitoring isn'"'"'t available, using default core:coverage.exceptions.CoverageWarning",' ""
38   '';
40   postBuild = ''
41     scripts/generate-translation-binaries.sh
42   '';
44   postInstall = ''
45     cp -r 'src/humanize/locale' "$out/${python.sitePackages}/humanize/"
46   '';
48   nativeCheckInputs = [
49     freezegun
50     pytestCheckHook
51   ];
53   pythonImportsCheck = [ "humanize" ];
55   meta = with lib; {
56     description = "Python humanize utilities";
57     homepage = "https://github.com/python-humanize/humanize";
58     changelog = "https://github.com/python-humanize/humanize/releases/tag/${version}";
59     license = licenses.mit;
60     maintainers = with maintainers; [
61       rmcgibbo
62       Luflosi
63     ];
64   };