2021-10-01 09:20:50 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, dnspython
|
|
|
|
, fetchPypi
|
|
|
|
, filelock
|
|
|
|
, idna
|
2022-01-13 20:06:32 +00:00
|
|
|
, platformdirs
|
2021-10-01 09:20:50 +00:00
|
|
|
, pytestCheckHook
|
2022-01-13 20:06:32 +00:00
|
|
|
, pythonOlder
|
2021-10-01 09:20:50 +00:00
|
|
|
, uritools
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "urlextract";
|
2022-01-13 20:06:32 +00:00
|
|
|
version = "1.5.0";
|
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
2021-10-01 09:20:50 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2022-01-13 20:06:32 +00:00
|
|
|
hash = "sha256-QKXIQ9HXJTdY9W8NZ0jF6iekoUVl46kvJakW3cTB5B8=";
|
2021-10-01 09:20:50 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
filelock
|
|
|
|
idna
|
2022-01-13 20:06:32 +00:00
|
|
|
platformdirs
|
2021-10-01 09:20:50 +00:00
|
|
|
uritools
|
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
dnspython
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
|
|
|
disabledTests = [
|
|
|
|
# fails with dns.resolver.NoResolverConfiguration due to network sandboxing
|
|
|
|
"test_check_dns_enabled"
|
|
|
|
"test_check_dns_find_urls"
|
|
|
|
"test_dns_cache_init"
|
|
|
|
"test_dns_cache_negative"
|
|
|
|
"test_dns_cache_reuse"
|
|
|
|
];
|
|
|
|
|
2022-01-13 20:06:32 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"urlextract"
|
|
|
|
];
|
2021-10-01 09:20:50 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Collects and extracts URLs from given text";
|
|
|
|
homepage = "https://github.com/lipoja/URLExtract";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ ilkecan ];
|
|
|
|
};
|
|
|
|
}
|