5ca88bfbb9
GitOrigin-RevId: 9f918d616c5321ad374ae6cb5ea89c9e04bf3e58
37 lines
823 B
Nix
37 lines
823 B
Nix
{
|
|
lib,
|
|
buildPythonPackage,
|
|
fetchPypi,
|
|
setuptools,
|
|
pythonOlder,
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "publicsuffix";
|
|
version = "1.1.1";
|
|
pyproject = true;
|
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
src = fetchPypi {
|
|
inherit pname version;
|
|
hash = "sha256-Is4dZatq9emyEi4kQ/rNuT+1xKvyQTgJnLEP55ifQ7Y=";
|
|
};
|
|
|
|
# disable test_fetch and the doctests (which also invoke fetch)
|
|
postPatch = ''
|
|
sed -i -e "/def test_fetch/i\\
|
|
\\t@unittest.skip('requires internet')" -e "/def additional_tests():/,+1d" tests.py
|
|
'';
|
|
|
|
build-system = [ setuptools ];
|
|
|
|
pythonImportsCheck = [ "publicsuffix" ];
|
|
|
|
meta = with lib; {
|
|
description = "Allows to get the public suffix of a domain name";
|
|
homepage = "https://pypi.python.org/pypi/publicsuffix/";
|
|
license = licenses.mit;
|
|
maintainers = [ ];
|
|
};
|
|
}
|