diff --git a/pkgs/development/python-modules/aioimaplib/default.nix b/pkgs/development/python-modules/aioimaplib/default.nix new file mode 100644 index 00000000000..d335cbc556c --- /dev/null +++ b/pkgs/development/python-modules/aioimaplib/default.nix @@ -0,0 +1,26 @@ +{ lib, buildPythonPackage, fetchFromGitHub, pythonOlder +, nose, asynctest, mock, pytz, tzlocal, imaplib2, docutils }: + +buildPythonPackage rec { + pname = "aioimaplib"; + version = "0.7.13"; + + # PyPI tarball doesn't ship tests + src = fetchFromGitHub { + owner = "bamthomas"; + repo = pname; + rev = version; + sha256 = "19yhk4ixfw46d0bvx6a40r23nvia5a83dzn5rzwaq1wdjr186bbn"; + }; + + disbaled = pythonOlder "3.4"; + + checkInputs = [ nose asynctest mock pytz tzlocal imaplib2 docutils ]; + + meta = with lib; { + description = "Python asyncio IMAP4rev1 client library"; + homepage = https://github.com/bamthomas/aioimaplib; + license = licenses.gpl3Plus; + maintainers = with maintainers; [ dotlambda ]; + }; +} diff --git a/pkgs/development/python-modules/asynctest/default.nix b/pkgs/development/python-modules/asynctest/default.nix new file mode 100644 index 00000000000..2b0348a8758 --- /dev/null +++ b/pkgs/development/python-modules/asynctest/default.nix @@ -0,0 +1,33 @@ +{ lib, buildPythonPackage, fetchPypi, fetchFromGitHub, pythonOlder, python }: + +buildPythonPackage rec { + pname = "asynctest"; + version = "0.11.1"; + + disabled = pythonOlder "3.4"; + + # PyPI tarball doesn't ship test/__init__.py + src = fetchFromGitHub { + owner = "Martiusweb"; + repo = pname; + rev = "v${version}"; + sha256 = "1vvh5vbq2fbz6426figs85z8779r7svb4dp2v3xynhhv05nh2y6v"; + }; + + postPatch = '' + # Skip failing test, probably caused by file system access + substituteInPlace test/test_selector.py \ + --replace "test_events_watched_outside_test_are_ignored" "xtest_events_watched_outside_test_are_ignored" + ''; + + checkPhase = '' + ${python.interpreter} -m unittest test + ''; + + meta = with lib; { + description = "Enhance the standard unittest package with features for testing asyncio libraries"; + homepage = https://github.com/Martiusweb/asynctest; + license = licenses.asl20; + maintainers = with maintainers; [ dotlambda ]; + }; +} diff --git a/pkgs/development/python-modules/imaplib2/default.nix b/pkgs/development/python-modules/imaplib2/default.nix new file mode 100644 index 00000000000..0ceff353f9a --- /dev/null +++ b/pkgs/development/python-modules/imaplib2/default.nix @@ -0,0 +1,22 @@ +{ lib, buildPythonPackage, fetchPypi }: + +buildPythonPackage rec { + pname = "imaplib2"; + version = "2.45.0"; + + src = fetchPypi { + inherit pname version; + sha256 = "a35b6d88258696e80aabecfb784e08730b8558fcaaa3061ff2c7f8637afbd0b3"; + }; + + # No tests on PyPI and no tags on GitHub :( + doCheck = false; + + meta = with lib; { + description = "A threaded Python IMAP4 client"; + homepage = https://github.com/bcoe/imaplib2; + # See https://github.com/bcoe/imaplib2/issues/25 + license = licenses.psfl; + maintainers = with maintainers; [ dotlambda ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 6ff71bd216c..91fdbdfc10e 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -155,6 +155,8 @@ in { agate-sql = callPackage ../development/python-modules/agate-sql { }; + aioimaplib = callPackage ../development/python-modules/aioimaplib { }; + aioamqp = callPackage ../development/python-modules/aioamqp { }; ansicolor = callPackage ../development/python-modules/ansicolor { }; @@ -623,6 +625,8 @@ in { }; }; + asynctest = callPackage ../development/python-modules/asynctest { }; + async-timeout = callPackage ../development/python-modules/async_timeout { }; asn1ate = callPackage ../development/python-modules/asn1ate { }; @@ -5263,6 +5267,8 @@ in { }; }; + imaplib2 = callPackage ../development/python-modules/imaplib2 { }; + ipfsapi = buildPythonPackage rec { name = "ipfsapi-${version}"; version = "0.4.2.post1";