Merge pull request #145563 from fabaff/clean-aiosmtpd

python3Packages.aiosmtpd: enable tests
This commit is contained in:
Fabian Affolter 2021-11-12 09:01:47 +01:00 committed by GitHub
commit 4f6c6dba4a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 56 additions and 25 deletions

View file

@ -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 ];

View file

@ -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 ];

View file

@ -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";