1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 freezegun, 6 gettext, 7 pytestCheckHook, 8 pythonOlder, 9 hatch-vcs, 10 hatchling, 11}: 12 13buildPythonPackage rec { 14 pname = "humanize"; 15 version = "4.9.0"; 16 format = "pyproject"; 17 18 disabled = pythonOlder "3.8"; 19 20 src = fetchFromGitHub { 21 owner = "python-humanize"; 22 repo = pname; 23 rev = "refs/tags/${version}"; 24 hash = "sha256-sLlgR6c65RmUNZdH2pHuxzo7dm71uUZXGqzcqyxCrk4="; 25 }; 26 27 nativeBuildInputs = [ 28 hatch-vcs 29 hatchling 30 gettext 31 ]; 32 33 postBuild = '' 34 scripts/generate-translation-binaries.sh 35 ''; 36 37 postInstall = '' 38 cp -r 'src/humanize/locale' "$out/lib/"*'/site-packages/humanize/' 39 ''; 40 41 nativeCheckInputs = [ 42 freezegun 43 pytestCheckHook 44 ]; 45 46 pythonImportsCheck = [ "humanize" ]; 47 48 meta = with lib; { 49 description = "Python humanize utilities"; 50 homepage = "https://github.com/python-humanize/humanize"; 51 changelog = "https://github.com/python-humanize/humanize/releases/tag/${version}"; 52 license = licenses.mit; 53 maintainers = with maintainers; [ 54 rmcgibbo 55 Luflosi 56 ]; 57 }; 58}