nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, freezegun
5, importlib-metadata
6, pytestCheckHook
7, pythonOlder
8, setuptools
9, setuptools-scm
10}:
11
12buildPythonPackage rec {
13 version = "4.1.0";
14 pname = "humanize";
15 format = "pyproject";
16
17 disabled = pythonOlder "3.7";
18
19 src = fetchFromGitHub {
20 owner = "python-humanize";
21 repo = pname;
22 rev = version;
23 hash = "sha256-5xL3gfEohDjnF085Pgx/PBXWWM76X4FU2KR+8OGshMw=";
24 };
25
26 SETUPTOOLS_SCM_PRETEND_VERSION = version;
27
28 nativeBuildInputs = [
29 setuptools-scm
30 ];
31
32 propagatedBuildInputs = [
33 setuptools
34 ] ++ lib.optionals (pythonOlder "3.8") [
35 importlib-metadata
36 ];
37
38 checkInputs = [
39 freezegun
40 pytestCheckHook
41 ];
42
43 pythonImportsCheck = [
44 "humanize"
45 ];
46
47 meta = with lib; {
48 description = "Python humanize utilities";
49 homepage = "https://github.com/python-humanize/humanize";
50 license = licenses.mit;
51 maintainers = with maintainers; [ rmcgibbo ];
52 };
53}