diff --git a/pkgs/development/python-modules/aiosmtpd/default.nix b/pkgs/development/python-modules/aiosmtpd/default.nix index c204261644c5..c19e39bcd48f 100644 --- a/pkgs/development/python-modules/aiosmtpd/default.nix +++ b/pkgs/development/python-modules/aiosmtpd/default.nix @@ -1,12 +1,21 @@ -{ lib, isPy3k, fetchFromGitHub, buildPythonPackage -, attrs, atpublic }: +{ lib +, atpublic +, attrs +, buildPythonPackage +, fetchFromGitHub +, pytest-mock +, pytestCheckHook +, pythonOlder +, typing-extensions +}: buildPythonPackage rec { pname = "aiosmtpd"; version = "1.4.2"; - disabled = !isPy3k; + format = "setuptools"; + + disabled = pythonOlder "3.6"; - # Release not published to Pypi src = fetchFromGitHub { owner = "aio-libs"; repo = pname; @@ -15,19 +24,34 @@ buildPythonPackage rec { }; propagatedBuildInputs = [ - atpublic attrs + atpublic + attrs + ] ++ lib.optionals (pythonOlder "3.8") [ + typing-extensions ]; - # Tests need network access - doCheck = false; + checkInputs = [ + pytest-mock + pytestCheckHook + ]; + + disabledTests = [ + # Requires git + "test_ge_master" + # Seems to be a sandbox issue + "test_byclient" + ]; + + pythonImportsCheck = [ + "aiosmtpd" + ]; meta = with lib; { - homepage = "https://aiosmtpd.readthedocs.io/en/latest/"; description = "Asyncio based SMTP server"; + homepage = "https://aiosmtpd.readthedocs.io/"; longDescription = '' This is a server for SMTP and related protocols, similar in utility to the - standard library's smtpd.py module, but rewritten to be based on asyncio for - Python 3. + standard library's smtpd.py module. ''; license = licenses.asl20; maintainers = with maintainers; [ eadwu ]; diff --git a/pkgs/development/python-modules/atpublic/default.nix b/pkgs/development/python-modules/atpublic/default.nix index 4d96bcbe26b5..8bf81556770a 100644 --- a/pkgs/development/python-modules/atpublic/default.nix +++ b/pkgs/development/python-modules/atpublic/default.nix @@ -1,6 +1,8 @@ -{ lib, isPy3k, pythonOlder, fetchPypi, buildPythonPackage -, pytest -, pytest-cov +{ lib +, buildPythonPackage +, fetchPypi +, pytestCheckHook +, pythonOlder , sybil , typing-extensions }: @@ -8,7 +10,9 @@ buildPythonPackage rec { pname = "atpublic"; version = "2.3"; - disabled = !isPy3k; + format = "setuptools"; + + disabled = pythonOlder "3.6"; src = fetchPypi { inherit pname version; @@ -20,25 +24,25 @@ buildPythonPackage rec { ]; checkInputs = [ - pytest pytest-cov sybil + pytestCheckHook + sybil ]; - checkPhase = '' - pytest + postPatch = '' + substituteInPlace setup.cfg \ + --replace "--cov=public" "" ''; + pythonImportsCheck = [ + "public" + ]; + meta = with lib; { - homepage = "https://public.readthedocs.io/en/latest/"; - description = "A decorator and function which populates a module's __all__ and globals"; + description = "Python decorator and function which populates a module's __all__ and globals"; + homepage = "https://public.readthedocs.io/"; longDescription = '' This is a very simple decorator and function which populates a module's __all__ and optionally the module globals. - - This provides both a pure-Python implementation and a C implementation. It is - proposed that the C implementation be added to builtins_ for Python 3.6. - - This proposal seems to have been rejected, for more information see - https://bugs.python.org/issue26632. ''; license = licenses.asl20; maintainers = with maintainers; [ eadwu ]; diff --git a/pkgs/development/python-modules/mailman-hyperkitty/default.nix b/pkgs/development/python-modules/mailman-hyperkitty/default.nix index 2d3ec976d64b..649d8d4cf3df 100644 --- a/pkgs/development/python-modules/mailman-hyperkitty/default.nix +++ b/pkgs/development/python-modules/mailman-hyperkitty/default.nix @@ -5,6 +5,7 @@ , mock , nose2 , python +, pythonOlder , requests , zope_interface }: @@ -14,6 +15,8 @@ buildPythonPackage rec { version = "1.1.0"; format = "setuptools"; + disabled = pythonOlder "3.9"; + src = fetchPypi { inherit pname version; sha256 = "1lfqa9admhvdv71f528jmz2wl0i5cv77v6l64px2pm4zqr9ckkjx";