1{ lib 2, fetchFromGitHub 3, buildPythonPackage 4, pythonOlder 5, filelock 6, fsspec 7, packaging 8, pyyaml 9, requests 10, tqdm 11, typing-extensions 12}: 13 14buildPythonPackage rec { 15 pname = "huggingface-hub"; 16 version = "0.18.0"; 17 format = "setuptools"; 18 19 disabled = pythonOlder "3.8"; 20 21 src = fetchFromGitHub { 22 owner = "huggingface"; 23 repo = "huggingface_hub"; 24 rev = "refs/tags/v${version}"; 25 hash = "sha256-/KbD3TNSbQ9ueXYFLoXnIRIoi/y3l0w72GZ1+JC8ULk="; 26 }; 27 28 propagatedBuildInputs = [ 29 filelock 30 fsspec 31 packaging 32 pyyaml 33 requests 34 tqdm 35 typing-extensions 36 ]; 37 38 # Tests require network access. 39 doCheck = false; 40 41 pythonImportsCheck = [ 42 "huggingface_hub" 43 ]; 44 45 meta = with lib; { 46 description = "Download and publish models and other files on the huggingface.co hub"; 47 homepage = "https://github.com/huggingface/huggingface_hub"; 48 changelog = "https://github.com/huggingface/huggingface_hub/releases/tag/v${version}"; 49 license = licenses.asl20; 50 maintainers = with maintainers; [ kira-bruneau ]; 51 }; 52}