2024-05-22 16:01:06 +02:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
pythonOlder,
|
|
|
|
fetchFromGitHub,
|
|
|
|
setuptools,
|
|
|
|
filelock,
|
|
|
|
fsspec,
|
|
|
|
packaging,
|
|
|
|
pyyaml,
|
|
|
|
requests,
|
|
|
|
tqdm,
|
|
|
|
typing-extensions,
|
2021-03-07 08:03:16 +01:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "huggingface-hub";
|
2024-07-16 14:30:41 +02:00
|
|
|
version = "0.23.5";
|
2024-02-27 12:30:59 +01:00
|
|
|
pyproject = true;
|
2022-05-31 00:11:20 +02:00
|
|
|
|
2023-08-31 11:32:20 -04:00
|
|
|
disabled = pythonOlder "3.8";
|
2021-03-07 08:03:16 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "huggingface";
|
|
|
|
repo = "huggingface_hub";
|
2022-05-12 14:11:12 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2024-07-16 14:30:41 +02:00
|
|
|
hash = "sha256-Nncyi9u72aq1142wBpz3M/ji2GlCbdEqCZ9+kRRnMT4=";
|
2021-03-07 08:03:16 +01:00
|
|
|
};
|
|
|
|
|
2024-05-22 16:01:06 +02:00
|
|
|
build-system = [ setuptools ];
|
2024-02-27 12:30:59 +01:00
|
|
|
|
2024-05-02 15:17:16 +02:00
|
|
|
dependencies = [
|
2021-03-07 08:03:16 +01:00
|
|
|
filelock
|
2023-05-01 14:09:31 -04:00
|
|
|
fsspec
|
2022-05-31 00:11:20 +02:00
|
|
|
packaging
|
2021-11-30 09:23:14 -08:00
|
|
|
pyyaml
|
2021-03-07 08:03:16 +01:00
|
|
|
requests
|
|
|
|
tqdm
|
2021-11-02 19:07:27 +01:00
|
|
|
typing-extensions
|
2022-05-31 00:11:20 +02:00
|
|
|
];
|
2021-03-07 08:03:16 +01:00
|
|
|
|
|
|
|
# Tests require network access.
|
|
|
|
doCheck = false;
|
2022-05-31 00:11:20 +02:00
|
|
|
|
2024-05-22 16:01:06 +02:00
|
|
|
pythonImportsCheck = [ "huggingface_hub" ];
|
2021-03-07 08:03:16 +01:00
|
|
|
|
2024-05-21 22:34:42 +02:00
|
|
|
meta = {
|
2021-03-07 08:03:16 +01:00
|
|
|
description = "Download and publish models and other files on the huggingface.co hub";
|
2024-03-19 03:14:51 +01:00
|
|
|
mainProgram = "huggingface-cli";
|
2022-05-31 00:11:20 +02:00
|
|
|
homepage = "https://github.com/huggingface/huggingface_hub";
|
2022-05-13 04:20:00 +00:00
|
|
|
changelog = "https://github.com/huggingface/huggingface_hub/releases/tag/v${version}";
|
2024-05-21 22:34:42 +02:00
|
|
|
license = lib.licenses.asl20;
|
|
|
|
maintainers = with lib.maintainers; [ GaetanLepage ];
|
2021-03-07 08:03:16 +01:00
|
|
|
};
|
|
|
|
}
|