biome: 1.9.2 -> 1.9.3 (#349335)
[NixPkgs.git] / pkgs / development / python-modules / humanize / default.nix
blobdbc0bdf1caef413f607a68df8eedaf895546d4cc
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.10.0";
17   format = "pyproject";
19   disabled = pythonOlder "3.8";
21   src = fetchFromGitHub {
22     owner = "python-humanize";
23     repo = pname;
24     rev = "refs/tags/${version}";
25     hash = "sha256-zzasFAaWH284IEnWwWKvCL1lt/ItNfdbWhq1K30gSPU=";
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   };