2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
2024-07-31 10:19:44 +00:00
|
|
|
|
|
|
|
# build-system
|
2024-06-05 15:53:02 +00:00
|
|
|
setuptools,
|
2024-07-31 10:19:44 +00:00
|
|
|
|
|
|
|
# dependencies
|
2024-06-05 15:53:02 +00:00
|
|
|
filelock,
|
|
|
|
fsspec,
|
|
|
|
packaging,
|
|
|
|
pyyaml,
|
|
|
|
requests,
|
|
|
|
tqdm,
|
|
|
|
typing-extensions,
|
2021-03-19 17:17:44 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "huggingface-hub";
|
2024-10-23 06:41:50 +00:00
|
|
|
version = "0.26.1";
|
2024-02-29 20:09:43 +00:00
|
|
|
pyproject = true;
|
2022-06-16 17:23:12 +00:00
|
|
|
|
2021-03-19 17:17:44 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "huggingface";
|
|
|
|
repo = "huggingface_hub";
|
2022-05-18 14:49:53 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2024-10-23 06:41:50 +00:00
|
|
|
hash = "sha256-tro4Cvjyjc1vfAvYnfeKjh8ej83Z8l4cKe8SqIBVLXg=";
|
2021-03-19 17:17:44 +00:00
|
|
|
};
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
build-system = [ setuptools ];
|
2024-02-29 20:09:43 +00:00
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
dependencies = [
|
2021-03-19 17:17:44 +00:00
|
|
|
filelock
|
2023-05-24 13:37:59 +00:00
|
|
|
fsspec
|
2022-06-16 17:23:12 +00:00
|
|
|
packaging
|
2021-12-26 17:43:05 +00:00
|
|
|
pyyaml
|
2021-03-19 17:17:44 +00:00
|
|
|
requests
|
|
|
|
tqdm
|
2021-12-06 16:07:01 +00:00
|
|
|
typing-extensions
|
2022-06-16 17:23:12 +00:00
|
|
|
];
|
2021-03-19 17:17:44 +00:00
|
|
|
|
|
|
|
# Tests require network access.
|
|
|
|
doCheck = false;
|
2022-06-16 17:23:12 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "huggingface_hub" ];
|
2021-03-19 17:17:44 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
meta = {
|
2021-03-19 17:17:44 +00:00
|
|
|
description = "Download and publish models and other files on the huggingface.co hub";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "huggingface-cli";
|
2022-06-16 17:23:12 +00:00
|
|
|
homepage = "https://github.com/huggingface/huggingface_hub";
|
2022-05-18 14:49:53 +00:00
|
|
|
changelog = "https://github.com/huggingface/huggingface_hub/releases/tag/v${version}";
|
2024-06-05 15:53:02 +00:00
|
|
|
license = lib.licenses.asl20;
|
|
|
|
maintainers = with lib.maintainers; [ GaetanLepage ];
|
2021-03-19 17:17:44 +00:00
|
|
|
};
|
|
|
|
}
|