python312Packages.publicsuffix: refactor
This commit is contained in:
parent
5244ff2814
commit
0d76f09f15
|
@ -1,25 +1,40 @@
|
||||||
{ lib, buildPythonPackage, fetchPypi }:
|
{ lib
|
||||||
|
, buildPythonPackage
|
||||||
|
, fetchPypi
|
||||||
|
, setuptools
|
||||||
|
, pythonOlder
|
||||||
|
}:
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
pname = "publicsuffix";
|
pname = "publicsuffix";
|
||||||
version = "1.1.1";
|
version = "1.1.1";
|
||||||
format = "setuptools";
|
pyproject = true;
|
||||||
|
|
||||||
|
disabled = pythonOlder "3.7";
|
||||||
|
|
||||||
src = fetchPypi {
|
src = fetchPypi {
|
||||||
inherit pname version;
|
inherit pname version;
|
||||||
sha256 = "22ce1d65ab6af5e9b2122e2443facdb93fb5c4abf24138099cb10fe7989f43b6";
|
hash = "sha256-Is4dZatq9emyEi4kQ/rNuT+1xKvyQTgJnLEP55ifQ7Y=";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
# disable test_fetch and the doctests (which also invoke fetch)
|
# disable test_fetch and the doctests (which also invoke fetch)
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
sed -i -e "/def test_fetch/i\\
|
sed -i -e "/def test_fetch/i\\
|
||||||
\\t@unittest.skip('requires internet')" -e "/def additional_tests():/,+1d" tests.py
|
\\t@unittest.skip('requires internet')" -e "/def additional_tests():/,+1d" tests.py
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
build-system = [
|
||||||
|
setuptools
|
||||||
|
];
|
||||||
|
|
||||||
|
pythonImportsCheck = [
|
||||||
|
"publicsuffix"
|
||||||
|
];
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "Allows to get the public suffix of a domain name";
|
description = "Allows to get the public suffix of a domain name";
|
||||||
homepage = "https://pypi.python.org/pypi/publicsuffix/";
|
homepage = "https://pypi.python.org/pypi/publicsuffix/";
|
||||||
license = licenses.mit;
|
license = licenses.mit;
|
||||||
|
maintainers = with maintainers; [ ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user