depot/third_party/nixpkgs/pkgs/development/python-modules/urlextract/default.nix
Default email fa5436e0a7 Project import generated by Copybara.
GitOrigin-RevId: e8057b67ebf307f01bdcc8fba94d94f75039d1f6
2024-06-05 17:53:02 +02:00

60 lines
1.2 KiB
Nix

{
lib,
buildPythonPackage,
dnspython,
fetchPypi,
filelock,
idna,
platformdirs,
pytestCheckHook,
pythonOlder,
setuptools,
uritools,
}:
buildPythonPackage rec {
pname = "urlextract";
version = "1.9.0";
pyproject = true;
disabled = pythonOlder "3.7";
src = fetchPypi {
inherit pname version;
hash = "sha256-cFCOArqd83LiXPBkLbNnzs4nPocSzQzngXj8XdfqANs=";
};
nativeBuildInputs = [ setuptools ];
propagatedBuildInputs = [
filelock
idna
platformdirs
uritools
];
nativeCheckInputs = [
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"
];
pythonImportsCheck = [ "urlextract" ];
meta = with lib; {
description = "Collects and extracts URLs from given text";
mainProgram = "urlextract";
homepage = "https://github.com/lipoja/URLExtract";
changelog = "https://github.com/lipoja/URLExtract/releases/tag/v${version}";
license = licenses.mit;
maintainers = with maintainers; [ ilkecan ];
};
}