2021-04-22 10:37:48 +00:00
|
|
|
{ lib
|
2022-02-24 23:34:32 +00:00
|
|
|
, stdenv
|
2021-04-22 10:37:48 +00:00
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, pythonOlder
|
2022-01-16 10:17:10 +00:00
|
|
|
, setuptools-scm
|
|
|
|
, pytestCheckHook
|
2022-02-24 23:34:32 +00:00
|
|
|
, cacert
|
2021-04-22 10:37:48 +00:00
|
|
|
}:
|
2017-07-08 23:13:57 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "dnspython";
|
2022-03-15 18:13:02 +00:00
|
|
|
version = "2.2.1";
|
2020-08-17 02:13:55 +00:00
|
|
|
disabled = pythonOlder "3.6";
|
2017-07-08 23:13:57 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2022-01-16 10:17:10 +00:00
|
|
|
extension = "tar.gz";
|
2022-03-15 18:13:02 +00:00
|
|
|
sha256 = "0gk00m8zxjghxnzafhars51k5ahd6wfhf123nrc1j5gzlsj6jx8g";
|
2017-07-08 23:13:57 +00:00
|
|
|
};
|
|
|
|
|
2022-01-16 10:17:10 +00:00
|
|
|
checkInputs = [
|
|
|
|
pytestCheckHook
|
2022-10-06 16:38:53 +00:00
|
|
|
] ++ lib.optionals stdenv.isDarwin [
|
2022-02-24 23:34:32 +00:00
|
|
|
cacert
|
2022-01-16 10:17:10 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
disabledTests = [
|
|
|
|
# dns.exception.SyntaxError: protocol not found
|
|
|
|
"test_misc_good_WKS_text"
|
2022-02-24 23:34:32 +00:00
|
|
|
# fails if IPv6 isn't available
|
|
|
|
"test_resolver_override"
|
2022-03-29 18:39:42 +00:00
|
|
|
|
|
|
|
# Tests that run inconsistently on darwin systems
|
|
|
|
] ++ lib.optionals stdenv.isDarwin [
|
|
|
|
# 9 tests fail with: BlockingIOError: [Errno 35] Resource temporarily unavailable
|
|
|
|
"testQueryUDP"
|
|
|
|
# 6 tests fail with: dns.resolver.LifetimeTimeout: The resolution lifetime expired after ...
|
|
|
|
"testResolveCacheHit"
|
|
|
|
"testResolveTCP"
|
2022-01-16 10:17:10 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
setuptools-scm
|
|
|
|
];
|
|
|
|
|
2021-04-22 10:37:48 +00:00
|
|
|
pythonImportsCheck = [ "dns" ];
|
2017-07-08 23:13:57 +00:00
|
|
|
|
2021-04-22 10:37:48 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "A DNS toolkit for Python";
|
2022-01-03 15:53:12 +00:00
|
|
|
homepage = "https://www.dnspython.org";
|
2021-04-22 10:37:48 +00:00
|
|
|
license = with licenses; [ isc ];
|
2022-01-16 10:17:10 +00:00
|
|
|
maintainers = with maintainers; [ gador ];
|
2017-07-08 23:13:57 +00:00
|
|
|
};
|
|
|
|
}
|