1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 python-memcached,
6 pytestCheckHook,
7 pythonOlder,
8 setuptools,
9}:
10
11buildPythonPackage rec {
12 pname = "cymruwhois";
13 version = "1.6";
14 pyproject = true;
15
16 disabled = pythonOlder "3.10";
17
18 src = fetchFromGitHub {
19 owner = "JustinAzoff";
20 repo = "python-cymruwhois";
21 tag = version;
22 hash = "sha256-d9m668JYI9mxUycoVWyaDCR7SOca+ebymZxWtgSPWNU=";
23 };
24
25 build-system = [ setuptools ];
26
27 optional-dependencies = {
28 CACHE = [ python-memcached ];
29 };
30
31 nativeCheckInputs = [ pytestCheckHook ];
32
33 pythonImportsCheck = [ "cymruwhois" ];
34
35 disabledTests = [
36 # AssertionError
37 "test_doctest"
38 ];
39
40 disabledTestPaths = [
41 # £Failed: 'yield' keyword is allowed in fixtures, but not in tests (test_common)
42 "tests/test_common_lookups.py"
43 ];
44
45 meta = {
46 description = "Python client for the whois.cymru.com service";
47 homepage = "https://github.com/JustinAzoff/python-cymruwhois";
48 license = lib.licenses.mit;
49 maintainers = with lib.maintainers; [ fab ];
50 };
51}