2021-04-17 00:35:05 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
2023-10-19 13:55:26 +00:00
|
|
|
, pytestCheckHook
|
|
|
|
, pythonOlder
|
2021-04-17 00:35:05 +00:00
|
|
|
, six
|
|
|
|
, tldextract
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "surt";
|
|
|
|
version = "0.3.1";
|
2023-10-19 13:55:26 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
2021-04-17 00:35:05 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "internetarchive";
|
|
|
|
repo = "surt";
|
2023-10-19 13:55:26 +00:00
|
|
|
# Has no git tag, https://github.com/internetarchive/surt/issues/26
|
|
|
|
rev = "6934c321b3e2f66af9c001d882475949f00570c5";
|
2023-03-15 16:39:30 +00:00
|
|
|
hash = "sha256-pSMNpFfq2V0ANWNFPcb1DwPHccbfddo9P4xZ+ghwbz4=";
|
2021-04-17 00:35:05 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
six
|
|
|
|
tldextract
|
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2021-04-17 00:35:05 +00:00
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
2023-10-19 13:55:26 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"surt"
|
|
|
|
];
|
|
|
|
|
|
|
|
disabledTests = [
|
|
|
|
# Tests want to download Public Suffix List
|
|
|
|
"test_getPublicPrefix"
|
|
|
|
"test_getPublicSuffix"
|
|
|
|
];
|
2021-04-17 00:35:05 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Sort-friendly URI Reordering Transform (SURT) python module";
|
|
|
|
homepage = "https://github.com/internetarchive/surt";
|
|
|
|
license = licenses.agpl3Only;
|
|
|
|
maintainers = with maintainers; [ Luflosi ];
|
|
|
|
};
|
|
|
|
}
|