about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/parfive/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/parfive/default.nix')
-rw-r--r--nixpkgs/pkgs/development/python-modules/parfive/default.nix51
1 files changed, 51 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/parfive/default.nix b/nixpkgs/pkgs/development/python-modules/parfive/default.nix
new file mode 100644
index 000000000000..790c7ef5cdbf
--- /dev/null
+++ b/nixpkgs/pkgs/development/python-modules/parfive/default.nix
@@ -0,0 +1,51 @@
+{ lib
+, buildPythonPackage
+, fetchPypi
+, tqdm
+, aiohttp
+, pytest
+, setuptools_scm
+, pytest-localserver
+, pytest-socket
+, pytest-asyncio
+, aioftp
+}:
+
+buildPythonPackage rec {
+  pname = "parfive";
+  version = "1.0.2";
+
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "90dfb05d0a65d00669f5245371a4b33cbebcb5cfba86f4aad7f956984394eefd";
+  };
+
+  buildInputs = [
+    setuptools_scm
+  ];
+
+  propagatedBuildInputs = [
+    tqdm
+    aiohttp
+    aioftp
+  ];
+
+  checkInputs = [
+    pytest
+    pytest-localserver
+    pytest-socket
+    pytest-asyncio
+  ];
+
+  checkPhase = ''
+    # these two tests require network connection
+    pytest parfive -k "not test_ftp and not test_ftp_http"
+  '';
+
+  meta = with lib; {
+    description = "A HTTP and FTP parallel file downloader";
+    homepage = "https://parfive.readthedocs.io/";
+    license = licenses.mit;
+    maintainers = [ maintainers.costrouc ];
+  };
+}