python3Packages.fastdownload: cleanup, fix

This commit is contained in:
Gaetan Lepage
2026-07-16 21:33:12 +00:00
parent 4b301a5e81
commit 6c47bd4d28
@@ -2,33 +2,53 @@
lib,
buildPythonPackage,
fetchPypi,
# build-system
setuptools,
# dependencies
fastprogress,
fastcore,
}:
buildPythonPackage rec {
buildPythonPackage (finalAttrs: {
pname = "fastdownload";
version = "0.0.7";
format = "setuptools";
pyproject = true;
__structuredAttrs = true;
# No tag for 0.0.7 on GitHub
src = fetchPypi {
inherit pname version;
inherit (finalAttrs) pname version;
hash = "sha256-IFB+246JQGofvXd15uKj2BpN1jPdUGsOnPDhYT6DHWo=";
};
propagatedBuildInputs = [
# pkg_resources used to come with setuptools but was removed
postPatch = ''
substituteInPlace setup.py \
--replace-fail \
"from pkg_resources import parse_version" \
"from packaging.version import parse as parse_version"
'';
build-system = [
setuptools
];
dependencies = [
fastprogress
fastcore
];
# no real tests
doCheck = false;
pythonImportsCheck = [ "fastdownload" ];
# no tests
doCheck = false;
meta = {
homepage = "https://github.com/fastai/fastdownload";
description = "Easily download, verify, and extract archives";
homepage = "https://github.com/fastai/fastdownload";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [ rxiao ];
};
}
})