python3Packages.fastdownload: cleanup, fix
This commit is contained in:
@@ -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 ];
|
||||
};
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user