Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / python-modules / humanize / default.nix
blob51653781c57d3d0677660957df8fadf7008769da
1 { lib
2 , buildPythonPackage
3 , fetchFromGitHub
4 , freezegun
5 , gettext
6 , pytestCheckHook
7 , pythonOlder
8 , hatch-vcs
9 , hatchling
12 buildPythonPackage rec {
13   pname = "humanize";
14   version = "4.8.0";
15   format = "pyproject";
17   disabled = pythonOlder "3.8";
19   src = fetchFromGitHub {
20     owner = "python-humanize";
21     repo = pname;
22     rev = "refs/tags/${version}";
23     hash = "sha256-bKTzygQtZ/0UB+zM9735a/xwH4KaoU6C8kUGurbHs2Y=";
24   };
26   SETUPTOOLS_SCM_PRETEND_VERSION = version;
28   nativeBuildInputs = [
29     hatch-vcs
30     hatchling
31     gettext
32   ];
34   postBuild = ''
35     scripts/generate-translation-binaries.sh
36   '';
38   postInstall = ''
39     cp -r 'src/humanize/locale' "$out/lib/"*'/site-packages/humanize/'
40   '';
42   nativeCheckInputs = [
43     freezegun
44     pytestCheckHook
45   ];
47   pythonImportsCheck = [
48     "humanize"
49   ];
51   meta = with lib; {
52     description = "Python humanize utilities";
53     homepage = "https://github.com/python-humanize/humanize";
54     changelog = "https://github.com/python-humanize/humanize/releases/tag/${version}";
55     license = licenses.mit;
56     maintainers = with maintainers; [ rmcgibbo Luflosi ];
57   };