2021-05-20 23:08:51 +00:00
|
|
|
{ lib
|
2022-03-30 09:31:56 +00:00
|
|
|
, stdenv
|
2021-05-20 23:08:51 +00:00
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, pythonOlder
|
2022-02-10 20:34:41 +00:00
|
|
|
, setuptools-scm
|
|
|
|
, pytestCheckHook
|
2022-04-15 01:41:22 +00:00
|
|
|
, cacert
|
2021-05-20 23:08:51 +00:00
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "dnspython";
|
2022-04-27 09:35:20 +00:00
|
|
|
version = "2.2.1";
|
2020-09-25 04:45:31 +00:00
|
|
|
disabled = pythonOlder "3.6";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2022-02-10 20:34:41 +00:00
|
|
|
extension = "tar.gz";
|
2022-04-27 09:35:20 +00:00
|
|
|
sha256 = "0gk00m8zxjghxnzafhars51k5ahd6wfhf123nrc1j5gzlsj6jx8g";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2022-02-10 20:34:41 +00:00
|
|
|
pytestCheckHook
|
2022-10-30 15:09:59 +00:00
|
|
|
] ++ lib.optionals stdenv.isDarwin [
|
2022-04-15 01:41:22 +00:00
|
|
|
cacert
|
2022-02-10 20:34:41 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
disabledTests = [
|
|
|
|
# dns.exception.SyntaxError: protocol not found
|
|
|
|
"test_misc_good_WKS_text"
|
2022-04-15 01:41:22 +00:00
|
|
|
# fails if IPv6 isn't available
|
2022-03-30 09:31:56 +00:00
|
|
|
"test_resolver_override"
|
2022-04-15 01:41:22 +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-02-10 20:34:41 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
setuptools-scm
|
|
|
|
];
|
|
|
|
|
2021-05-20 23:08:51 +00:00
|
|
|
pythonImportsCheck = [ "dns" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-05-20 23:08:51 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "A DNS toolkit for Python";
|
2022-01-03 16:56:52 +00:00
|
|
|
homepage = "https://www.dnspython.org";
|
2021-05-20 23:08:51 +00:00
|
|
|
license = with licenses; [ isc ];
|
2022-02-10 20:34:41 +00:00
|
|
|
maintainers = with maintainers; [ gador ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|