1{
2 lib,
3 buildPythonPackage,
4 fetchPypi,
5 setuptools,
6 pythonOlder,
7}:
8
9buildPythonPackage rec {
10 pname = "publicsuffix";
11 version = "1.1.1";
12 pyproject = true;
13
14 disabled = pythonOlder "3.7";
15
16 src = fetchPypi {
17 inherit pname version;
18 hash = "sha256-Is4dZatq9emyEi4kQ/rNuT+1xKvyQTgJnLEP55ifQ7Y=";
19 };
20
21 # disable test_fetch and the doctests (which also invoke fetch)
22 postPatch = ''
23 sed -i -e "/def test_fetch/i\\
24 \\t@unittest.skip('requires internet')" -e "/def additional_tests():/,+1d" tests.py
25 '';
26
27 build-system = [ setuptools ];
28
29 pythonImportsCheck = [ "publicsuffix" ];
30
31 meta = with lib; {
32 description = "Allows to get the public suffix of a domain name";
33 homepage = "https://pypi.python.org/pypi/publicsuffix/";
34 license = licenses.mit;
35 maintainers = [ ];
36 };
37}