1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-18 11:40:45 +00:00

python310Packages.huggingface-hub: disable on older Python releases

This commit is contained in:
Fabian Affolter 2022-05-31 00:11:20 +02:00 committed by GitHub
parent bec4b99baa
commit e9ad7e5fec
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -15,32 +15,39 @@
buildPythonPackage rec {
pname = "huggingface-hub";
version = "0.7.0";
format = "setuptools";
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "huggingface";
repo = "huggingface_hub";
rev = "refs/tags/v${version}";
sha256 = "sha256-GUe9+Z23vt3sfpntDnToMY5vWLK6m0zRySSJgMljetg=";
hash = "sha256-GUe9+Z23vt3sfpntDnToMY5vWLK6m0zRySSJgMljetg=";
};
nativeBuildInputs = [ packaging ];
propagatedBuildInputs = [
filelock
packaging
pyyaml
requests
ruamel-yaml
tqdm
typing-extensions
] ++ lib.optionals (pythonOlder "3.8") [ importlib-metadata ];
] ++ lib.optionals (pythonOlder "3.8") [
importlib-metadata
];
# Tests require network access.
doCheck = false;
pythonImportsCheck = [ "huggingface_hub" ];
pythonImportsCheck = [
"huggingface_hub"
];
meta = with lib; {
homepage = "https://github.com/huggingface/huggingface_hub";
description = "Download and publish models and other files on the huggingface.co hub";
homepage = "https://github.com/huggingface/huggingface_hub";
changelog = "https://github.com/huggingface/huggingface_hub/releases/tag/v${version}";
license = licenses.asl20;
maintainers = with maintainers; [ ];