diff options
Diffstat (limited to 'pkgs/development/python-modules')
5 files changed, 82 insertions, 10 deletions
diff --git a/pkgs/development/python-modules/aria2p/default.nix b/pkgs/development/python-modules/aria2p/default.nix new file mode 100644 index 00000000000..51b523c010a --- /dev/null +++ b/pkgs/development/python-modules/aria2p/default.nix @@ -0,0 +1,43 @@ +{ stdenv, buildPythonPackage, fetchFromGitHub, pythonOlder +, aria2, poetry, pytest, pytestcov, pytest_xdist, responses +, asciimatics, loguru, requests, setuptools, websocket_client +}: + +buildPythonPackage rec { + pname = "aria2p"; + version = "0.7.0"; + format = "pyproject"; + disabled = pythonOlder "3.6"; + + src = fetchFromGitHub { + owner = "pawamoy"; + repo = pname; + rev = "v${version}"; + sha256 = "1inak3y2win58zbzykfzy6xp00f276sqsz69h2nfsd93mpr74wf6"; + }; + + nativeBuildInputs = [ poetry ]; + + preBuild = '' + export HOME=$TMPDIR + ''; + + checkInputs = [ aria2 responses pytest pytestcov pytest_xdist ]; + + # Tests are not all stable/deterministic, + # they rely on actually running an aria2c daemon and communicating with it, + # race conditions and deadlocks were observed, + # thus the corresponding tests are disabled + checkPhase = '' + pytest -nauto -k "not test_api and not test_cli and not test_interface" + ''; + + propagatedBuildInputs = [ asciimatics loguru requests setuptools websocket_client ]; + + meta = with stdenv.lib; { + homepage = "https://github.com/pawamoy/aria2p"; + description = "Command-line tool and library to interact with an aria2c daemon process with JSON-RPC"; + license = licenses.isc; + maintainers = with maintainers; [ koral ]; + }; +} diff --git a/pkgs/development/python-modules/llfuse/default.nix b/pkgs/development/python-modules/llfuse/default.nix index 6a497358404..02adb5a8d16 100644 --- a/pkgs/development/python-modules/llfuse/default.nix +++ b/pkgs/development/python-modules/llfuse/default.nix @@ -1,7 +1,11 @@ -{ stdenv, fetchurl, buildPythonPackage, pkgconfig, pytest, fuse, attr, which -, contextlib2 +{ stdenv, fetchurl, fetchpatch, buildPythonPackage, pkgconfig, pytest, fuse, attr, which +, contextlib2, osxfuse }: +let + inherit (stdenv.lib) optionals optionalString; +in + buildPythonPackage rec { pname = "llfuse"; version = "1.3.6"; @@ -11,14 +15,29 @@ buildPythonPackage rec { sha256 = "1j9fzxpgmb4rxxyl9jcf84zvznhgi3hnh4hg5vb0qaslxkvng8ii"; }; + patches = [ + # https://github.com/python-llfuse/python-llfuse/pull/23 (2 commits) + (fetchpatch { + url = "https://github.com/python-llfuse/python-llfuse/commit/7579b0e626da1a7882b13caedcdbd4a834702e94.diff"; + sha256 = "0vpybj4k222h20lyn0q7hz86ziqlapqs5701cknw8d11jakbhhb0"; + }) + (fetchpatch { + url = "https://github.com/python-llfuse/python-llfuse/commit/438c00ab9e10d6c485bb054211c01b7f8524a736.diff"; + sha256 = "1zhb05b7k3c9mjqshy9in8yzpbihy7f33x1myq5kdjip1k50cwrn"; + }) + ]; + nativeBuildInputs = [ pkgconfig ]; - buildInputs = [ fuse ]; - checkInputs = [ pytest attr which ]; + buildInputs = + optionals stdenv.isLinux [ fuse ] + ++ optionals stdenv.isDarwin [ osxfuse ]; + checkInputs = [ pytest which ] ++ + optionals stdenv.isLinux [ attr ]; propagatedBuildInputs = [ contextlib2 ]; checkPhase = '' - py.test -k "not test_listdir" + py.test -k "not test_listdir" ${optionalString stdenv.isDarwin ''-m "not uses_fuse"''} ''; meta = with stdenv.lib; { diff --git a/pkgs/development/python-modules/loguru/default.nix b/pkgs/development/python-modules/loguru/default.nix index ceb9f841a46..c12084f008e 100644 --- a/pkgs/development/python-modules/loguru/default.nix +++ b/pkgs/development/python-modules/loguru/default.nix @@ -2,18 +2,18 @@ buildPythonPackage rec { pname = "loguru"; - version = "0.4.0"; + version = "0.4.1"; disabled = isPy27; src = fetchPypi { inherit pname version; - sha256 = "d5ddf363b7e0e562652f283f74a89bf35601baf16b70f2cd2736a2f8c6638748"; + sha256 = "a6101fd435ac89ba5205a105a26a6ede9e4ddbb4408a6e167852efca47806d11"; }; checkInputs = [ pytestCheckHook colorama ]; disabledTests = [ "test_time_rotation_reopening" "test_file_buffering" ] - ++ stdenv.lib.optionals stdenv.isDarwin [ "test_rotation_and_retention" "test_rotation_and_retention_timed_file" "test_renaming" ]; + ++ stdenv.lib.optionals stdenv.isDarwin [ "test_rotation_and_retention" "test_rotation_and_retention_timed_file" "test_renaming" "test_await_complete_inheritance" ]; meta = with stdenv.lib; { homepage = https://github.com/Delgan/loguru; diff --git a/pkgs/development/python-modules/python-telegram-bot/default.nix b/pkgs/development/python-modules/python-telegram-bot/default.nix index 11342237479..9b70d76bfed 100644 --- a/pkgs/development/python-modules/python-telegram-bot/default.nix +++ b/pkgs/development/python-modules/python-telegram-bot/default.nix @@ -23,7 +23,8 @@ buildPythonPackage rec { --replace "import telegram.vendor.ptb_urllib3.urllib3 as urllib3" "import urllib3 as urllib3" \ --replace "import telegram.vendor.ptb_urllib3.urllib3.contrib.appengine as appengine" "import urllib3.contrib.appengine as appengine" \ --replace "from telegram.vendor.ptb_urllib3.urllib3.connection import HTTPConnection" "from urllib3.connection import HTTPConnection" \ - --replace "from telegram.vendor.ptb_urllib3.urllib3.util.timeout import Timeout" "from urllib3.util.timeout import Timeout" + --replace "from telegram.vendor.ptb_urllib3.urllib3.util.timeout import Timeout" "from urllib3.util.timeout import Timeout" \ + --replace "from telegram.vendor.ptb_urllib3.urllib3.fields import RequestField" "from urllib3.fields import RequestField" touch LICENSE.dual ''; @@ -38,6 +39,6 @@ buildPythonPackage rec { description = "This library provides a pure Python interface for the Telegram Bot API."; homepage = https://python-telegram-bot.org; license = licenses.lgpl3; - maintainers = with maintainers; [ veprbl ]; + maintainers = with maintainers; [ veprbl pingiun ]; }; } diff --git a/pkgs/development/python-modules/zodb/default.nix b/pkgs/development/python-modules/zodb/default.nix index c7935208536..f15cefaa475 100644 --- a/pkgs/development/python-modules/zodb/default.nix +++ b/pkgs/development/python-modules/zodb/default.nix @@ -1,5 +1,6 @@ { stdenv , fetchPypi +, fetchpatch , buildPythonPackage , python , zope_testrunner @@ -23,6 +24,14 @@ buildPythonPackage rec { sha256 = "20155942fa326e89ad8544225bafd74237af332ce9d7c7105a22318fe8269666"; }; + patches = [ + # Compatibility with transaction v3.0 + (fetchpatch { + url = "https://github.com/zopefoundation/ZODB/commit/0adcc6877f690186c97cc5da7e13788946d5e0df.patch"; + sha256 = "1zmbgm7r36nj5w7icpinp61fm81svh2wk213pzr3l0jxzr9i5qi4"; + }) + ]; + # remove broken test postPatch = '' rm -vf src/ZODB/tests/testdocumentation.py |