python3Package.parfive: build from source
This commit is contained in:
@@ -1,39 +1,50 @@
|
||||
{
|
||||
lib,
|
||||
aiofiles,
|
||||
aioftp,
|
||||
aiohttp,
|
||||
buildPythonPackage,
|
||||
fetchPypi,
|
||||
fetchFromGitHub,
|
||||
|
||||
# build-system
|
||||
setuptools-scm,
|
||||
|
||||
# dependencies
|
||||
aiofiles,
|
||||
aiohttp,
|
||||
|
||||
# optional dependencies
|
||||
aioftp,
|
||||
|
||||
# tests
|
||||
pytest-asyncio,
|
||||
pytest-localserver,
|
||||
pytest-socket,
|
||||
pytestCheckHook,
|
||||
pythonOlder,
|
||||
setuptools-scm,
|
||||
tqdm,
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "parfive";
|
||||
version = "2.1.0";
|
||||
format = "setuptools";
|
||||
|
||||
disabled = pythonOlder "3.7";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
hash = "sha256-zWy0GSQhMHMM9B1M9vKE6/UPGnHObJUI4EZ+yY8X3I4=";
|
||||
src = fetchFromGitHub {
|
||||
owner = "Cadair";
|
||||
repo = "parfive";
|
||||
tag = "v${version}";
|
||||
hash = "sha256-fzyXKw+/aWlnE09CCHqak8MVIk/kcjXkFyV1EKw2cjA=";
|
||||
};
|
||||
|
||||
buildInputs = [ setuptools-scm ];
|
||||
pyproject = true;
|
||||
|
||||
propagatedBuildInputs = [
|
||||
aioftp
|
||||
build-system = [ setuptools-scm ];
|
||||
|
||||
dependencies = [
|
||||
aiohttp
|
||||
tqdm
|
||||
];
|
||||
|
||||
optional-dependencies = {
|
||||
ftp = [ aioftp ];
|
||||
};
|
||||
|
||||
nativeCheckInputs = [
|
||||
aiofiles
|
||||
pytest-asyncio
|
||||
@@ -49,13 +60,17 @@ buildPythonPackage rec {
|
||||
"test_ftp_http"
|
||||
];
|
||||
|
||||
# Tests require local network access
|
||||
__darwinAllowLocalNetworking = true;
|
||||
|
||||
pythonImportsCheck = [ "parfive" ];
|
||||
|
||||
meta = with lib; {
|
||||
meta = {
|
||||
description = "HTTP and FTP parallel file downloader";
|
||||
mainProgram = "parfive";
|
||||
homepage = "https://parfive.readthedocs.io/";
|
||||
license = licenses.mit;
|
||||
maintainers = [ ];
|
||||
changelog = "https://github.com/Cadair/parfive/releases/tag/v${version}";
|
||||
license = lib.licenses.mit;
|
||||
maintainers = [ lib.maintainers.sarahec ];
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user