1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5
6 # build-system
7 setuptools,
8
9 # dependencies
10 filelock,
11 fsspec,
12 packaging,
13 pyyaml,
14 requests,
15 tqdm,
16 typing-extensions,
17}:
18
19buildPythonPackage rec {
20 pname = "huggingface-hub";
21 version = "0.26.5";
22 pyproject = true;
23
24 src = fetchFromGitHub {
25 owner = "huggingface";
26 repo = "huggingface_hub";
27 tag = "v${version}";
28 hash = "sha256-0yg0UwC0vyp8Q+2RTyAJkFP9I4/RQ6zRj3CaKJwU8Gc=";
29 };
30
31 build-system = [ setuptools ];
32
33 dependencies = [
34 filelock
35 fsspec
36 packaging
37 pyyaml
38 requests
39 tqdm
40 typing-extensions
41 ];
42
43 # Tests require network access.
44 doCheck = false;
45
46 pythonImportsCheck = [ "huggingface_hub" ];
47
48 meta = {
49 description = "Download and publish models and other files on the huggingface.co hub";
50 mainProgram = "huggingface-cli";
51 homepage = "https://github.com/huggingface/huggingface_hub";
52 changelog = "https://github.com/huggingface/huggingface_hub/releases/tag/v${version}";
53 license = lib.licenses.asl20;
54 maintainers = with lib.maintainers; [ GaetanLepage ];
55 };
56}